WileyLabs / teasy

Test easy with Teasy - UI automation testing framework
MIT License
31 stars 31 forks source link

Stacktrace doesn't contain references for place with null object if the nullPointerException appears #179

Closed QL-Anton closed 6 years ago

QL-Anton commented 6 years ago

If an unhandled NullPointerException is thrown we can't see a reference to a place with a null object in the code. Stack trace looks like:

java.lang.NullPointerException at com.wiley.assertions.TeasyError.getErrorMessage(TeasyError.java:18) at com.wiley.assertions.SoftAssert.add(SoftAssert.java:37) at com.wiley.basetests.SeleniumBaseTest.setThrowable(SeleniumBaseTest.java:28) at com.wiley.basetests.BaseTest.run(BaseTest.java:53) at org.testng.internal.MethodInvocationHelper.invokeHookable(MethodInvocationHelper.java:209) at org.testng.internal.Invoker.invokeMethod(Invoker.java:639) at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:820) at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1128) at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:129) at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:112) at org.testng.TestRunner.privateRun(TestRunner.java:782) at org.testng.TestRunner.run(TestRunner.java:632) at org.testng.SuiteRunner.runTest(SuiteRunner.java:366) at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:361) at org.testng.SuiteRunner.privateRun(SuiteRunner.java:319) at org.testng.SuiteRunner.run(SuiteRunner.java:268) at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52) at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86) at org.testng.TestNG.runSuitesSequentially(TestNG.java:1244) at org.testng.TestNG.runSuitesLocally(TestNG.java:1169) at org.testng.TestNG.run(TestNG.java:1064) at org.testng.IDEARemoteTestNG.run(IDEARemoteTestNG.java:72) at org.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:123)

It would be nice to have more informative stack trace

QL-Anton commented 6 years ago

It's actual for teasy - simple. Close this defect.