qaf icon indicating copy to clipboard operation
qaf copied to clipboard

data driven and retry combination problem

Open amitbhoraniya opened this issue 8 years ago • 2 comments

For data driven scenario when retry.count is used, then it retries for the passed testcases also.

Step To Reproduce

SCENARIO: SampleTest
META-DATA: {"description":"Sample Test Scenario","groups":["SMOKE"],"dataFile":"resources/testdata.xls","sheetName":"datasheet"}
	
	COMMENT: '${recId}'
	Given login step
	
END

Testdata

image

Step Implementation

public class StepsBackLog {
	public static int count = 0;
	@QAFTestStep(description = "login step")
	public void loginStep() {
		count = count + 1;
		if (count <= 1) {
			throw new NullPointerException("Failure to test retry");
		}
	}
}

And retry.count=2

Actual Result image

Expected Result: It should not retry for pass testcases, here it retries for TD2 and TD3 even it was passed.

amitbhoraniya avatar Jan 24 '17 13:01 amitbhoraniya

With TestNG 6.10, datadriven retry behavior is working as expected but still issue in counts.

amitbhoraniya avatar Feb 02 '17 12:02 amitbhoraniya

@amitbhoraniya can you provide more details about issue in count?

With 3.0.0 new implementation of reporting is available that can be enabled by setting disable.qaf.testng.reporter=true. It should report correct count with or without retry.

cjayswal avatar Sep 04 '20 23:09 cjayswal