Caliper: How to run multiple tests?

I wrote some tests using Caliper . How can I run several tests at once? I currently have many classes that extend SimpleBenchmark and have several timeXXX methods. Is it possible to run all this at the same time?

Simplebenchmark javadocs say:

Set control values ​​are determined. They can be static. They are not allowed to accept parameters., ..

I'm sorry, what? It looks incomplete.

Caliper the mailing list says this is not for Q & A, and to post a question with the tag "support" here. However, I see SO null messages with this tag! Since I don't have a 1500 reputation yet, I cannot create a new tag.

Use case: there is only one setUp / tearDown method. I have many tests in my test class, each of which allocates a lot of memory. Currently, I have to use a giant heap that is only increasing as I add more tests. In addition, many tests in a single file are somewhat inconvenient to maintain. It would be nice to specify several reference classes and all tests in each of them will be considered as one run.

+4
source share
1 answer

No. There is no built-in mechanism to run unrelated tests as a set. You can accomplish this with a simple shell script:

#!/bin/bash echo $* | xargs -n 1 $CALIPER_HOME/caliper 

What is your use case? We would like to have better support for running tests in Hudson , etc .; I hope we can do it soon.

+1
source

Source: https://habr.com/ru/post/1333514/


All Articles