Getting NPE when group is included - selenium

I hope you can help me on the following issue...
I am running a test that includes one class, in this class I have two methods. One belong to group G1 and the other one to G2.
If I use exclude group, the test is executed, if I use include group, test is skipped getting NPE.
I am using Eclipse 3.6 , Testng 6.8.
Example:
Test class:
public class{
#Test (groups = {"G1"})
public void Test1(){
...test code...
}
#Test (groups = {"G2"})
public void Test2(){
...test code...
}
}
Works:
<test name="Test_Name" preserve-order="true" >
<groups>
<run>
<exclude name="G1"/>
</run>
</groups>
<classes>
<class name="Test.class" />
</classes>
</test>
Test2 is executed.
Fails:
<test name="Test_Name" preserve-order="true" >
<groups>
<run>
<include name="G1" />
</run>
</groups>
<classes>
<class name="Test.class1" />
</classes>
</test>
Log:
java.lang.NullPointerException
at xxxxxxxxxxxxxxxxxxxxxxx.Test1(UsersTest.java:32) First line of the method
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.testng.internal.MethodInvocationHelper.invokeMethod
(MethodInvocationHelper.java:84)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:714)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
at org.testng.internal.TestMethodWorker.invokeTestMethods
(TestMethodWorker.java:127)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
at org.testng.TestRunner.privateRun(TestRunner.java:767)
at org.testng.TestRunner.run(TestRunner.java:617)
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:1224)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1149)
at org.testng.TestNG.run(TestNG.java:1057)
at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:111)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:204)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:175)
Thanks!

Related

When a #BeforeTest method fails, why is it not being listed in the testng-failed.xml?

I am using maven with testng 6.14.3.
Here is my code structure:
testng.xml
<?xml version="1.0" encoding="UTF-8"?>
<suite name="set-3" parallel="tests" thread-count="10">
<listeners>
<listener class-name="org.uncommons.reportng.HTMLReporter" />
</listeners>
<test name="Customer Tests">
<groups>
<run>
<include name="abc"/>
</run>
</groups>
<classes>
<class name="apps.Test1_BeforeTest_Of_Test2"></class>
<class name="apps.Test2"></class>
</classes>
</test>
</suite>
Test1_BeforeTest_Of_Test2.java
public class Test1_BeforeTest_Of_Test2{
#BeforeTest(groups = {"abc"})
public void test1Method() throws Exception {
}
#AfterTest(groups={"abc"})
public void test1AfterMethod() throws Exception {
}
}
Test2.java
public class Test2{
#Test(groups = {"abc"})
public void test2Method(){
}
}
During my run, Test1_BeforeTest_Of_Test2 class fails. So, Test2 is marked as skipped.
But, when I look at the testng-failed.xml that is generated at the end of the run, the failed #BeforeTest class (Test1_BeforeTest_Of_Test2) is not included/listed:
testng-failed.xml
<?xml version="1.0" encoding="UTF-8"?>
<suite thread-count="10" name="Failed suite [set-3]" parallel="tests">
<listeners>
<listener class-name="org.uncommons.reportng.HTMLReporter"/>
</listeners>
<test name="Customer Tests(failed)">
<groups>
<run>
<include name="abc"/>
</run>
</groups>
<classes>
<class name="apps.Test2">
<methods>
<include name="test2Method"/>
</methods>
</class>
</classes>
</test>
</suite>
Is this expected behaviour? Or a bug/gap in testng-failed.xml?
Ideally, when we re-run the failed tests, we expect the #BeforeTest to run as well, because it is pre-req for Test 2.
TestNG currently seems to be honouring configurations to be considered in the testng-failed.xml if its part of the skipped test method's test class i.e., the configuration (which is perhaps what has caused a test to be skipped) needs to reside in the same java class as your skipped method for TestNG to consider it to be included.
In your example, that's not the case and the configuration method exists in a different test class (which is perfectly valid).
This looks like a bug in TestNG to me.
I have submitted a bug on your behalf on the TestNG project and will get it fixed in the upcoming version (7.5.0).
Defect : https://github.com/cbeust/testng/issues/2611

Parllel execution with in #Test annotations

