Skip to content
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

TestNGCitrusTestRunner with DataProvider fails with NullPointerException when the dataProvider Name is not Equal to the method name #142

engzizo79 opened this Issue Nov 3, 2016 · 0 comments


None yet
2 participants
Copy link

engzizo79 commented Nov 3, 2016

When Trying to Run a Citrus Test with a TestNG dataProvider, although it is possible to use a dataProvider Name that does not correspond to the method Name and also to set a dataProviderClass, the Citrus Framework tries to find a method in the same class with the name of the dataProvider. This limitation does not exist in the TestNG framework, is not documented and results in the test run to be terminated without any useful message. Only in the TestNG Report I was able to find following stack trace:

at com.consol.citrus.testng.AbstractTestNGCitrusTest.resolveParameter(
at com.consol.citrus.testng.AbstractTestNGCitrusTest.resolveParameter(
at com.consol.citrus.dsl.testng.TestNGCitrusTest.invokeTestMethod(
at org.testng.internal.MethodInvocationHelper.invokeHookable(
at org.testng.internal.Invoker.invokeMethod(
at org.testng.internal.Invoker.invokeTestMethod(
at org.testng.internal.Invoker.invokeTestMethods(
at org.testng.internal.TestMethodWorker.invokeTestMethods(
at org.testng.TestRunner.privateRun(
at org.testng.SuiteRunner.runTest(
at org.testng.SuiteRunner.runSequentially( [..]

Through debugging it was clear that org.springframework.util.findMethod was called with the providerName as method name, which is not correct in that case

@christophd christophd added the Type: Bug label Nov 3, 2016

@christophd christophd added this to the v2.6.2 milestone Nov 3, 2016

@christophd christophd added the READY label Nov 3, 2016

@christophd christophd removed the READY label Nov 11, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.