分类: LINUX
2008-01-16 07:15:39
本架构不需要任何代理,能兼容多种脚本。架构图如下
安装步骤:
将html目录内容拷贝到apache目录,将scripts拷贝到/scripts.
安装之前要确保apache,php正常工作。
具体设计
前端采用PHP和HTML,后台使用Expect,
前端的文件如下:
index.php: 首页
submit.php 用于显示结果,
usage.txt 用于显示用法
run1.exp Expect 脚本
mail.pl 用于发送邮件
添加新内容:
It is often noticed that if you want to run the automated test on a remote server then one thing you require is an agent running on the server so that all of the commands given from the controller is executed on the server. The agent is the small piece of code which resides on the test server and activates a port on the test server, so the commands given from the controller will be executed on the test server.
I have designed a small framework which will not require any agent running on the test server machines. The need for implementing such a tool occurs mostly in case of testing an application which requires the installation of a fresh OS for each phase of testing. This happens when the server itself is in the development stage or an application running on the server is changing continuously for each iteration and which requires the server should be freshly installed. When the OS (build) itself is changing, then the agent which is configured on the OS needs to be configured again and again for each new installation.
This framework will be used to start any test on a Linux server without having any agent running on the server. Different scripts can be plugged into the framework.
* Note: All operations are performed using ssh.
The Automation server has all of the scripts it requires to test the remote server. From the client machine all the details about the test can be entered . The Automation server will take all the input parameters and it will contact the remote test server. Once authentication is done, the automation server will transfer the script to the test server and it will start the script on the test server.
Test results will be sent back to the user once the test is completed.
* Note: Sendmail code should be there in test script.
For configuring this tool you should have SLES9 server with Apache installed.
From any client machine open the automation framework page.
Enter the IP address, and password of the remote server. Select the script and substitute the parameters for the type of test. For arguments of the script, refer to link "click here". Enter the email id if you want notification through mail. Click submit.
The following page shows the output results.
Note: This is the output results. This tool will give the notification of the test which is running on the server. Your scripts should have a code to mail the output results.
The front end of the tool is designed using HTML and PHP. There are some PHP shell functions which are used.
Expect is used in back end. The Expect script will take the input from the web page as parameters and it will contact the test server, copy the required script in the server, and execute.
Scripts are divided into two types:
Test scripts:
Here are some sample PERL scripts for creating data sets. When the scripts are executed from the command prompt, it will ask for different inputs as parameters. The parameters are supplied from the front end HTML page.
This can be easily done in the following way:
Any test scripts can be plugged in the automation framework.
chinaunix网友2008-01-16 07:17:30
原文地址:http://www.novell.com/coolsolutions/feature/18047.html#1 请于20日之前完成环境搭建和翻译