-
Notifications
You must be signed in to change notification settings - Fork 363
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Getting null pointer in Before methods #533
Comments
You can't use @BeforeClass in your test as ATD implements ITestListners you need to create your Listener and add it from config.properties |
Thanks for the quick response @saikrishna321 |
@saran1992 I found something needs to be changed to get this working. Marking this as a bug |
@saran1992 Fix in master Currently, we only support using @BeforeMethod and @AfterMethod for setting test status and any setup that needs to be setUp globally will get into Listeners which be part of #540 |
Hi @saikrishna321 , The fix works fine when we run a single class from Runner.java org.openqa.selenium.NoSuchSessionException: Session ID is null. Using WebDriver after calling quit()? Driver info: driver.version: AndroidDriver |
What's happening in this ?? |
public LoginPage(AppiumDriver driver) { |
@saran1992 I'm unable to reproduce. |
…afterxxx method in test class.
Fixed in v11.0.2 |
This is my test class. Am I missing anything?
public class LoginTests{
}
Error log:
java.lang.NullPointerException
at com.appium.manager.TestLogger.endLogging(TestLogger.java:68)
at com.appium.manager.AppiumParallelTestListener.afterInvocation(AppiumParallelTestListener.java:84)
at org.testng.internal.invokers.InvokedMethodListenerInvoker$InvokeAfterInvocationWithoutContextStrategy.callMethod(InvokedMethodListenerInvoker.java:100)
at org.testng.internal.invokers.InvokedMethodListenerInvoker.invokeListener(InvokedMethodListenerInvoker.java:62)
at org.testng.internal.Invoker.runInvokedMethodListeners(Invoker.java:566)
at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:545)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:224)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:146)
at org.testng.internal.TestMethodWorker.invokeBeforeClassMethods(TestMethodWorker.java:166)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:105)
at org.testng.TestRunner.privateRun(TestRunner.java:744)
at org.testng.TestRunner.run(TestRunner.java:602)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:380)
at org.testng.SuiteRunner.access$000(SuiteRunner.java:39)
at org.testng.SuiteRunner$SuiteWorker.run(SuiteRunner.java:414)
at org.testng.internal.thread.ThreadUtil$1.call(ThreadUtil.java:52)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
The text was updated successfully, but these errors were encountered: