myzhan / locust4j

Locust4j is a load generator for locust, written in Java.
MIT License
81 stars 30 forks source link

System.exit() called #7

Closed 8altazar closed 5 years ago

8altazar commented 5 years ago

I would like to do full automated performance test with csv results analysis (asseration) in java and report generated for example in allure tool. Problem is: after load testing (locust --run-time reached) in Runner.java (line 228) System.exit(0) is called.

myzhan commented 5 years ago

Because the locust master exits. What do you need?

8altazar commented 5 years ago

Eg. add some field in Locust.java private boolean exitEnabled; with default value true and method with possibilty to change it. What do you think about it?

myzhan commented 5 years ago

It's not necessary, what do you want to do if it doesn't exit?

8altazar commented 5 years ago

Read locust csv results, do some asseration and generate report junit/allure. All with one command mvn test.

myzhan commented 5 years ago

What about put all the code into another tool? Or you can add a shutdown hook by calling Runtime.getRuntime().addShutdownHook()

8altazar commented 5 years ago

Yes, i have to find some workaround.

myzhan commented 5 years ago

If you use locust4j as a plugin in maven, calling System.exit() may exit maven itself. But maven is not a suitable environment to run locust4j, jenkins may be better.