[JBoss JIRA] (ARQGRA-184) Using driver in test listener causes NullPointerException
by Jan Papousek (JIRA)
Jan Papousek created ARQGRA-184:
-----------------------------------
Summary: Using driver in test listener causes NullPointerException
Key: ARQGRA-184
URL: https://issues.jboss.org/browse/ARQGRA-184
Project: Arquillian Graphene
Issue Type: Bug
Affects Versions: 2.0.0.Alpha1
Reporter: Jan Papousek
Assignee: Lukáš Fryč
[This listener|https://github.com/richfaces/qa/blob/master/testng-listeners/src...] uses driver take a screenshot on test failure. Unfortunately it throws the following exception because the GrapheneContext doesn't contain any driver instance:
{code}
org.apache.maven.surefire.util.SurefireReflectionException: java.lang.reflect.InvocationTargetException; nested exception is java.lang.reflect.InvocationTargetException: null
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:113)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)
Caused by: java.lang.NullPointerException: context is null - it needs to be setup before starting to use it
at org.jboss.arquillian.graphene.context.GrapheneContext.get(GrapheneContext.java:88)
at org.jboss.arquillian.graphene.context.GrapheneContext$1.getTarget(GrapheneContext.java:145)
at org.jboss.arquillian.graphene.proxy.GrapheneProxyHandler.getTarget(GrapheneProxyHandler.java:222)
at org.jboss.arquillian.graphene.proxy.GrapheneProxyHandler.invokeReal(GrapheneProxyHandler.java:204)
at org.jboss.arquillian.graphene.proxy.GrapheneProxyHandler$1.invoke(GrapheneProxyHandler.java:137)
at org.jboss.arquillian.graphene.proxy.GrapheneProxyHandler.invoke(GrapheneProxyHandler.java:166)
at $Proxy1.getScreenshotAs(Unknown Source)
at org.jboss.test.selenium.listener.FailureLoggingTestListener.onFailureForSelenium2(FailureLoggingTestListener.java:174)
at org.richfaces.tests.metamer.ftest.MetamerFailureLoggingTestListener.onFailure(MetamerFailureLoggingTestListener.java:59)
at org.jboss.test.selenium.listener.FailureLoggingTestListener.onConfigurationFailure(FailureLoggingTestListener.java:79)
at org.testng.internal.Invoker.runConfigurationListeners(Invoker.java:1797)
at org.testng.internal.Invoker.handleConfigurationFailure(Invoker.java:323)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:226)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:130)
at org.testng.internal.TestMethodWorker.invokeBeforeClassMethods(TestMethodWorker.java:173)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:105)
at org.testng.TestRunner.runWorkers(TestRunner.java:1178)
at org.testng.TestRunner.privateRun(TestRunner.java:757)
at org.testng.TestRunner.run(TestRunner.java:608)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291)
at org.testng.SuiteRunner.run(SuiteRunner.java:240)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1158)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1083)
at org.testng.TestNG.run(TestNG.java:999)
at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:178)
at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:92)
at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:96)
... 9 more
{code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 1 month
[JBoss JIRA] (ARQGRA-194) Mark a test so it will only run against certain browsers
by Brian Leathem (JIRA)
Brian Leathem created ARQGRA-194:
------------------------------------
Summary: Mark a test so it will only run against certain browsers
Key: ARQGRA-194
URL: https://issues.jboss.org/browse/ARQGRA-194
Project: Arquillian Graphene
Issue Type: Feature Request
Reporter: Brian Leathem
It would be useful to be able to annotate a particular test so it will only run when driven by a particular set of browsers.
Some sample use cases:
# Some tests cannot target the incomplete js impl found in html unit. I would mark such tests not to run when htmlunit is the configured browser (in CI for instance)
# Some tests may target non-standard behaviour in certain browsers (older IE versions for instance) and may not make sense to run in all browsers. I would mark such tests not to run only when IE is the configured browser.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 2 months