Closed daroshchanka closed 5 years ago
@avarabyeu could you please look at this issue?
Hi, @avarabyeu. I just removed the line with startConfiguration https://github.com/reportportal/agent-java-testNG/blob/854985c1488e6548ce69fedf24a61472d3f35abb/src/main/java/com/epam/reportportal/testng/BaseTestNGListener.java#L124
This fix works for us.
class MyReportPortalTestNGListener extends BaseTestNGListener {
//static instance with lazy init
private static final Supplier<ITestNGService> SERVICE = Suppliers.memoize(new Supplier<ITestNGService>() {
@Override
public ITestNGService get() {
return new TestNGService()
}
});
public MyReportPortalTestNGListener() {
super(SERVICE.get())
}
@Override
public void onConfigurationSkip(ITestResult testResult) {
SERVICE.get().finishTestMethod(Statuses.SKIPPED, testResult)
}
}
I checked fix under several projects, no side effects detected. Is this line needed? :)
@daroshchanka yeah, the line is needed for reporting method as skipper. Thank a lot for raising it up!
@daroshchanka Hello, i fixed the problem. Here is the branch with the fix - https://github.com/reportportal/agent-java-testNG/tree/issue28 Could you try it with your tests ?
@filland Works for me.
@daroshchanka this fix is already in the latest published version
@filland It is not working for me on version 7.0.0-beta6. SkipException on any Before method (before class, before suite, before method) makes the execution to stuck.
In the attached capture we can see that the method "getTmsVersionprintCurrentClass" (whice is annotated @BeforeClass) is stuck on InProgress, and so are all the Before methods after it (the methods "deleteAllMockDcs" & "temp" are @Test annotated but also didn't run properly.
@NiliMe this might happen since the agent using testng 6.14.3
@filland which agent is it? How can I upgrade the Testng version? I'm running using Intellij (latest version) and surefire plugin (2.19.1)
@NiliMe the latest version of reportportal testng agent developed using testng 6.14.3. I am going to investigate the reason why it does not work with testng 7.0.0.*. I also recommend you to not use 7th version of testng (if possible) since it is in beta stage.
Seems, SkipException in Before/After methods not handled correctly.
Problem actual for Before/After Suite, Before/After Test, Before/After Class, Before/After Method. Before/After Group not tested.
1 Test launch hangs and not finished
2 Counfiguration methods duplicated
error.log
To Reproduce (groovy code)