Skip to content

Commit 194502c

Browse files
committed
maxTestsPerTestSuite
1 parent 366c59c commit 194502c

File tree

3 files changed

+17
-5
lines changed

3 files changed

+17
-5
lines changed

core/src/main/kotlin/org/evomaster/core/EMConfig.kt

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1145,6 +1145,15 @@ class EMConfig {
11451145
" This option is only needed for white-box testing.")
11461146
var overrideOpenAPIUrl = ""
11471147

1148+
@Important(8.0)
1149+
@Cfg("Specify the maximum number of tests to be generated in one test suite." +
1150+
" If the number of total generated tests is above this threshold, then more than one test suite file will be generated," +
1151+
" each one having a different index value in their name, to distinguish them." +
1152+
" Note that a negative number here means that no limit per test suite is applied, and only a single test suite" +
1153+
" file per type is generated.")
1154+
var maxTestsPerTestSuite = 200
1155+
1156+
11481157
//-------- other options -------------
11491158

11501159
@Cfg("Inform EvoMaster process that it is running inside Docker." +
@@ -1220,10 +1229,6 @@ class EMConfig {
12201229
@Cfg("Instead of generating a single test file, it could be split in several files, according to different strategies")
12211230
var testSuiteSplitType = TestSuiteSplitType.FAULTS
12221231

1223-
@Experimental
1224-
@Cfg("Specify the maximum number of tests to be generated in one test suite. " +
1225-
"Note that a negative number presents no limit per test suite")
1226-
var maxTestsPerTestSuite = -1
12271232

12281233
@Experimental
12291234
@Deprecated("Temporarily removed, due to oracle refactoring. It might come back in future in a different form")

docs/options.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ There are 3 types of options:
5555
|`sutControllerHost`| __String__. Host name or IP address of where the SUT EvoMaster Controller Driver is listening on. This option is only needed for white-box testing. *Default value*: `localhost`.|
5656
|`sutControllerPort`| __Int__. TCP port of where the SUT EvoMaster Controller Driver is listening on. This option is only needed for white-box testing. *Constraints*: `min=0.0, max=65535.0`. *Default value*: `40100`.|
5757
|`overrideOpenAPIUrl`| __String__. If specified, override the OpenAPI URL location given by the EvoMaster Driver. This option is only needed for white-box testing. *Constraints*: `URL`. *Default value*: `""`.|
58+
|`maxTestsPerTestSuite`| __Int__. Specify the maximum number of tests to be generated in one test suite. If the number of total generated tests is above this threshold, then more than one test suite file will be generated, each one having a different index value in their name, to distinguish them. Note that a negative number here means that no limit per test suite is applied, and only a single test suite file per type is generated. *Default value*: `200`.|
5859

5960
## Internal Command-Line Options
6061

@@ -295,7 +296,6 @@ There are 3 types of options:
295296
|`maxSizeOfHandlingResource`| __Int__. Specify a maximum number of handling (remove/add) resource size at once, e.g., add 3 resource at most. *Constraints*: `min=0.0`. *Default value*: `0`.|
296297
|`maxSizeOfMutatingInitAction`| __Int__. Specify a maximum number of handling (remove/add) init actions at once, e.g., add 3 init actions at most. *Constraints*: `min=0.0`. *Default value*: `0`.|
297298
|`maxTestSizeStrategy`| __Enum__. Specify a strategy to handle a max size of a test. *Valid values*: `SPECIFIED, DPC_INCREASING, DPC_DECREASING`. *Default value*: `SPECIFIED`.|
298-
|`maxTestsPerTestSuite`| __Int__. Specify the maximum number of tests to be generated in one test suite. Note that a negative number presents no limit per test suite. *Default value*: `-1`.|
299299
|`mutationTargetsSelectionStrategy`| __Enum__. Specify a strategy to select targets for evaluating mutation. *Valid values*: `FIRST_NOT_COVERED_TARGET, EXPANDED_UPDATED_NOT_COVERED_TARGET, UPDATED_NOT_COVERED_TARGET`. *Default value*: `FIRST_NOT_COVERED_TARGET`.|
300300
|`onePlusLambdaLambdaOffspringSize`| __Int__. 1+(λ,λ) GA: number of offspring (λ) per generation. *Constraints*: `min=1.0`. *Default value*: `4`.|
301301
|`prematureStopStrategy`| __Enum__. Specify how 'improvement' is defined: either any kind of improvement even if partial (ANY), or at least one new target is fully covered (NEW). *Valid values*: `ANY, NEW`. *Default value*: `NEW`.|

release_notes.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
Under development in `master` branch.
44

5+
### New Features
6+
7+
- Introduced _--maxTestsPerTestSuite_, with default value of 200.
8+
This is to avoid generating single output test files with thousands of tests.
9+
Those will be split among different test suite files, with each containing at most _maxTestsPerTestSuite_ tests.
10+
A negative value means no constraint is applied (i.e., old behavior).
11+
512
### Fixed Bugs
613

714
- fixed a connection leak when authentication fails.

0 commit comments

Comments
 (0)