I already showed you in previous responses the STAX EXECUTE command to run
the STAX job without the STAX Monitor (the command that the STAX Monitor
runs under the covers to execute a STAX job). Here it is again (copied
from a previous response):
STAF local STAX EXECUTE FILE C:/stax/returnJobResult.xml WAIT RETURNRESULT
DETAILS
1) What command/API Stax monitor runs internally , so that i can call the
same command/API to do my work.
STAF local STAX EXECUTE FILE C:/stax/returnJobResult.xml
Yes.
2)What stax monitor refers to present the datas.
The STAX service sends events and the STAX Monitor registers to listen for
these events in order to get some information about the actions that a
STAX job is doing, and in some cases submits additional STAX QUERY
requests to get more detailed information. For more information on the
events that the STAX service generates, see section "Events Generated by
STAX that Provide Job Status" in the STAX User's Guide at
http://staf.sourceforge.net/current/STAX/staxug.html#Header_STAXEvents.
3) Does stax monitor, monitors the "system under test" as a live user (
like a user does ) , or it just keep polling individual test case status??
I answered this in 2).
4) Apart from test case status( in a job) monitor , what other feature
stax monitor supports, like can it monitor system hang, core dumps,
timeout scenarios,
See section "STAX Monitoring" in the STAX User's Guide at
http://staf.sourceforge.net/current/STAX/staxug.html#Header_StaxMonitoring
for detailed information on what the STAX Monitor monitors in a STAX job.
The STAX Monitor monitors STAX jobs, not system hangs or core dumps. A
message is sent to the STAX Monitor if an attempt to start a process timed
out. I'm not sure if that's what you meant by a timeout scenario.
The STAX Monitor application displays a real-time graphical representation
of the currently running elements of a given STAX job.
- The STAX Monitor application displays a list of all active jobs and an
indication of which jobs are currently being monitored.
-The STAX Monitor application also provides a graphical user interface for
the EXECUTE request which allows you to submit new jobs for execution and
monitor the job from its beginning, if desired. For each job that is
monitored, the STAX Monitor application displays all currently executing
<process>, <stafcmd>, <block>, and <job> elements for a STAX job. The
graphical representation is a tree format, in order to show the hierarchy
of the currently executing elements. The STAX Monitor application allows
you to control the execution of the job by selecting a <block> element to
hold, release, or terminate.
- The STAX Monitor application also displays any testcases that have been
executed and their status as well as any messages that have been sent via
<message> elements or from the STAX service itself.
- The STAX Monitor also displays all of the threads that are currently
running in a STAX job, and allows you to interact with any breakpoints
that are set for the STAX jobl
5) Can I handle all these scenarios with stax monitor.
Answered in 4).
--------------------------------------------------------------
Sharon Lucas
IBM Austin, luc...@us.ibm.com
(512) 286-7313 or Tieline 363-7313
From: babmis <bab...@outlook.com>
To: Sharon Lucas/Austin/IBM@IBMUS,
Date: 07/29/2013 08:41 AM
Subject: Re: [staf-users] simple stax script
Thanks Sharon,
As mentioned in my previous query , Is it possible to do the same without
opening GUI ( i mean silently or in backend writing to file etc....), so i
can refer to the logs or the file and extract the required info .
Is it possible??
1) what command/API Stax monitor runs internally , so that i can call the
same command/API to do my work.
2)What stax monitor refers to present the datas.
3) Does stax monitor, monitors the "system under test" as a live user (
like a user does ) , or it just keep polling individual test case status??
4) Apart from test case status( in a job) monitor , what other feature
stax monitor supports, like can it monitor system hang, core dumps,
timeout scenarios,
5) Can I handle all these scenarios with stax monitor.
Thanks.
On 7/29/2013 5:23 PM, Sharon Lucas wrote:
You can start the STAX Monitor via the command line as described in
section "Starting the STAX Monitor" in the STAX User's Guide at
http://staf.sourceforge.net/current/STAX/staxug.html#Header_StartMonitor.
For example to start the STAX Monitor for a STAX job with job ID 1 that is
already running,
java -jar STAXMon.jar -job 1
--------------------------------------------------------------
Sharon Lucas
IBM Austin, luc...@us.ibm.com
(512) 286-7313 or Tieline 363-7313
From: babmis <bab...@outlook.com>
To: Sharon Lucas/Austin/IBM@IBMUS,
Date: 07/28/2013 11:29 PM
Subject: Re: [staf-users] simple stax script
Hi ,
Thanks for the response ,can you please tell me how do i'll call stax
monitor with command line, i don't want to use the the GUI for my
automation, my intention is I'll submit a job and will monitor the job in
backend.
Thanks,
Srikant
On 7/25/2013 6:37 PM, Sharon Lucas wrote:
If you want a STAX job's result to be set to a message then you need to
return that message from the STAX job's main function using the <return>
element.
For example:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE stax SYSTEM "stax.dtd">
<stax>
<defaultcall function="test"/>
<function name="test">
<sequence>
<script>command = 'ls /'</script>
<!-- Run a command (e.g. "ls /")and return its stdout/stderr -->
<process>
<location>'local'</location>
<command mode="'shell'">command</command>
<stderr mode="'stdout'"/>
<returnstdout/>
</process>
<if expr="RC == 0">
<script>lsOutput = 'Output from "%s" command:\n%s' % (command,
STAXResult[0][1])</script>
<else>
<script>
lsOutput = '"%s" failed with RC=%s, STAFResult=%s,
STAXResult=%s' % \
(command, RC, STAFResult, STAXResult)
</script>
</else>
</if>
<message log="1">lsOutput</message>
<!-- Get the current date-time -->
<script>
from time import localtime, strftime
currentTime = strftime("%a, %d %b %Y %H:%M:%S", localtime())
</script>
<message log="1">'Current date-time: %s' % currentTime</message>
<!-- Create a result containing "Hello world", the current date-time,
and output from "ls /" command -->
<script>result = 'Hello world @ %s.\n%s' % (currentTime,
lsOutput)</script>
<!-- Log the result in the STAX Job User Log and send to the STAX
Monitor messages -->
<message log="1">result</message>
<!-- Return the result -->
<return>result</return>
</sequence>
</function>
</stax>
You can submit a STAX EXECUTE request to run this STAX job and wait for it
to complete and return its job result as follows:
# STAF local STAX EXECUTE FILE C:/stax/returnJobResult.xml WAIT
RETURNRESULT DETAILS
Response
--------
{
Job ID : 12
Start Date-Time: 20130725-08:02:14
End Date-Time : 20130725-08:02:15
Status : Normal
Result : Hello world @ Thu, 25 Jul 2013 08:02:15.
Output from "ls /" command:
Cygwin.bat
Cygwin.ico
Thumbs.db
bin
cygdrive
dev
etc
home
lib
proc
tmp
usr
var
Job Log Errors : []
Testcase Totals: {
Tests : 0
Passes: 0
Fails : 0
}
Testcases : []
}
For more information on the <return> element, see section "return: Return
from a Function" in the STAX User's Guide at
http://staf.sourceforge.net/current/STAX/staxug.html#Header_Return
--------------------------------------------------------------
Sharon Lucas
IBM Austin, luc...@us.ibm.com
(512) 286-7313 or Tieline 363-7313
From: babuni mishra <bab...@outlook.com>
To: "staf-users@lists.sourceforge.net"
<staf-users@lists.sourceforge.net>,
Date: 07/25/2013 06:46 AM
Subject: [staf-users] simple stax script
Hi ,
I am a newbie to STAX, wants to use in my automated solution in Linux Env.
Can any one share me a sample stax script which will return me
1) hello world message & current date & output of 'ls' (unix command)
both in STDOUT & in a file.
I have followed couple of blogs, executed sample stax script aswell, but
not able to get the result , it always comes as
Result : None
Thanks,
Bab
------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users
------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users