When using the IN_PROGRESS TestCaseStep result, the information returned in such steps in the TestCaseResult is overwritten with the results of the final result for that step.
For example, use the following minimal test script to replicate this:
var TestCaseStepResult = Java.type("pl.baczkowicz.spy.testcases.TestCaseStepResult");
var TestCaseStatus = Java.type("pl.baczkowicz.spy.testcases.TestCaseStatus");
var count = 0;
var getInfo = function ()
{
var TestCaseInfo = Java.type("pl.baczkowicz.spy.testcases.TestCaseInfo");
var info = new TestCaseInfo();
info.setName("Just one test step");
info.getSteps().add("Test skipping several times");
return info;
};
var step1 = function ()
{
count++;
if (count > 5)
{
return new TestCaseStepResult(TestCaseStatus.FAILED, "No messages received");
}
return new TestCaseStepResult(TestCaseStatus.IN_PROGRESS, "Skipping on iteration " + count);
};
The debugger shows the following. I would expect the red underlined values to have text "Skipping on iteration N" and a TestCaseStatus of IN_PROGRESS.
When using the IN_PROGRESS TestCaseStep result, the information returned in such steps in the TestCaseResult is overwritten with the results of the final result for that step.
For example, use the following minimal test script to replicate this:
The debugger shows the following. I would expect the red underlined values to have text "Skipping on iteration N" and a TestCaseStatus of IN_PROGRESS.