惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Security Archives - TechRepublic
Security Archives - TechRepublic
O
OpenAI News
W
WeLiveSecurity
Hacker News: Ask HN
Hacker News: Ask HN
Hacker News - Newest:
Hacker News - Newest: "LLM"
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
T
Troy Hunt's Blog
L
LINUX DO - 最新话题
SecWiki News
SecWiki News
Schneier on Security
Schneier on Security
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
N
News and Events Feed by Topic
TaoSecurity Blog
TaoSecurity Blog
H
Heimdal Security Blog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
P
Palo Alto Networks Blog
Project Zero
Project Zero
Attack and Defense Labs
Attack and Defense Labs
C
CXSECURITY Database RSS Feed - CXSecurity.com
T
Tor Project blog
Scott Helme
Scott Helme
T
Threat Research - Cisco Blogs
Simon Willison's Weblog
Simon Willison's Weblog
Spread Privacy
Spread Privacy
Cisco Talos Blog
Cisco Talos Blog
T
Threatpost
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
The Last Watchdog
The Last Watchdog
Google DeepMind News
Google DeepMind News
P
Privacy & Cybersecurity Law Blog
Know Your Adversary
Know Your Adversary
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
L
Lohrmann on Cybersecurity
Cloudbric
Cloudbric
I
Intezer
The Hacker News
The Hacker News
L
LINUX DO - 热门话题
AI
AI
B
Blog
S
Securelist
P
Proofpoint News Feed
量子位
Jina AI
Jina AI
V2EX - 技术
V2EX - 技术
T
The Exploit Database - CXSecurity.com
酷 壳 – CoolShell
酷 壳 – CoolShell
Recent Commits to openclaw:main
Recent Commits to openclaw:main
C
CERT Recently Published Vulnerability Notes
J
Java Code Geeks
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻

博客园 - zencorn

.NET Core 6 类的私有静态变量关联异常 使用 WinSCP 下载 FTP 文件并用 计划任务 复制到 远程 共享目录 【翻译】什么是 eCPM & RPM 与其计算公式 PMP Fundamentals T-SQL 总结 MySQL 存储配置 MS-TEST 批处理执行测试时的资源文件目录问题 测试换行显示 如何制作简单的 3D 打印模型 搬家Testing. Test TFS 自动同步Server 端文件的批处理命令 Perl初级教程 (5) 遍历文件夹内指定扩展名文件,查找匹配关键字的输出。 最方便的批处理延时方法 SQLServer2005 remove log file. Disable Windows server 2003 Security Warning. Perl Scalar Perl 基于 Windows 环境 搭建 Package you execution files with Iexpress.exe
Automation testing framework for RFT execution with STAF+STAX . [Session-1]
zencorn · 2011-07-25 · via 博客园 - zencorn
                                                                              

知识共享许可协议Work by Jianfei is licensed under a Creative Commons wei 3.0 Unported License

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

1 SERVICE STAX LIBRARY JSTAF EXECUTE \
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 .

C:\>staf local service list
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

java -jar "%IBM_RATIONAL_RFT_INSTALL_DIR%\rational_ft.jar" -datastore E:\David\Trunk\RFTTrunk\Geneva -playback Core_Accounting.TestSTAFFScript

, 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.

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE stax SYSTEM "stax.dtd"><stax><!--

       
    1. The element of <defaultcall> is define a default execution function , name = 'main'.

    2. The <function > is the method structure ,tell the STAF service which machie is our target to run the command file.

       Note: The target    machine also need install the STAF & STAX successful.

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

staf local stax execute file C:/STAF/services/stax/samples/Mysample.xml MACHINE 10.2.159.121 FUNCTION main

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

- Make people around you successful is the biggest contribution to ourselves. -