[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
[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'.
[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 .
[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.
[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