citrus icon indicating copy to clipboard operation
citrus copied to clipboard

Citrus html report doesn't register the skipped tests in its citrus report as "Skipped"

Open ppahari opened this issue 4 years ago • 1 comments

Citrus Version dependencies { compile group: 'org.testng', name: 'testng', version: '6.14.3' compile group: 'junit', name: 'junit', version: '4.12' compile group: 'com.consol.citrus', name: 'citrus-core', version: '2.8.0' compile group: 'com.consol.citrus', name: 'citrus-java-dsl', version: '2.8.0' compile group: 'org.testng', name: 'testng', version: '6.14.3' implementation(group: 'junit', name: 'junit', version: '4.12') implementation 'io.reactivex.rxjava2:rxjava:2.2.20' }

Expected behavior when test1 fails test 2 is skipped by testNG , citrus reports is supposed to show the skipped count in its citrus html report

Actual behavior when test1 fails test 2 is skipped by testNG , but citrus reports fails to show the skipped count in its citrus html report

Test case sample

public class InitialTest extends TestNGCitrusTestRunner {

@Parameters("context")
@Test
@CitrusTest(name = "test1")
public void test1( @Optional @CitrusResource TestContext context){
    System.out.println("test1");
    fail("I am failing");
}

@Parameters("context")
@Test(dependsOnMethods = "test1")
@CitrusTest(name = "test2")
public void test2( @Optional @CitrusResource TestContext context){
    System.out.println("test2");
}

}

ppahari avatar Feb 13 '21 21:02 ppahari

Tests that are skipped because of TestNG dependsOnMethods="foo" are not supported yet

Would need to find a way to hook into the skip operation of TestNG in order to reflect this also in Citrus reports. Not sure if this is even possible.

christophd avatar Feb 23 '21 09:02 christophd