From: David B. <bd...@us...> - 2006-01-23 20:59:26
|
Yes, STAF is supported on many platforms, including Linux PPC64-32 and PPC64-64. You can download them from: http://staf.sourceforge.net/getcurrent.php To have the output from your process returned, add the following options to your command: c:\>staf local process start command cmd parms "/K echo 'ls' >COM1:\" returnstdout stderrtostdout wait David Bender STAF/STAX Development 8-1268 (512-838-1268) IBM Austin Bldg. 903-5B002 Internet: bd...@us... ----- Forwarded by David Bender/Austin/IBM on 01/23/2006 02:58 PM ----- Girish <gir...@gm...> Sent by: sta...@li... 01/22/2006 12:43 PM To David Bender/Austin/IBM@IBMUS cc sta...@li..., Hag...@21... Subject Re: Fw: [staf-users] Re: Fw: need some clarification regarding the execution of STAF/STAX Hi David, I have found the STAF arctitecture from the link " http://www.research.ibm.com/journal/sj/411/rankin.html" and it says that the STAF architecture is actually a client-server model. So this needs our device should run with STAF server, right? Our device is actually a SOHO device running with our softwares over embedded Linux OS. So it is difficult to make the STAF installed in this, that we need a STAF binary compiled on power PC. Is the STAF cross-platform supported? The only way which i am seeing is actually like, consider the serial port as a resouce for STAF local process and send the Linux shell commands through this serial port and read the serial port output for the result which i have to verify for the test pass. I have given an example below which I tried here for this, c:\>staf local process start command cmd parms "/K echo 'ls' >COM1:\" Can you please inform me whether this approach is a working scenario or some other efficient way STAF is supporting through which i can manage serial port? If this is the only way, the next issue is how i can read the serial console for the result of the command which i have send to the device? I hope you can clear my questions soon so that i can reserach more on this. Thanks in advace for you help! Regards Girish On 1/21/06, David Bender <bd...@us...> wrote: Then you will need to use the Linux machines's IP address when running the command line PROCESS START or the STAX <process>. Whatever step(s) you would take to manually configure the router features through serial cable, you can execute those same steps via the STAF Process service (on the Linux machine). If some of the steps involve GUI interaction (not command line) then you would need to use the tools I mentioned earlier in this thread. Maybe if you posted a detailed example of how you manually configure the router features through serial cable, I can explain how you might do that with STAF/STAX. David Bender STAF/STAX Development 8-1268 (512-838-1268) IBM Austin Bldg. 903-5B002 Internet: bd...@us... ----- Forwarded by David Bender/Austin/IBM on 01/20/2006 01:44 PM ----- Girish <gir...@gm...> Sent by: sta...@li... 01/20/2006 11:49 AM To David Bender/Austin/IBM@IBMUS cc sta...@li..., Hag...@21... Subject Re: Fw: [staf-users] Re: Fw: need some clarification regarding the execution of STAF/STAX HI David, My 192.168.1.254 address is not Linux machine. It is the ROUTERS LAN IP address.ROUTER is running in Linux platform. I cannot install STAF in the ROUTER device which is not possible and code base of the device does not support STAF in that. The ROUTER is provided with serial cable connected to the PCs COM port (Serail port). I wanted to know how byte by byte data or string can pass from the serail port of the STAF PC to the ROUTER through the serail cable. If this is acheived then I can make the script to configure the ROUTER features through serial cable. Please help me out to know this and it will be great and thankful if can get helped out of this problem. Thanks, Girish On 1/20/06, David Bender <bd...@us...> wrote: Girish, The RC 16 means that your Windows machine could not communicate with the Linux machine (which I assume is the 192.168.1.254 address). That means that either STAF is not running on your Linux machine or that the TCP/IP communication did not work. On your Linux machine run the following to make sure STAF is running: staf local ping ping Make sure you get a PONG result. Next on your Windows machine run the following: ping 192.168.1.254 Make sure that basic TCP/IP communcation is working. Next on your Windows machine run the following: staf 192.168.1.254 ping ping Make sure you get a PONG result. David Bender STAF/STAX Development 8-1268 (512-838-1268) IBM Austin Bldg. 903-5B002 Internet: bd...@us... ----- Forwarded by David Bender/Austin/IBM on 01/20/2006 10:57 AM ----- Girish <gir...@gm... > Sent by: sta...@li... 01/20/2006 10:42 AM To David Bender/Austin/IBM@IBMUS cc sta...@li..., Hag...@21... Subject [staf-users] Re: Fw: need some clarification regarding the execution of STAF/STAX HI David, Even this did not work, it is showing the below error message while using STAX, Timestamp Message 20060120-21:50:22 STAXProcessStartError signal raised. Continuing job. with location= 192.168.1.254 request=command :16:/ramdisk/test.sh stderrtostdout returnstdout RC=16 STAFResult=STAFConnectionProviderConnect: Timed out connecting to endpoint: select() timeout: 22, Endpoint: 192.168.1.254 20060120-21:50:22 None 20060120-21:50:22 Error: RC=16, STAXResult=None Actually my PC is a Windows machine. It is connected to the ROUTER device through COM1 serail cable(9pin). PCs IP is 192.168.1.10 and the ROUTERs is 192.168.1.254 so the set up is, connected to PC (WINDOWS) (STAF/STAX) (192.168.1.10 ) --------------------------( 192.168.1.254) ROUTER (using LINUX OS) The ROUTER can be configured through the teraterm console running in the PC since PC is connected through the serail 9pin cable to DUT. I want the STAF/STAX which is also running in PC to send and execute all the commands to the teraterm console which in turn will configure the ROUTER. My script (test.sh) is just two lines as below, #! /bin/sh ls This test.sh is saved in c:\staf\testcases\test.sh in PC. I want this script to run using STAF/STAX through the serial console and get displayed in teraterm console. For this I gave, C:\>staf 192.168.1.254 process start shell command "/staf/testcases/test.sh" env CLASSPATH={STAF/ENV/Classpath};C:/STAF/testcases from command prompt of PC. It shows an error message as , Error submitting request, RC: 16 Additional info --------------- STAFConnectionProviderConnect: Timed out connecting to endpoint: select() timeou t: 22, Endpoint: 192.168.1.254 The whole theme is the ROUTER has lot of features like VPN, Firewall and etc... to be configured and tested. This I want to do from the PC having STAF installed through the serial console as mentioned before. It has to be noted Router is Linux OS and the PC is Windows OS. Please let me know what are all the steps that I have to perform to get the work done. It will be helpful if I can get the answer as soon as possible. Thanks, Girish On 1/20/06, David Bender <bd...@us...> wrote: Girish, The "RC=10 STAFResult=2" you are getting means that the Linux operating system can't find the executable you specified. You used: <command>'shell'</command> <parms>'/ramdisk/test.sh'</parms> I don't think you want 'shell' as the command (it's not a valid command on any of my Linux systems. I think instead you just want: <command>'/ramdisk/test.sh'</command> To get the output of the command returned to the STAX Monitor, add the following: <process> <location>'local'</location> <command>'/ramdisk/test.sh'</command> <stderr mode=" 'stdout' "></stderr> <returnstdout/> </process> <message log="1">STAXResult</message> Then you will see the output of the command in the STAX Monitor (and in the STAX Job User log). Note that I removed the <env> element since you don't need that for this particular <process>. David Bender STAF/STAX Development 8-1268 (512-838-1268) IBM Austin Bldg. 903-5B002 Internet: bd...@us... ----- Forwarded by David Bender/Austin/IBM on 01/20/2006 08:58 AM ----- Girish <gir...@gm... > 01/19/2006 09:53 AM To David Bender/Austin/IBM@IBMUS cc sta...@li... , Hag...@21... Subject need some clarification regarding the execution of STAF/STAX HI David, I have a shell script (test.sh) which just will perform a 'ls' operation in linux. This script I have downloaded to the teraterm console's /ramdisk.The setup is actually, PC --------LAN port of DUT DUT has a serial console and OS is Linux. PC is Windows XP. I have insalled STAF as well as STAX in my Windows PC. Please let me know if the steps I followed is correct as I am not getting the result. 1. I kept the test.sh also in c:\STAF\testcases 2. C:\>staf local process start shell command "shell test" env CLASSPATH={STAF/ENV/ Classpath};C:/STAF/testcases 3. Had an xml file under c:\STAF\XML\difficult.xml containing the following code, <?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE stax SYSTEM " stax.dtd"> <stax> <defaultcall function="main"/> <function name="main"> <sequence> <process> <location>'local'</location> <command>'shell'</command> <parms>'/ramdisk/test.sh'</parms> <env>'CLASSPATH={STAF/Env/Classpath};C:/STAF/testcases'</env> </process> <if expr="RC != 0"> <message>'Error: RC=%s, STAXResult=%s' % (RC, STAXResult)</message> <else> <message>'Process RC was 0. STAXResult=%s' % STAXResult</message> </else> </if> </sequence> </function> </stax> 3. C:\>java -jar c:/STAF/services/stax/STAXMon.jar to start the STAX Job Monitor. I brwsed the path of the xml file and started to test by pressing the Submit button. 4. I got the following error, Timestamp Message 20060119-20:45:54 STAXProcessStartError signal raised. Continuing job. with location=local request=command :5:shell parms :16:/ramdisk/test.sh env :48:CLASSPATH={STAF/Env/Classpath};C:/STAF/testcases RC=10 STAFResult=2 20060119-20:45:54 Error: RC=10, STAXResult=None 5. The main aim is I want the Linux comands (like cat, ls, etc...) which will work in tera term console to get executed and redirected and display the results in the STAX window. It will very helpful and thankful if you can confirm the feasibilty of the above scenario and if there is any corrections please let me know as soon as possible. Thanks, Girish On 1/19/06, David Bender <bd...@us...> wrote: For the GUI interaction, you would use the STAF Process service (and/or a STAX <process> element) to kick off the tool that you choose to use (such as WinRunner, LoadRunner, Rational Function Tester, etc.) and pass in the appropriate parameters. Creating the automated test via these tools is not really related to STAF, if you have questions on how you would use them to automate your tests, you would need to ask on a forum/mailing list specifc for that tool. As for the serial console, if you mean a command line program you can run from an OS shell, then you can also run that via the STAF Process service (and/or a STAX <process> element) . In this scenario it is possible to specify the STDIN option to pass input commands to the console program. You can read more about the STAF Process service at http://staf.sourceforge.net/current/STAFUG.htm#HDRPROCSRV David Bender STAF/STAX Development 8-1268 (512-838-1268) IBM Austin Bldg. 903-5B002 Internet: bd...@us... ----- Forwarded by David Bender/Austin/IBM on 01/18/2006 06:18 PM ----- Girish < gir...@gm...> Sent by: sta...@li... 01/17/2006 10:53 AM To David Bender/Austin/IBM@IBMUS cc Hag...@21..., sta...@li... Subject Re: [staf-users] Can anybody suggest me! HI David, We have GUI for our routers and gateways. We also have serial console for them. Can you please help me to know and understand how I can automate the test cases for this scenario. Will shell scripting work for this? If so how should I configure something like winrunner/loadrunner for this? Please help me to work this out as soon as possible. Thanks, Girish On 12/24/05, David Bender < bd...@us...> wrote: If these are tests that you run from a command prompt, then you can execute those tests directly via STAF/STAX using a <process> element. If the tests require GUI interaction, then you would need to use a tool like Rational Function Tester to automate the GUI interaction, and then you could execute the tests in RFT via STAF/STAX. Here is an example of executing a script via STAF/STAX: <process> <location>'machinehostname'</location> <command mode="'shell'">'/tests/runtest.sh'</command> <returnstdout/> <stderr mode="'stdout'"/> </process> <message log="1">'RC=%s, STAXResult=' % (RC, STAXResult)</message> David Bender STAF/STAX Development 8-1268 (512-838-1268) IBM Austin Bldg. 903-5B002 Internet: bd...@us... Girish < gir...@gm...> Sent by: sta...@li... 12/23/2005 11:00 AM To David Bender/Austin/IBM@IBMUS cc sta...@li..., Hag...@21... Subject Re: [staf-users] Can anybody suggest me! HI David, Thanks a lot! I actually have a test plan and I want to automate it. I saw the presentation PART 3D from which I got to know it is possible using STAF/STAX. Basically I have installed STAF 3.11 version in my local machine. I have a script for testing my router's IPSec VPN functionalites. Can you please help me out in brief that what is the exact procedure that I should follow to make my testing script automated using STAF. I will be very much thankful if you can help me as soon as possible as I am running out of time. Thanks, Girish On 12/23/05, David Bender < bd...@us...> wrote: It really depends on what you mean by "running test plan automation". If the intent is to automatically create a test plan, then STAF is not the right tool. But if you already have a test plan, and wish to automate the steps documented within the test plan, then, yes, STAF/STAX can be used to do that. I would suggest that you go through the STAF/STAX education materials (http://staf.sourceforge.net/education.php). In particular you may want to look at "Part 3D ? End-to-End Automation with STAF" ( http://staf.sourceforge.net/educ/STAF-STAX-HandsOn-Part3.ppt) charts 118-132 where we go through each phase of testing and describe how STAF/STAX can be leveraged in each phase. If you have more questions please post again. David Bender STAF/STAX Development 8-1268 (512-838-1268) IBM Austin Bldg. 903-5B002 Internet: bd...@us... Girish < gir...@gm...> Sent by: sta...@li... 12/23/2005 04:37 AM To sta...@li... cc Subject [staf-users] Can anybody suggest me! HI, I wanted to use the STAF tool. It will be helpfull if anyone can help me in knowing the below details. 1) Whether STAF can be used for running test plan automation? 2) If it can then how? 3) What is the procedure to do the same? I will be thankfull if anyone who knows about the above can help me out with solution as soon as possible. Thanks, Girish |