First, you need to understand that each STAX job executed has its own 
testcase results (and each STAX job can be monitored individually).  So, 
if you execute another STAX job by using a <stafcmd> element to execute a 
STAX EXECUTE request, the STAX job that is executed is a separate job so 
its testcase results are its own and are not part of the STAX job that 
submitted that sub-job.  You could get the testcase results of each job 
executed by adding the RETURNRESULT and DETAILS options to the STAX 
EXECUTE requests that you are submitting via <stafcmd> elements in your 
STAX job as then the job completion results, including information like 
job status, result, errors logged in the job log, testcase totals, etc 
will be provided in the result.  You could also add the DETAILS option to 
the STAX EXECUTE requests if you also wanted detailed completion results 
for the job, including a list of the individual testcase results.

Note that (instead of using a <stafcmd> to submit a STAX EXECUTE request, 
it is usually preferable to use the <job> element to execute a sub-job. 
Note that after the <job> element has completed, it sets variables such as 
RC, STAFResult (the result returned by the starting function of the 
sub-job), STAXSubJobID, and STAXSubJobStatus (the status of the sub-job, 
e.g. Normal, Terminated, Abnormal, or Unknown).  For more information on 
the <job> element, see section "job: Execute a STAX Sub-Job" in the STAX 
User's Guide at 
http://staf.sourceforge.net/current/STAX/staxug.html#Header_SubJob.  If 
you also wanted detailed completed results for the sub job, you could use 
a <stafcmd> to submit a STAX GET RESULT JOB <Job ID> DETAILS request after 
the <job> element.

Or, if you don't want to have each .xml file executed as a separate STAX 
job (which results in separate testcase results for each job), you could 
possibly use the <import> element in your main STAX job to import all the 
functions from these other STAX xml files and then call the starting 
function for each .xml file (using the <call> element to call each 
starting function).  Then all of these functions would all be run as part 
of a single STAX job (instead of multiple separate STAX jobs) and you 
could get the complete testcase results for all functions executed.  For 
more information on the <import> element, see section "import: Import 
Functions From Other STAX XML Job Files" in the STAX User's Guide at 
http://staf.sourceforge.net/current/STAX/staxug.html#Header_Import

--------------------------------------------------------------
Sharon Lucas
IBM Austin,   luc...@us.ibm.com
(512) 286-7313 or Tieline 363-7313




From:   Cyril SANTUNE <cyril.sant...@gmail.com>
To:     staf-users@lists.sourceforge.net, 
Date:   07/04/2013 11:23 AM
Subject:        [staf-users] [STAX] Get the testcase status of a remote 
stax job        easily ?




Hi,

I want to create a library of testcase and call these testcases on local 
and remote machines.
So I make several files :
testcase01.xml
testcase02.xml
testcase03.xml
testcase04.xml
.....


A testcase can contain other testcase.

For example 
testcase04.xml
--------------------------------------------------------------------------------------------
....
 <stafcmd name="'sub_testcase01'">
  <location>A</location>
   <service>'STAX'</service>
<request>
  'EXECUTE FILE testcase01.xml CLEARLOGS ENABLED WAIT'
</request>
</stafcmd>
.....
--------------------------------------------------------------------------------------------
 


testcase01.xml
--------------------------------------------------------------------------------------------
 

....
<sequence>
    <testcase name="'testcase01'"> 
       <stafcmd name="...'">
         .....
       <tcstatus result="'pass'">'100% complete'</tcstatus>
   </testcase>
....
--------------------------------------------------------------------------------------------
 



The problem is that if I run the testcase04.xml, the testcase name 
"testcase01" in testcase01.xml not appear in monitor.
So, is there a easy way to return the result of a "sub testcase" ?

I can parse the log with the correct job ID but maybe there is a better 
way to achieve this.
I also try subjob but it doesn't help.

Another idea to make this kind of testing ?


------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users

Reply via email to