-
Hi, again! I've been playing with BA-DUA some more and I was wondering if it is possible to find the relationship between test cases and DUAs, i.e., which test cases cover which DUAs? I looked through the source code, but it seems that every DUA only has a boolean to check whether it has been covered by any test case. It makes sense for calculating total coverage, but especially for something like fault localization where you need a coverage matrix, it would be nice to know where a specific test case is processed so that something can be logged if needed. The alternative is to run test cases one at a time, which feels a bit painful. Kind regards |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi Alexandra, Unfortunately, BA-DUA does not support per-test coverage out-of-box. We want BA-DUA to be an agnostic tool, depending only on Java runtime. To achieve this level of coverage granularity you need to implement some control based on the testing framework (Probably JUnit). Fortunately, BA-DUA provides a runtime API that allows you to reset, dump and access the binary coverage data. You can access this API through BaDuaRuntime class. Our study group already implemented a tool called Jaguar that implements SFL of control-flow coverage and data-flow coverage for JUnit tests. Jaguar is based on a patched version of JaCoCo that also integrates BA-DUA on its code. But some drawbacks: the code is not optimized for fast execution and the dependency of this patched (to not say Frankenstein) JaCoCo is very bad. One of our students implemented a version of Jaguar (jaguar-df) only for data-flow coverage. This version does not depend of the patched JaCoCo version and depends only of a specific version of BA-DUA. I'm currently working on the Jaguar 2nd version that implements SFL of control-flow coverage and data-flow coverage. This new version uses these mentioned APIs of BA-DUA to data-flow coverage and also integrates with original JaCoCo for control-flow coverage. The new version is focused on extensibility, efficiency and ease of use. Sadly not ready for use yet. But you can take a look on the code. I hope these references may help you. |
Beta Was this translation helpful? Give feedback.
Hi Alexandra,
Unfortunately, BA-DUA does not support per-test coverage out-of-box. We want BA-DUA to be an agnostic tool, depending only on Java runtime.
To achieve this level of coverage granularity you need to implement some control based on the testing framework (Probably JUnit).
Fortunately, BA-DUA provides a runtime API that allows you to reset, dump and access the binary coverage data. You can access this API through BaDuaRuntime class.
Our study group already implemented a tool called Jaguar that implements SFL of control-flow coverage and data-flow coverage for JUnit tests. Jaguar is based on a patched version of JaCoCo that also integrates BA-DUA on its code. But some drawbacks: …