NPE for skipped test
pskvortsov opened this issue · 1 comments
pskvortsov commented
Libs:
rpTestngAgentVersion = '4.0.1'
rpLog4jVersion = '4.0.0'
rpLogbackVersion = '4.0.0'
testngVersion = '6.14.2'
Steps to reproduce:
- Create Example.java
import org.testng.Assert;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
public class Example {
@BeforeMethod
public void before() {
Assert.assertTrue(false);
}
@Test
public void test() {
Assert.assertTrue(true);
}
}
- Add it to testng.xml
<test name="Example test">
<classes>
<class name="Example" />
</classes>
</test>
- Run via command line
./gradlew clean test
Actual result:
- test failed by NPE
java.lang.NullPointerException
at com.epam.reportportal.testng.TestNGService.buildFinishTestMethodRq(TestNGService.java:324)
at com.epam.reportportal.testng.TestNGService.finishTestMethod(TestNGService.java:155)
at com.epam.reportportal.testng.BaseTestNGListener.onTestSkipped(BaseTestNGListener.java:103)