I want the actions(switch to frame, NavigateToAgents and writeToExcel) to be performed on multiple instances that open from Webdriver.get(urls). for now it just runs rest of the actions(switch to frame, NavigateToAgents and writeToExcel) on 1st instance of browser that is opened but not on others.
#Test(dataProvider = "data")
public static void stopAgents(String urls) throws Exception {
setup(); //Setup of browser
WebDriver.get(urls); // opening multiple instances of webdriver from list of urls from dataprovider
switchToLeftFrame();
navigateToAgents();
writeToExcel(sheetName, methodType); //i want to write to excel the tables of both the instances which are opened
//dataprovider passes list of urls
#DataProvider(name = "data", parallel = true)
public Object[][] data() {
Configuration configuration = Configuration.getConfiguration();
List<String> urls = configuration.getListOfUrls();
Object[][] data = new Object[urls.size()][1];
for (int i = 0; i < data.length; i++) {
data[i][0] = urls.get(i);
}
return data;
}
// TestNG XML
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="Suite" data-provider-thread-count="2">
<test thread-count="5" name="Test">
<classes>
<class name="testng.data.StopAgents"/>
</classes>
</test> <!-- Test -->
</suite> <!-- Suite -->
Error i get when i run above code
org.openqa.selenium.json.JsonException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $
Build info: version: '3.12.0', revision: '7c6e0b3', time: '2018-05-08T14:04:26.12Z'
System info: host: 'LH7U05CG7370KZ5', ip: '10.195.232.34', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_51'
Driver info: driver.version: RemoteWebDriver
at org.openqa.selenium.json.JsonInput.execute(JsonInput.java:172)
at org.openqa.selenium.json.JsonInput.beginObject(JsonInput.java:103)
at org.openqa.selenium.json.MapCoercer.lambda$apply$1(MapCoercer.java:64)
at org.openqa.selenium.json.MapCoercer$$Lambda$105/1929913939.apply(Unknown Source)
at org.openqa.selenium.json.JsonTypeCoercer.lambda$null$6(JsonTypeCoercer.java:142)
at org.openqa.selenium.json.JsonTypeCoercer$$Lambda$109/1456010139.apply(Unknown Source)
at org.openqa.selenium.json.JsonTypeCoercer.coerce(JsonTypeCoercer.java:122)
at org.openqa.selenium.json.Json.toType(Json.java:62)
at org.openqa.selenium.json.Json.toType(Json.java:52)
at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:87)
at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:49)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:158)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:83)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:543)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:600)
at org.openqa.selenium.remote.RemoteWebDriver$RemoteWebDriverOptions$RemoteWindow.maximize(RemoteWebDriver.java:828)
at testng.data.MethodsProgress.setup(MethodsProgress.java:450)
at testng.data.parllel.stopAgents(parllel.java:15)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:714)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
at org.testng.internal.TestMethodWithDataProviderMethodWorker.call(TestMethodWithDataProviderMethodWorker.java:73)
at org.testng.internal.TestMethodWithDataProviderMethodWorker.call(TestMethodWithDataProviderMethodWorker.java:14)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $
at com.google.gson.stream.JsonReader.beginObject(JsonReader.java:385)
at org.openqa.selenium.json.JsonInput$$Lambda$93/585885412.execute(Unknown Source)
at org.openqa.selenium.json.JsonInput$VoidCallable.call(JsonInput.java:181)
at org.openqa.selenium.json.JsonInput$VoidCallable.call(JsonInput.java:176)
at org.openqa.selenium.json.JsonInput.execute(JsonInput.java:168)
... 32 more
You need to pass parallel="tests" in your XML file.
For reference read this document

java.lang.ClassNotFoundException: org.eclipse.equinox.launcher.WebStartMain

