Ask a Question

SOAPUI thread end troubleshooting

ecoly
Occasional Contributor

SOAPUI thread end troubleshooting

Hello guys,

 

I got a big problem using open source version of soapui. I got a server that run permantly and that load wsdl project and run them when a network client ask it.

But when I look the jvm status on my java server with visual vm I see a lot of test suite runner threads that are never end.

This is how a part of my code work :

 

public class MyTestCaseRunner extends AbstractSoapUITestRunner implements TestSuiteRunListener, ProjectRunListener {

 

....

 

 @Override
  public boolean runRunner(){

       final WsdlProject project = XXX.loadWsdlProject(path);

 

       initProjectProperties(project);

       project.run(new StringToObjectMap(), false);

  }

 

}

 

Each time I run the runRunner method a lot of thread are created for running test suite but they never end.

 

It's a big problem for me because my server must run 24 hours a day. When I come in the moorning I see hundreds of threads in Park state.

 

Is that a bug in SOAPUI thread pool management or is there a mistake or a bad approach in my code ?

 

Thanks for your help.

18 REPLIES 18
nmrao
Community Hero

What is your use case? If it is required to load test, can the out-of-box load test feature be used? or LoadUI?


Regards,
Rao.
ecoly
Occasional Contributor

I!

Thanks for your reply.

My use case is exactly what I wrote before : executing a wsdlproject at a specific time of the day in a process that never end (acting as a server). But I saw that Runnable task generated by soapui testsuite runner never end.

Can you explain to me what are out-of-box load test feature and LoadUI ?

 

Regards,

 

ecoly

nmrao
Community Hero

Any of your test case can be run as load test which allows user to configure various parameters.
See documentation for more details. Of course, you can set the number of times the test to be run or how long the test to be run.

https://www.soapui.org/load-testing/getting-started.html

And there is command line utility available under SOAPUI_HOME/bin/loadtestrunner if you do not wish to use UI.

LoadUI is separate product designed for just load testing.


Regards,
Rao.
ecoly
Occasional Contributor

This is not about load test, but about project.run() implementation.

 

nmrao
Community Hero

there is another utility SOAPUI_HOME/bin/testrunner which can run the project.

You can write a small batch file to call the above utility to run the test repeatedly.


Regards,
Rao.
ecoly
Occasional Contributor

OK! I will try this.

Thanks

ecoly
Occasional Contributor

Using the testrunner.bat is not a solution for because it generates report that is not good for my xsl transformation.

Indeed in my class "MyTestCaseRunner" i have implement TestSuiteRunListener that allow me to save a report at the end of execution with an XML content format that I own. I really need the project.run() method to be fixed instead of call testrunner.bat from my java code!

Is there some soapui developpers in this forum ? Are you a member of the developper team ?

ecoly

nmrao
Community Hero

No, I am not. But you can put your case as detailed as possible. Which might help to understand better.

By the way,  you can take a look at command line options where it allows to generate the report in junit style (xml format) and that can be used to generate in html format reporting (using apache-ant task).



Regards,
Rao.
ecoly
Occasional Contributor

Ok. So for more precision just test the class in the file joined to this message.

 

In the main, I run MyRunner. Just test this with your wsdl project file (replace "my-project.xml" at line 71).

And if you look JVM thread with visual vm for example, you will see a lot of thread that are not end after the execution of runRunner method.

cancel
Showing results for 
Search instead for 
Did you mean: