Skip to content

Commit 18d8663

Browse files
authored
Merge pull request #1370 from WebFuzzing/maxTestCaseNameLength-120
increased maxTestCaseNameLength default to 120
2 parents fa68e83 + df8265c commit 18d8663

3 files changed

Lines changed: 10 additions & 12 deletions

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2706,7 +2706,7 @@ class EMConfig {
27062706
var namingStrategy = defaultTestCaseNamingStrategy
27072707

27082708
@Cfg("Specify the hard limit for test case name length")
2709-
var maxTestCaseNameLength = 80
2709+
var maxTestCaseNameLength = 120
27102710

27112711
@Cfg("Specify if true boolean query parameters are included in the test case name." +
27122712
" Used for test case naming disambiguation. Only valid for Action based naming strategy.")

core/src/test/kotlin/org/evomaster/core/EMConfigTest.kt

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -641,25 +641,23 @@ internal class EMConfigTest{
641641
assertTrue(config.nameWithQueryParameters)
642642
}
643643

644+
644645
@Test
645-
fun testMaxCharsLengthIs80ByDefault() {
646+
fun testMaxCharsLengthCanBeChangedByParam() {
646647
val parser = EMConfig.getOptionParser()
647648
val config = EMConfig()
648649

649-
config.updateProperties(parser.parse())
650+
val default = config.maxTestCaseNameLength
650651

651-
assertEquals(config.maxTestCaseNameLength, 80)
652-
}
652+
config.updateProperties(parser.parse())
653+
assertEquals(config.maxTestCaseNameLength, default)
653654

654-
@Test
655-
fun testMaxCharsLengthCanBeChangedByParam() {
656-
val parser = EMConfig.getOptionParser()
657-
val config = EMConfig()
655+
val different = default * 2
658656

659-
val options = parser.parse("--maxTestCaseNameLength", "30")
657+
val options = parser.parse("--maxTestCaseNameLength", "$different")
660658
config.updateProperties(options)
661659

662-
assertEquals(config.maxTestCaseNameLength, 30)
660+
assertEquals(config.maxTestCaseNameLength, different)
663661
}
664662

665663
}

docs/options.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ There are 3 types of options:
153153
|`maxResponseByteSize`| __Int__. Maximum size (in bytes) that EM handles response payloads in the HTTP responses. If larger than that, a response will not be stored internally in EM during the test generation. This is needed to avoid running out of memory. *Default value*: `1000000`.|
154154
|`maxSearchSuiteSize`| __Int__. Define the maximum number of tests in a suite in the search algorithms that evolve whole suites, e.g. WTS. *Constraints*: `min=1.0`. *Default value*: `50`.|
155155
|`maxSqlInitActionsPerMissingData`| __Int__. When generating SQL data, how many new rows (max) to generate for each specific SQL Select. *Constraints*: `min=1.0`. *Default value*: `1`.|
156-
|`maxTestCaseNameLength`| __Int__. Specify the hard limit for test case name length. *Default value*: `80`.|
156+
|`maxTestCaseNameLength`| __Int__. Specify the hard limit for test case name length. *Default value*: `120`.|
157157
|`maxTestSize`| __Int__. Max number of 'actions' (e.g., RESTful calls or SQL commands) that can be done in a single test. *Constraints*: `min=1.0`. *Default value*: `10`.|
158158
|`maxTimeInSeconds`| __Int__. Maximum number of seconds allowed for the search. The more time is allowed, the better results one can expect. But then of course the test generation will take longer. Only applicable depending on the stopping criterion. If this value is 0, the setting 'maxTime' will be used instead. *Constraints*: `min=0.0`. *Default value*: `0`.|
159159
|`maxlengthOfHistoryForAGM`| __Int__. Specify a maximum length of history when applying archive-based gene mutation. *Default value*: `10`.|

0 commit comments

Comments
 (0)