dfuse
13 years agoOccasional Contributor
(SoapUI 4.5.1) NPE when running LoadTests from Java code
Hey,
I'm doing something like this:
However while running these I get repeated exceptions (always the same):
Is this a bug or am I doing something wrong?
I'm doing something like this:
@Test
public void baselineTest() throws XmlException, IOException, SoapUIException {
WsdlProject p = new WsdlProject(SOAPUI_DIR + "ws-persons-soapui-project.xml");
WsdlTestSuite s = p.getTestSuiteByName("LoadTesten");
LoadTest l1 = s.getTestCaseByName("zoek - get").getLoadTestByName("Baseline");
LoadTestRunner l1runner = l1.run();
LoadTest l2 = s.getTestCaseByName("bepaaltype - get").getLoadTestByName("Baseline");
LoadTestRunner l2runner = l2.run();
waitUntilFinished(l1runner, l2runner);
}
private void waitUntilFinished(LoadTestRunner... runners) {
for (LoadTestRunner r : runners) {
while (!r.hasStopped()) {
}
}
for (LoadTestRunner r : runners) {
if (!Status.FINISHED.equals(r.getStatus())) {
fail(r.getReason());
}
}
}
However while running these I get repeated exceptions (always the same):
15:22:02,121 DEBUG [SoapUIMultiThreadedHttpConnectionManager$SoapUIDefaultClientConnection] Sending request: POST /personen/service/20120724 HTTP/1.1
15:22:02,161 DEBUG [SoapUIMultiThreadedHttpConnectionManager$SoapUIDefaultClientConnection] Receiving response: HTTP/1.1 200 OK
15:22:02,161 DEBUG [HttpClientSupport$SoapUIHttpClient] Connection can be kept alive indefinitely
15:22:02,165 ERROR [SoapUI] An error occured [java.lang.NullPointerException], see error log for details
java.lang.NullPointerException
at com.eviware.soapui.impl.wsdl.loadtest.data.LoadTestStatistics$InternalTestRunListener.afterTestCase(LoadTestStatistics.java:517)
at com.eviware.soapui.impl.wsdl.loadtest.WsdlLoadTestRunner$InternalTestRunListener.afterRun(WsdlLoadTestRunner.java:758)
at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.notifyAfterRun(AbstractTestCaseRunner.java:300)
at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalFinally(AbstractTestCaseRunner.java:190)
at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalFinally(AbstractTestCaseRunner.java:42)
at com.eviware.soapui.impl.wsdl.support.AbstractTestRunner.run(AbstractTestRunner.java:163)
at com.eviware.soapui.impl.wsdl.loadtest.WsdlLoadTestRunner$InternalTestCaseRunner.run(WsdlLoadTestRunner.java:544)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Is this a bug or am I doing something wrong?