Automation testing framework for RFT execution with STAF+STAX . [Session-1]
来源:互联网 发布:正品淘宝店 编辑:程序博客网 时间:2024/05/14 15:28
[Background: In this document it will show you how to build one test execution automation framework with STAF+STAX. And make it helps you daily testing schedule.
The STAF is a Java open source testing automation framework , it could provide a good resolution for our agile testing request. Basically, if your need assign a lof of automated test case to multi-machine or OS and execute them or running a somking testing against to latest product build by automatically, it is shoud be a good candiate to select.
And i think the difficulty points in that is the XML defination part, you will see all the programing and attributes is coded in the XML file. The 'Pathon' script , one flexible interface which is supported by the STAF , also intergrated to the XML configure file
[Resource : We need to download these two plug-in and install them from http://staf.sourceforge.net/.
Latest Releases
- STAF 3.4.6 (June 30, 2011) (Download)
- STAX 3.5.0 (June 30, 2011) (Download)
[Note:] The STAX is not an install package, only need to extract it to the folder of STAF location e.g. C:\STAF\services\stax .If there is no the 'services' folder under the 'staf' should to create one by ourself.
[Configuration] Now we need to make some modifications to the file of '$STAF_Install_Directory\services\stax\STAF.cfg ', please pay attention to the stax path, we need make sure the folder name does not contains the other context like version etc. Because after we extracted the stax as one sub folder under the staf, its name would contain the version info like 'stax350' we need change it to 'stax'.
2 {STAF/Config/STAFRoot}/services/stax/STAX.jar OPTION J2=-Xmx384m
3 SERVICE EVENT LIBRARY JSTAF EXECUTE \
4 {STAF/Config/STAFRoot}/services/stax/STAFEvent.jar
5 SET MAXQUEUESIZE 10000
[Check Env Status] When you finished the STAF+STAF installation, please using the commandd of 'staf local service list' in cmd model to verify you configuration status. You should get the response list like below. Sorry, before that please click the menu of ' programs->STAF->start STAF ...' to open the STAF service .
Response
--------
Name Library Executable
--------- ---------- -----------------------------------
DELAY <Internal> <None>
DIAG <Internal> <None>
ECHO <Internal> <None>
EVENT JSTAF C:\STAF/services/stax/STAFEvent.jar
FS <Internal> <None>
HANDLE <Internal> <None>
HELP <Internal> <None>
LIFECYCLE <Internal> <None>
LOG STAFLog <None>
MISC <Internal> <None>
PING <Internal> <None>
PROCESS <Internal> <None>
QUEUE <Internal> <None>
SEM <Internal> <None>
SERVICE <Internal> <None>
SHUTDOWN <Internal> <None>
STAX JSTAF C:\STAF/services/stax/STAX.jar
TRACE <Internal> <None>
TRUST <Internal> <None>
VAR <Internal> <None>
[RFT Test Case Prepare: ] For now the STAF and STAX service is build successfully, then we need to get the case and execution work flow ready. Firstly, I have wrap up my RFT case execution as one command line batch file 'RunCommRFT.bat'. The context is
, and about run the RFT using command line method I will talk it in another session later.
[XML Configuration:] At the first paragraph , I have introducted there has one important component to the STAF framework is the XML. Now, let us to make a simple XML file to run our test script. The detailed description for each element node please see the comment with green color.
<!DOCTYPE stax SYSTEM "stax.dtd">
<stax>
<!--
1. The element of <defaultcall> is define a default execution function , name = 'main'.
<defaultcall function ="main"/>
<function name="main">
<process>
<location>'10.2.159.121'</location>
<command>'E:\David\RunCommRFT.bat'</command>
</process>
</function>
</stax>
[Run the remoting command: ] Type into the command line like below in the CMD model, it will call the remoting machine 10.2.159.121 to run the command of 'E:\David\RunCommRFT.bat'. Finally, you will get a return number that mean the task in process....
[Reference documentation:]
1. http://wenku.baidu.com/view/467a4834eefdc8d376ee3265.html
2. http://wenku.baidu.com/view/9f517fd084254b35eefd3465.html
3. http://wenku.baidu.com/view/1ae05244b307e87101f696c6.html
Work by Jianfei is licensed under a Creative Commons wei 3.0 Unported License.
- Automation testing framework for RFT execution with STAF+STAX . [Session-1]
- STAF: the Software Testing Automation Framework
- Find proper JVM for STAF/STAX
- Automation UI testing with VNC
- Automation Testing Framework by c++, Practice-1: tips from POSA4
- STAF/STAX 安装配置
- Staf/Stax安装
- STAF/STAX 安装配置
- Automation for the people: Continuous testing
- Automation Testing
- qtp automation framework 1
- QtKey Automation FrameWork - 1
- Introduction to iOS Testing With UI Automation(初学者,实例)
- Robot Framework For Mobile Test Automation
- STAF/STAX中XML编写注意要点
- 使用STAF/STAX启动VMWare镜像
- SAFS/STAF/STAX自动化测试框架
- Automation for the people: Hands-off load testing
- Get user name from the web client in Active Directories. [ No using Page.user]
- Java String judgement for null value.
- Java Instance return model note!
- SQL Query XML column. SQL 查询 xml 字段
- Java context replacing with BufferedReader & PrintWriter
- Automation testing framework for RFT execution with STAF+STAX . [Session-1]
- Package you execution files with Iexpress.exe
- Perl 基于 Windows 环境 搭建
- Perl Scalar
- Disable Windows server 2003 Security Warning.
- SQLServer2005 remove log file.
- 最方便的批处理延时方法
- Perl初级教程 (5) 遍历文件夹内指定扩展名文件,查找匹配关键字的输出。
- TFS 自动同步Server 端文件的批处理命令