Hi all,

I have my framework defined in STAF/STAX. I am using the STAF/STAX to run
the fitness test cases in parallel. In the fitness test case I am using the
SEND message method to send the test case result back to STAF. And depending
on RC I am marking the test case PASS/FAIL in QC and changing he defect
status in ETRACK. 

Here I have written below functions. Here I am able to run the test cases on
remote machine. I have used process element to run test cases on remote
machine. But the issue is when the test case is PASS/FAIL i am getting the
RC two times. One is if the test case is launched on remote machine then I
am getting RC code as 0 and second is from my test case I am sending the
message PASS/FAIL. Now the issue is when the test case is failed I am
getting the RC code is 0(coz the test case is launched successfully.) and
then 1 (From the the test case result where  I have used to send the Fail
message to the STAF).

Here I want the RC code which is returned from my test case(PASS/FAIL). How
can I suppress the process element RC code and get the actual test case
code. My functions are written as below (Fitnesse is my function name)

  <if expr="TestComponent == 'Fitnesse'">
          <sequence>
            <!--pname2 = '"SecurityTemplates?suite"'-->
            <script>
              jarName = 'C:\\\Fitnesse\\fitnesse-standalone.jar'
              cmd = 'java'
              param1 = ' -jar '
              pname1 = " -c "
              
              var1 = '?test'
              pname2 = TestDriverName + var1
             myworkdir = 'C:\\\Fitnesse'
              pname3 = ' -b "C:\FitnesseResults.html"'
              pname4 = ' -p 8080'
            </script>

            <log message="1">'%s %s %s %s %s %s %s' % (cmd, param1, jarName,
pname4, pname1,pname2,pname3)</log>
            <process>
              <location>machine</location>
              <command mode="'shell'">'%s %s %s %s %s %s %s' % (cmd, param1,
jarName, pname4, pname1,pname2,pname3)</command>
              <workdir>myworkdir</workdir>
            </process>
            <script>
              SendResult ='C:\\Automation_STAF\\Dependacies\\ParseResults.exe'
              newworkdir ='C:\\Automation_STAF\\Dependacies'
            </script>
            <process>
              <location>machine</location>
              <command mode="'shell'">'%s %s' %
(SendResult,TestDriverName)</command>
              <workdir>newworkdir</workdir>
            </process>
          </sequence>
        </if>
  
        <if expr="RC == 0">
          
          <sequence>
            <log message="1">RC</log>
            <tcstatus result="'pass'"/>
            <script>val = 'Passed'</script>
            <call function="'RunTestsInQC'">TCID,val</call>
            <call function="'Etrack'">TCID,TestDriverName,"PASS"</call>
          </sequence>
        </if>

        <if expr="RC != 0">
          
          <sequence>
            <log message="1">RC</log>
            <!--<tcstatus result="'fail'">'RC=%s ' % (RC)</tcstatus>-->
            <call function="'RunTestsInQC'">TCID,"Failed"</call>
            <call function="'Etrack'">TCID,TestDriverName,"FAIL"</call>
          </sequence>
        </if>


In the If statement I am checking the RC code returning from the test cases.
But here I am getting the RC value 2 times. One from the process element and
second from the test case. How can I check the value from test case only?

Thanks in advance.



------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users

Reply via email to