Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Parameter Value Coverage (PVC) tool for Java

Conventional code coverage is not good enough with some code including deep class hierarchy and generic method usage. Sometimes all lines are covered, but the parameters for some called methods are not covered in value-wise. I am in a desperate need to find some automated PVC tool that can analyze the test execution and together with regular test coverage, will give me some coverage on parameter values. Is such a tool exists? Or do I have to work manually to create matrices to analyze all parameter combinations for any given method. Thanks!

like image 656
buræquete Avatar asked Jan 21 '26 21:01

buræquete


1 Answers

The only significant effect that different parameter values can have on the application is to cause it to take another execution path. All values that cause it to take one path are equivalent with respect to testing.

So rather than worry about parameter values, you might be better off looking for a tool that insisted you covered all the execution paths. Those tools don't seem to be easy to find.

Each path will be controlled by some sequence of tests; those tests will in effect partition the program state and parameter values into interestingly different regions.

While you want the tool to help verify that you have exercised those paths, I can see how you might want to be able to extract the ranges of parameter values, so that you might write tests to exercise the paths.

So you want another tool to extract the parameter ranges that will cause different paths to executed.

I don't know of any solutions. You might be able to build one (see my bio); doing this by hand for big system seems pretty daunting.

like image 95
Ira Baxter Avatar answered Jan 23 '26 09:01

Ira Baxter



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!