I am going to evaluate my own fault localization approach on GitBug-Java. To do this, I need to do the following steps:
- Inject extra test cases into the test suite.
- Compile the project.
- Execute the tests.
I tried like this:
- I checked out one of the bugs and modified one of the
.java Files of the Test Classes. It looks like this:
public class Gt06ProtocolDecoderTest extends ProtocolTest {
@Test
public void tryTestInjection() throws Exception {
int a=1;
int b=0;
assertEquals(a,b); // This is the custom test case, and it always fails.
}
@Test
public void testDecode() throws Exception {
... // This is the original Failed Test Case
}
}
- I execute
gitbug-java run checkout --act-cache=act-cache and get:
Expected executed tests: 479
Executed tests: 480
Passing tests: 478
Skipped tests: 23
Failing tests: 2
Failed tests:
- org.traccar.protocol.Gt06ProtocolDecoderTest#tryTestInjectsion()
- org.traccar.protocol.Gt06ProtocolDecoderTest#testDecode()
It turns out that my custom test case is compiled and executed. But to speed up, is it possible to execute single test case rather than all tests?
How can I do?