I try to launch my RCP-project with jnlp. So i implemented a small e4-RCP project. Starting with the product doesn't cause any problem. The application supposedly works just fine. I installed a tomcat server running at localhost:8080, this also starts very well. Than i wrote a jnlp file for the app. exported and signed the jar. When i try to start the app. as http://localhost:8080/webstart.jnlp i get the exception:
java.lang.ClassNotFoundException: org.eclipse.equinox.launcher.WebStartMain
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at com.sun.jnlp.JNLPClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at com.sun.jnlp.JNLPClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at de.checkpoint.webstart.WebstartLauncher.main(WebstartLauncher.java:9)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.sun.javaws.Launcher.executeApplication(Unknown Source)
at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
at com.sun.javaws.Launcher.run(Unknown Source)
at java.lang.Thread.run(Thread.java:748)
Having said all all of that, here is my main:
package de.checkpoint.webstart;
import org.eclipse.equinox.launcher.WebStartMain;
public class WebstartLauncher {
public static void main(String[] args) {
WebStartMain.main(args);
}
}
Here is my jnlp file:
<?xml version="1.0" encoding="utf-8"?>
<jnlp spec="1.0+" codebase="http://localhost:8080/" href="webstart.jnlp">
<information>
<title>Jnlp Webstart Test</title>
<vendor>Boris Nguema B.</vendor>
<homepage href="http://localhost:8080/" />
<description>Testing Webstart</description>
</information>
<security>
<all-permissions/>
</security>
<!-- <property name="eclipse.product" value="de.checkpoint.product"/> -->
<!-- <property name="osgi.frameworkParentClassloader" value="current"/> -->
<!-- <property name="jnlp.osgi.parentClassloader" value="current"/> -->
<resources>
<j2se version="1.8+" />
<jar href="de.checkpoint.start_1.0.0.201711041646.jar" />
</resources>
<application-desc main-class="de.checkpoint.webstart.WebstartLauncher" />
</jnlp>
Can anyone tells me, what am I missing?
I am not sure if you already found out the problem,but equinox launcher do not have those lines in the manifest:
Permissions: all-permissions
Codebase: *
Trusted-Only: true
you need to add them and sign.

Selenium Configuration Failures while running TestNG

In selenium why does the result
Default test
Tests run: 1, Failures: 0, Skips: 1
Configuration Failures: 1, Skips: 0 comes?
Why is this so. I was trying to run a test.
public class NewTest {
WebDriver driver;
#BeforeTest
#Parameters({"browser"})
public void setup(#Optional String browser) throws Exception{
if(browser.equalsIgnoreCase("Firefox")){
driver = new FirefoxDriver();
}
else if(browser.equalsIgnoreCase("Chrome")){
System.setProperty("webdriver.chrome.driver","path");
driver = new ChromeDriver();
}
else if(browser.equalsIgnoreCase("IE")){
System.setProperty("webdriver.ie.driver","path");
driver = new InternetExplorerDriver();
}
else{
throw new Exception("Browser is not correct");
}
driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
}
#Test
public void testParameterWithXML() throws InterruptedException{
driver.get("http://demo.guru99.com/V4/");
WebElement userName = driver.findElement(By.name("uid"));
userName.sendKeys("guru99");
WebElement password = driver.findElement(By.name("password"));
password.sendKeys("guru99");
}}
This is my code. I was trying to run this, but getting errors.
FAILED CONFIGURATION: #BeforeTest setup(null)
java.lang.NullPointerException
at zproject.NewTest.setup(NewTest.java:21)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:104)
at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:515)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:217)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:144)
at org.testng.TestRunner.beforeRun(TestRunner.java:634)
at org.testng.TestRunner.run(TestRunner.java:602)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:387)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:382)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:340)
at org.testng.SuiteRunner.run(SuiteRunner.java:289)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1293)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1218)
at org.testng.TestNG.runSuites(TestNG.java:1133)
at org.testng.TestNG.run(TestNG.java:1104)
at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:132)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:236)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:81)
Also
Default test
Tests run: 1, Failures: 0, Skips: 1
Configuration Failures: 1, Skips: 0
suite.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "testng.org/testng-1.0.dtd">;
<suite name="TestSuite" thread-count="2" parallel="tests" >
<parameter name="browser" value="Chrome" />
<test name="ChromeTest">
<classes>
<class name="zproject.NewTest"></class>
</classes>
</test>
<parameter name="browser" value="Firefox" />
<test name="FirefoxTest">
<classes>
<class name="zproject.NewTest"></class>
</classes>
</test>
<parameter name="browser" value="IE" />
<test name="IETest">
<classes>
<class name="zproject.NewTest"> </class>
</classes>
</test>
</suite>
#Optional means the value will be null if you don't configure it.
In your case, I think you didn't and then the value of browser is null and produces an NPE.
As you throw an exception in the case of a bad browser, just remove the #Optional and TestNG will fail as expected.
Next, you'll need a suite.xml:
<suite name="My suite">
<parameter name="browser" value="Firefox"/>
<test name="Simple example">
<classes>
<class name="NewTest"/>
</classes>
</test>
</suite>
Have a look on the parameter part of the documentation too.

