innovativeQALab / iqa-automation-framework

Selenium WebDriver and Appium based Web, Mobile (Android, iOS) and Windows desktop Automation Framework with BDD & Non-BDD implementation support
Apache License 2.0
12 stars 4 forks source link

Getting 'NullPointerException' while executing API test cases where test result is as expected. #39

Closed jagrutim22 closed 2 years ago

jagrutim22 commented 2 years ago

TestNG Trace:

java.lang.NullPointerException: Cannot invoke "org.testng.asserts.SoftAssert.assertAll()" because the return value of "org.iqa.suite.commons.AssertionFactory.getSoftAssert()" is null at org.iqa.test.runner.ParallelTestRunner.runScenarios(ParallelTestRunner.java:22) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:567) at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:134) at org.testng.internal.TestInvoker.invokeMethod(TestInvoker.java:597) at org.testng.internal.TestInvoker.invokeTestMethod(TestInvoker.java:173) at org.testng.internal.TestMethodWithDataProviderMethodWorker.call(TestMethodWithDataProviderMethodWorker.java:77) at org.testng.internal.TestMethodWithDataProviderMethodWorker.call(TestMethodWithDataProviderMethodWorker.java:15) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630) at java.base/java.lang.Thread.run(Thread.java:831)

bhangeprashant commented 2 years ago

@jagrutim22 The fix version 0.2.1 is available for this issue. Could you please try with this version and share the outcome?

jagrutim22 commented 2 years ago

Hello @bhangeprashant , new version fixed the issue and API test case is now getting executed with no error/exceptions. Thanks for fixing the issue.