diff --git a/README.md b/README.md index 34d615589..7c40dc04b 100644 --- a/README.md +++ b/README.md @@ -158,7 +158,7 @@ Usage: eu.stamp_project.Main [-hvV] [--allow-path-in-assertions] [--clean] [--ex --automatic-builder= Specify the automatic builder to be used. Valid values: Maven, Gradle Default value: Maven -c, --cases, --test-cases, --test-methods=[,...] - Specify the test cases to amplify. + Specify the test cases to amplify.By default, DSpot selects all the tests methods. --cache-size= Specify the size of the memory cache in terms of the number of store entries Default value: 10000 @@ -305,7 +305,7 @@ Usage: eu.stamp_project.Main [-hvV] [--allow-path-in-assertions] [--clean] [--ex -t, --test=[,...] Fully qualified names of test classes to be amplified. If the value is all, DSpot will amplify the whole test suite. You can also use regex to describe a set of test classes. - By default, DSpot selects all the tests. + By default, DSpot selects all the tests classes. --target-module= Specify the module to be amplified. This value must be a relative path from value specified by --absolute-path-to-project-root command-line option. If your project is @@ -322,7 +322,7 @@ Usage: eu.stamp_project.Main [-hvV] [--allow-path-in-assertions] [--clean] [--ex value: false -v, --verbose Enable verbose mode of DSpot. Default value: false -V, --version Print version information and exit. - --with-comment Enable comment on amplified test: details steps of the Amplification. Default value: false + --with-comment Enable comment on amplified test: details steps of the Amplification. Default value: falseg ``` For options that take list, the used separator is a comma `,`, whatever the platform you use. diff --git a/dspot/src/main/java/eu/stamp_project/Main.java b/dspot/src/main/java/eu/stamp_project/Main.java index 6b1aadb52..6a65d444e 100644 --- a/dspot/src/main/java/eu/stamp_project/Main.java +++ b/dspot/src/main/java/eu/stamp_project/Main.java @@ -131,6 +131,10 @@ public static void run(InputConfiguration inputConfiguration) { ); final List> testClassesToBeAmplified = testFinder.findTestClasses(inputConfiguration.getTestClasses()); final List testMethodsToBeAmplifiedNames = inputConfiguration.getTestCases(); + if (testMethodsToBeAmplifiedNames.size() == 1 && + testMethodsToBeAmplifiedNames.get(0).isEmpty()) { + testMethodsToBeAmplifiedNames.clear(); + } final TestSelector testSelector = inputConfiguration.getSelector().buildSelector(automaticBuilder, inputConfiguration); final List amplifiers = inputConfiguration diff --git a/dspot/src/main/java/eu/stamp_project/utils/program/InputConfiguration.java b/dspot/src/main/java/eu/stamp_project/utils/program/InputConfiguration.java index 6de8c9c84..5e5cf6278 100644 --- a/dspot/src/main/java/eu/stamp_project/utils/program/InputConfiguration.java +++ b/dspot/src/main/java/eu/stamp_project/utils/program/InputConfiguration.java @@ -118,7 +118,7 @@ public class InputConfiguration { description = "Fully qualified names of test classes to be amplified. " + "If the value is all, DSpot will amplify the whole test suite. " + "You can also use regex to describe a set of test classes. " + - "By default, DSpot selects all the tests." + "By default, DSpot selects all the tests classes." ) private List testClasses; @@ -134,7 +134,9 @@ public class InputConfiguration { @CommandLine.Option( names = {"-c", "--cases", "--test-methods", "--test-cases"}, split = ",", - description = "Specify the test cases to amplify." + defaultValue = "", + description = "Specify the test cases to amplify." + + "By default, DSpot selects all the tests methods." ) private List testCases = new ArrayList<>();