how to rerun skipped test

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

how to rerun skipped test
This post has NOT been accepted by the mailing list yet.
Hi I have a skipped test as ite dependency failed.

@Test(dependsOnMethods = "failinTestCaseWithDependency", retryAnalyzer = RetryAnalyzer.class)
        @TM(tcid = 123471)
        public void skippedTestCase() {
                logInfo(tcID, "*************************skippedTestCaseDueToDependency called **********");

        @Test( retryAnalyzer = RetryAnalyzer.class )
        @TM(tcid = 123471)
        public void failinTestCaseWithDependency() {
                if (reRunFlag == 0) {
                        reRunFlag = 1;

                logInfo(tcID, "***********************Passing the test 2nd time.");
failinTestCaseWithDependency fails for the first run as a result skippedTestCase get skipped. Due to retry analyzer failinTestCaseWithDependency  get run 2nd time and passes. But skipped test wont get rerun though i implemented retry logic in onTestSkipped.  Please let me know how to handle rerun SKIPPED tests.