-
Good day I am a Computer Science student in South Africa, attending Stellenbosch University, and for my year-project, I'm focusing on spectrum-based fault localization using data-flow coverage. In the search for data-flow coverage tools, BA-DUA immediately came to my attention due to the number of articles that mention it (as well as the fact that it's open-source!). I've downloaded this source code and tried to run it for an example Java class following the instructions in the README, but I can't get it to work. When I run the 'instrument' command, it prints out, "0 classes instrumented in 0 seconds", whether I give it a source folder with Java classes (and compiled classes) or the name of a compiled class. I then tried to run the 'report' command, but it prints out, "Failed: Invalid execution data file.", probably due to the file I give as -input being uninstrumented. I would really like to use your tool for my project, but I'm struggling to understand where I'm going wrong. If you have any help or advice to offer, I'd really appreciate it. Kind regards |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
Nice to hear that you are planning to use BA-DUA. Can you provide the version of Java and BA-DUA are you using? currently BA-DUA 0.7.0 supports classes compiled up to Java 19. Yesterday I released BA-DUA 0.8.0 that supports classes compiled up to Java 20. Please, also provide a transcript of the steps that you tried to execute. Normally the The Regards Roberto |
Beta Was this translation helpful? Give feedback.
-
Thanks again! I thought that was the problem and tried to include the JAR before sending you the previous message, but I got a bit confused about how to include it in the classpath so it was still giving errors. But I read up on the classpath thing and it worked when I tried it now! The report also worked :) As for my project, this tool definitely seems like a good option, because I want to work with the raw data-flow coverage instead of something colour-coded. So congratulations, I guess! Thanks for all the help and goodbye for now, but I'll definitely return if I have more questions, if that's all right? |
Beta Was this translation helpful? Give feedback.
-
I'm glad it worked. Current version of BA-DUA can export a XML or a CSV reports (the contents from stdout). I'm also working on a Java API to read the binary file that contains the coverage info but this is not ready yet. I'll close this discussion as resolved. If you have any other doubts, fell free to open a new discussion. |
Beta Was this translation helpful? Give feedback.
Perfect, it seems to be correct (if
-src
folder contains only one class). Also note that theinstrument
program traverses the directories recursively, providing only thetarget/classes
should be enough. It will use the same folder structure for the destination directory, so every instrumented class will live in the correct place.