Forum Discussion

Jazz's avatar
Jazz
Occasional Contributor
9 years ago
Solved

How to set test case to OK by a script?

Hello

 

In my test case, i have test step, that may fall in failed (red) state. In that case, i use script to wait few minutes and re-run test step again. (Beacose web service needs a little time before he process infromation from previous web services)

Im doing this until test step switch to OK (green) state, in that case I normaly continue throught rest of test case.

 

But when my test step switch to OK, the test case still stay in failed (red) state.

 

So can i set test case to OK (green) state by a script? How?

  • I was saying earlier that it needs to be in the test execution flow only based on some condition, can't explicitly do it which makes sensible as well. For eg: what any one gets by just change a failed to pass vice versa?

9 Replies

  • nmrao's avatar
    nmrao
    Champion Level 3

    Not sure how exactly your tests are designed and executed. But one thing is sure in such scenario, use "Conditional Goto" step. Otherwise, execute the step that you think it requires time delay by adding a delay step.

    • Jazz's avatar
      Jazz
      Occasional Contributor

      That doesnt really help.

       

      I add 2 attachements where u may see what i have and what is my target.

       

      I cant add delay with constat time, beacose i never know, when web service finish his work and fall in green.

      • nmrao's avatar
        nmrao
        Champion Level 3

        Two options(conditional goto or delay) I mentioned earlier, based on the context, choose appropriate one which suites your case.
        Agree that you do not know the outcome/span of time, but there should be some kind of SLA that the operation would get finished. Otherwise, if you are getting some kind of status, then it should be only failed based on some response data by the use of assertions. Little wonder if you don't have such situation.