Problem with Tapestry 5.2.4 & Selenium Tests

I am some problems since this morning with my Selenium Test.
I created a Selenium Test Class :
public class IEPatchSeleniumTest extends SeleniumTestCase{
#Test
public void testTypingXSSCode() {
open("/Index");
}
}
I configured my testng.xml like that :
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="Kawwa Tests" verbose="1">
<test name="Integration Tests" enabled="true">
<parameter name="tapestry.web-app-folder" value="src/test/app0"/>
<packages>
<package name="net.mm.tapestry.security.integration" />
</packages>
</test>
</suite>
And my Maven-surefire-plugin declaration looks like :
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.4.3</version>
<configuration>
<suiteXmlFiles>
<suiteXmlFile>src/test/conf/testng.xml</suiteXmlFile>
</suiteXmlFiles>
<argLine>-Xmx500m -XX:MaxPermSize=256m</argLine>
</configuration>
</plugin>
But when I ran my tests suite, i have got 2 errors :
<test-method status="FAIL" signature="testStartup(org.testng.ITestContext, org.testng.xml.XmlTest)" name="testStartup" is-config="true" duration-ms="0" depends-on-groups="beforeStartup" started-at="2011-02-04T13:46:02Z" finished-at="2011-02-04T13:46:02Z">
<exception class="org.testng.TestNGException">
<message>
<![CDATA[
Method testStartup requires 2 parameters but 0 were supplied in the #Configuration annotation.]]>
</message>
<full-stacktrace>
<![CDATA[org.testng.TestNGException:
Method testStartup requires 2 parameters but 0 were supplied in the #Configuration annotation.
at org.testng.internal.Parameters.checkParameterTypes(Parameters.java:147)
at org.testng.internal.Parameters.createParameters(Parameters.java:96)
at org.testng.internal.Parameters.createParameters(Parameters.java:289)
at org.testng.internal.Parameters.createConfigurationParameters(Parameters.java:70)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:135)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:82)
at org.testng.TestRunner.beforeRun(TestRunner.java:501)
at org.testng.TestRunner.run(TestRunner.java:469)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:324)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:319)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:292)
at org.testng.SuiteRunner.run(SuiteRunner.java:198)
at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:821)
at org.testng.TestNG.runSuitesLocally(TestNG.java:788)
at org.testng.TestNG.run(TestNG.java:708)
at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:74)
at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:92)
at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345)
at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009)
]]>
</full-stacktrace>
</exception>
</test-method>
<test-method status="FAIL" signature="indicateTestMethodName(java.lang.reflect.Method)" name="indicateTestMethodName" is-config="true" duration-ms="0" started-at="2011-02-04T13:46:02Z" finished-at="2011-02-04T13:46:02Z">
<params>
<value>
<![CDATA[public void net.mm.tapestry.security.integration.IEPatchSeleniumTest.testTypingXSSCode()]]>
</value>
</params>
<exception class="java.lang.NullPointerException">
<full-stacktrace>
<![CDATA[java.lang.NullPointerException
at org.apache.tapestry5.test.SeleniumTestCase.indicateTestMethodName(SeleniumTestCase.java:292)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:580)
at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:398)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:145)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:427)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:617)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:885)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:126)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:110)
at org.testng.TestRunner.runWorkers(TestRunner.java:712)
at org.testng.TestRunner.privateRun(TestRunner.java:582)
at org.testng.TestRunner.run(TestRunner.java:477)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:324)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:319)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:292)
at org.testng.SuiteRunner.run(SuiteRunner.java:198)
at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:821)
at org.testng.TestNG.runSuitesLocally(TestNG.java:788)
at org.testng.TestNG.run(TestNG.java:708)
at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:74)
at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:92)
at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345)
at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009)
]]>
</full-stacktrace>
</exception>
</test-method>
Anyone had these problems before? Which solution did you choose ?
Thanks a lot.
Check the version of TestNG that is being set in your pom.xml. :)