Dear Staff users,Sharon

Is it possoble to get the return code of process and compair to get the pass
fail reust:

example:

i have a fun.xml file which has the functions written  to run the differnt
exe with required arguments
examples:



Fun.xml:
------------

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

<stax>
-----------------------------------------------
<function name="Function1">
      <sequence>
 <script>
 parms = abcd
 parms = '%s' % (parms)
</script>
            <process>
    <location>MachineToRun</location>
    <command mode="'shell'">'%s %s'%(Function1,parms)</command>
       <stderr mode="'stdout'"/>
        <returnstdout/>
      </process>
           <log message="1">'Process RC: %s, STAFResult: %s, STAXResult: %s'
% (RC, STAFResult, STAXResult)</log>
<if expr = "RC != 0">
<message>'Error:Something Worng.Please check'</message>
<else>
<message>'Executed successfully'</message>
</else>
</if>
<script>rc1= RC</script>
<return>rc1</return>
<log message="1">rc1</log>
   </sequence>
 </function>

-----------------------------------------
<function name="Function2">
         <sequence>
<script>
parms = cdef
</script>

      <process>
    <location>MachineToRun1</location>
    <command mode="'shell'">'%s %s'%(Function2,parms)</command>
        <stderr mode="'stdout'"/>
        <returnstdout/>
      </process>

      <log message="1">'Process RC: %s, STAFResult: %s, STAXResult: %s' %
(RC, STAFResult, STAXResult)</log>
<log message="1">'Process RC: %s' %(RC)</log>
   <if expr = "RC != 0">
 <message>'Error:Something Worng.Please check'</message>
   <else>
 <message>'Executed successfully'</message>
 </else>
  </if>
<script>rc2= RC</script>
<log message="1">rc2</log>
<return>rc2</return>
</sequence>
 </function>

----------------------------------------

----------------------------------------
TC.xml: This file calls (only calls) the functions written in fun.xml
(Fun.xml will run the process (exe) and  retuns the RC of the process , but
i can not use those RC in TC.xml to compair and get the status pass or fail,
i need to decied (pass,fail) that in TC.xml)
--------
<function name="main">


<sequence>

<import machine="ImportMachine" file="File1"/>

<import machine="ImportMachine" file="File2"/>



 <testcase name = "'TC1'">

 <sequence>



<parallel>

 <call function="'Function1'">[remoteSystem]</call>

 <call function="'Function2'">[localSystem]</call>

</parallel>


from here how can i get the return code of the process ran on fun.xml and
compair to get decide the test case pass or fail.
is it possible to get the process return code from fun.xml in this TC.xml
and compair return codes in TC.xml to get the pass or fail result for each
test

case.


<if expr ="'RC1' == 'RC2' == 0">

 <!--<if expr = "'RC==0'">-->

<tcstatus result = "'PASS'"/>

<else>

<tcstatus result = "'Fail'"/>



Please help me to solve this. Is there any other method to procees on this.
------------------------------------------------------------------------------
Using storage to extend the benefits of virtualization and iSCSI
Virtualization increases hardware utilization and delivers a new level of
agility. Learn what those decisions are and how to modernize your storage 
and backup environments for virtualization.
http://www.accelacomm.com/jaw/sfnl/114/51434361/
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users

Reply via email to