Open manosnoam opened 8 years ago
Full output log: console.txt
Thank for the stacktrace.
But I think the problem comes from
java.lang.RuntimeException at org.testng.internal.TestResult.toString(TestResult.java:251) at org.testng.internal.TestResult.toString(TestResult.java:236) at org.testng.internal.Utils.toString(Utils.java:655) at org.testng.reporters.VerboseReporter.logTestResult(VerboseReporter.java:216) at org.testng.reporters.VerboseReporter.onConfigurationFailure(VerboseReporter.java:67) at org.testng.internal.Invoker.runConfigurationListeners(Invoker.java:1664) at org.testng.internal.Invoker.handleConfigurationFailure(Invoker.java:303) at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:241) at org.testng.internal.Invoker.invokeMethod(Invoker.java:589) 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.access$000(SuiteRunner.java:39) at org.testng.SuiteRunner$SuiteWorker.run(SuiteRunner.java:400) at org.testng.internal.thread.ThreadUtil$2.call(ThreadUtil.java:64)
But your exception is strange too and should not append.
@cbeust The exception on newFile sound familiar. If I remember well you had already the same issue months ago, did you remember if you fixed the problem?
This error doesn't seem to be related to what I used to see (which is fixed in 6.9.11 as far as I can tell).
@manosnoam What TestNG version do you use?
6.9.10 is my testng version, is it fixed on 6.9.10 ?
Thanks!
On 6.9.11 I mean ?
Yes, it should be but 6.9.11 and later are only available on bintray for the moment, not maven central.
Hi @juherr, It doesn't seems to be resolved using TestNG 6.9.11:
Failed to invoke configuration method com.galilsoftware.AF.testConfig.BaseTest.renameDDTmethod:null
ERROR 2016-06-19 13:30:15,606 TC-10128:_Counters_-_Current_Status_-_Add_modify_delete_-_internet_explorer [TestNG] [com.galilsoftware.AF.listeners.TestNGListener.onTestFailure] *** Test has Failed: TC-10128: Counters - Current Status - Add modify delete - null ***
ERROR 2016-06-19 13:30:15,612 TC-10128:_Counters_-_Current_Status_-_Add_modify_delete_-_internet_explorer [TestNG] [com.galilsoftware.AF.listeners.TestNGListener.onTestFailure] Exception on:
java.lang.RuntimeException
at org.testng.internal.TestResult.toString(TestResult.java:251)
at org.testng.internal.TestResult.toString(TestResult.java:236)
at org.testng.internal.Utils.toString(Utils.java:657)
at org.testng.reporters.VerboseReporter.logTestResult(VerboseReporter.java:216)
at org.testng.reporters.VerboseReporter.onConfigurationFailure(VerboseReporter.java:67)
at org.testng.internal.Invoker.runConfigurationListeners(Invoker.java:1632)
at org.testng.internal.Invoker.handleConfigurationFailure(Invoker.java:304)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:242)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:590)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:823)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1131)
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:778)
at org.testng.TestRunner.run(TestRunner.java:632)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:366)
at org.testng.SuiteRunner.access$000(SuiteRunner.java:39)
at org.testng.SuiteRunner$SuiteWorker.run(SuiteRunner.java:400)
at org.testng.internal.thread.ThreadUtil$2.call(ThreadUtil.java:64)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
This doesn't happen if using surefire.testng.verbose = -1.
I don't know if it's relevant or not: renameDDTmethod() method is aimed to give a new method name, since I only have 1 Test Method, that runs each time with new parameters and method reflection (based on data from excel), so I need to change the TestNG result - method name accordingly:
@BeforeMethod(alwaysRun = true)
public void renameDDTmethod(ITestResult result, Method testMethod, Object[] parameters) {
String methodName = testMethod.getName();
if (methodName.equals("createDataDrivenTests") && parameters.length == 2) {
methodName = "Login";
String methodNameDefinition = ddt.getValue("Excel_Method_Field_Definition", "Test_Name");
if (methodNameDefinition != null) {
@SuppressWarnings("unchecked")
String newMethodName = ((Hashtable<String, String>) parameters[0]).get(methodNameDefinition);
if (newMethodName != null)
methodName = newMethodName;
result.setAttribute("ddtTestName", methodName);
}
String methodDescriptionDefinition = ddt.getValue("Excel_Description_Field_Definition", "Description");
if (methodDescriptionDefinition != null) {
@SuppressWarnings("unchecked")
String methodDescription = ((Hashtable<String, String>) parameters[0]).get(methodDescriptionDefinition);
if (methodDescription != null)
result.setAttribute("ddtTestDescription", methodDescription);
}
}
result.setAttribute("ddtParams", ddt.getData());
this.setTestName(methodName);
}
Attaching Jenkins execution (both Maven Compile using TestNG 6.9.11 + Maven TestNG Execution): Maven_Compile_TestNG-6.9.11.txt Maven_Run_TestNG_Failure.txt
Ok, thank.
I had a look and the failing log is only activated with >4. I don't understand what is the problem for the moment but feel free to analyse it :)
This is weired. When running TestNG + Maven failesafe, with surefire.testng.verbose > 4:
On Windows 2008 R2, all tests fail right away. If I change it to Verbose < 5, everything run as usual.
I'm not sure if the following exception is the cause: