From c65dd88280cd00ee3c395498f817e3a11302e8bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?ROMINA=20JULIETA=20SU=C3=81REZ?= Date: Sun, 2 Aug 2026 20:00:29 -0300 Subject: [PATCH 1/5] We add the key config prior the new feature of multipartform data type support --- .../examples/adaptivehypermutation/DeterminismTest.java | 2 +- .../examples/adaptivehypermutation/DeterminismTest.java | 2 +- core/src/main/kotlin/org/evomaster/core/EMConfig.kt | 5 +++++ .../core/problem/rest/builder/RestActionBuilderV3.kt | 5 ++++- .../core/problem/rest/RestActionBuilderV3Test.kt | 8 ++++++++ docs/options.md | 1 + 6 files changed, 20 insertions(+), 3 deletions(-) diff --git a/core-tests/e2e-tests/spring/spring-rest-h2-v1/src/test/java/org/evomaster/e2etests/spring/examples/adaptivehypermutation/DeterminismTest.java b/core-tests/e2e-tests/spring/spring-rest-h2-v1/src/test/java/org/evomaster/e2etests/spring/examples/adaptivehypermutation/DeterminismTest.java index 75c9268ddd..1abf1572cb 100644 --- a/core-tests/e2e-tests/spring/spring-rest-h2-v1/src/test/java/org/evomaster/e2etests/spring/examples/adaptivehypermutation/DeterminismTest.java +++ b/core-tests/e2e-tests/spring/spring-rest-h2-v1/src/test/java/org/evomaster/e2etests/spring/examples/adaptivehypermutation/DeterminismTest.java @@ -28,7 +28,7 @@ public void testDeterminismOfLog(boolean enableConstraintHandling){ OpenAPI schema = (new OpenAPIParser()).readLocation("swagger-ahm/ahm.json", null, null).getOpenAPI(); isDeterminismConsumer( new ArrayList<>(), (args) -> RestActionBuilderV3.INSTANCE .getModelsFromSwagger(schema, new LinkedHashMap<>(), - new RestActionBuilderV3.Options(false,enableConstraintHandling,false,0.0,0.0,true,false,false))); + new RestActionBuilderV3.Options(false,enableConstraintHandling,false,0.0,0.0,true,false,false,true))); } diff --git a/core-tests/jdk-8/spring-rest-openapi-v2-tests/src/test/java/org/evomaster/e2etests/spring/examples/adaptivehypermutation/DeterminismTest.java b/core-tests/jdk-8/spring-rest-openapi-v2-tests/src/test/java/org/evomaster/e2etests/spring/examples/adaptivehypermutation/DeterminismTest.java index 2ddc3b2b3e..7989a039a8 100644 --- a/core-tests/jdk-8/spring-rest-openapi-v2-tests/src/test/java/org/evomaster/e2etests/spring/examples/adaptivehypermutation/DeterminismTest.java +++ b/core-tests/jdk-8/spring-rest-openapi-v2-tests/src/test/java/org/evomaster/e2etests/spring/examples/adaptivehypermutation/DeterminismTest.java @@ -27,7 +27,7 @@ public void testDeterminismOfLog(boolean enableConstraintHandling){ OpenAPI schema = (new OpenAPIParser()).readLocation("swagger-ahm/ahm.json", null, null).getOpenAPI(); isDeterminismConsumer( new ArrayList<>(), (args) -> { RestActionBuilderV3.INSTANCE.getModelsFromSwagger(schema, new LinkedHashMap<>(), - new RestActionBuilderV3.Options(false,enableConstraintHandling,false,0.0,0.0,true,false,false)); + new RestActionBuilderV3.Options(false,enableConstraintHandling,false,0.0,0.0,true,false,false,true)); }); } diff --git a/core/src/main/kotlin/org/evomaster/core/EMConfig.kt b/core/src/main/kotlin/org/evomaster/core/EMConfig.kt index 651d797745..a8b30faa6a 100644 --- a/core/src/main/kotlin/org/evomaster/core/EMConfig.kt +++ b/core/src/main/kotlin/org/evomaster/core/EMConfig.kt @@ -1378,6 +1378,11 @@ class EMConfig { "Only available for JVM languages") var dtoForRequestPayload = false + @Experimental + @Cfg("Disable multipart/form-data support when building REST actions. " + + "This feature is disabled by default and can be enabled through RestActionBuilder options.") + var disableMultipartFormDataSupport = true + @Important(6.0) @Cfg("Host name or IP address of where the SUT EvoMaster Controller Driver is listening on." + " This option is only needed for white-box testing.") diff --git a/core/src/main/kotlin/org/evomaster/core/problem/rest/builder/RestActionBuilderV3.kt b/core/src/main/kotlin/org/evomaster/core/problem/rest/builder/RestActionBuilderV3.kt index ebf0e6ddaa..2a8ccf2bcc 100644 --- a/core/src/main/kotlin/org/evomaster/core/problem/rest/builder/RestActionBuilderV3.kt +++ b/core/src/main/kotlin/org/evomaster/core/problem/rest/builder/RestActionBuilderV3.kt @@ -115,6 +115,8 @@ object RestActionBuilderV3 { val enableAdvancedFormats: Boolean = true, val inferFormatFromNames: Boolean = true, + + val disableMultipartFormDataSupport: Boolean = true, ){ constructor(config: EMConfig): this( enableConstraintHandling = config.enableSchemaConstraintHandling, @@ -123,7 +125,8 @@ object RestActionBuilderV3 { probUseExamples = config.probRestExamples, usingWhiteBox = !config.blackBox, enableAdvancedFormats = config.enableAdvancedFormats, - inferFormatFromNames = config.inferFormatFromNames + inferFormatFromNames = config.inferFormatFromNames, + disableMultipartFormDataSupport = config.disableMultipartFormDataSupport, ) init { diff --git a/core/src/test/kotlin/org/evomaster/core/problem/rest/RestActionBuilderV3Test.kt b/core/src/test/kotlin/org/evomaster/core/problem/rest/RestActionBuilderV3Test.kt index a5358e0ee1..99449c0dab 100644 --- a/core/src/test/kotlin/org/evomaster/core/problem/rest/RestActionBuilderV3Test.kt +++ b/core/src/test/kotlin/org/evomaster/core/problem/rest/RestActionBuilderV3Test.kt @@ -46,6 +46,14 @@ class RestActionBuilderV3Test{ RestActionBuilderV3.cleanCache() } + @Test + fun testMultipartFormDataSupportOptionDefaultsToDisabled(){ + val config = EMConfig() + + assertTrue(config.disableMultipartFormDataSupport) + assertTrue(RestActionBuilderV3.Options(config).disableMultipartFormDataSupport) + assertFalse(RestActionBuilderV3.Options(disableMultipartFormDataSupport = false).disableMultipartFormDataSupport) + } @Test fun testDtoIssueWithWronglyHandledField(){ diff --git a/docs/options.md b/docs/options.md index f51c573d3f..6e0b8ac7fc 100644 --- a/docs/options.md +++ b/docs/options.md @@ -280,6 +280,7 @@ There are 3 types of options: |`cgaNeighborhoodModel`| __Enum__. Cellular GA: neighborhood model (RING, L5, C9, C13). *Valid values*: `RING, L5, C9, C13`. *Default value*: `RING`.| |`classificationRepairThreshold`| __Double__. If using THRESHOLD for AI Classification Repair, specify its value. All classifications with probability equal or above such threshold value will be accepted. *Constraints*: `probability 0.0-1.0`. *Default value*: `0.5`.| |`collectSqlZ3Stats`| __Boolean__. Collect detailed statistics for Z3-based SQL generation: SAT/UNSAT/error counts, query uniqueness, Z3 execution time, and SMT-LIB generation time. Only meaningful when generateSqlDataWithZ3=true. *Depends on*: `generateSqlDataWithZ3=true`. *Default value*: `false`.| +|`disableMultipartFormDataSupport`| __Boolean__. Disable multipart/form-data support when building REST actions. *Default value*: `true`.| |`discoveredInfoRewardedInFitness`| __Boolean__. If there is new discovered information from a test execution, reward it in the fitness function. *Default value*: `false`.| |`dockerLocalhost`| __Boolean__. Replace references to 'localhost' to point to the actual host machine. Only needed when running EvoMaster inside Docker. *Default value*: `false`.| |`dpcTargetTestSize`| __Int__. Specify a max size of a test to be targeted when either DPC_INCREASING or DPC_DECREASING is enabled. *Default value*: `1`.| From c193485fe34ab3e328ed36ae5c4da47d9c6cae3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?ROMINA=20JULIETA=20SU=C3=81REZ?= Date: Sun, 2 Aug 2026 21:21:40 -0300 Subject: [PATCH 2/5] retry ci --- core/src/main/kotlin/org/evomaster/core/EMConfig.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/kotlin/org/evomaster/core/EMConfig.kt b/core/src/main/kotlin/org/evomaster/core/EMConfig.kt index a8b30faa6a..01f14de500 100644 --- a/core/src/main/kotlin/org/evomaster/core/EMConfig.kt +++ b/core/src/main/kotlin/org/evomaster/core/EMConfig.kt @@ -1379,7 +1379,7 @@ class EMConfig { var dtoForRequestPayload = false @Experimental - @Cfg("Disable multipart/form-data support when building REST actions. " + + @Cfg("Disable multipart/form-data support when building REST actions." + "This feature is disabled by default and can be enabled through RestActionBuilder options.") var disableMultipartFormDataSupport = true From 70868d07c79afe8b5ea413024a5c42ce4aebbc62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?ROMINA=20JULIETA=20SU=C3=81REZ?= Date: Wed, 12 Aug 2026 23:02:52 -0300 Subject: [PATCH 3/5] Fix semantics for the key --- core/src/main/kotlin/org/evomaster/core/EMConfig.kt | 6 +++--- .../core/problem/rest/builder/RestActionBuilderV3.kt | 4 ++-- .../evomaster/core/problem/rest/RestActionBuilderV3Test.kt | 6 +++--- docs/options.md | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/core/src/main/kotlin/org/evomaster/core/EMConfig.kt b/core/src/main/kotlin/org/evomaster/core/EMConfig.kt index 40ed2a1043..5a95fbc7ad 100644 --- a/core/src/main/kotlin/org/evomaster/core/EMConfig.kt +++ b/core/src/main/kotlin/org/evomaster/core/EMConfig.kt @@ -1379,9 +1379,9 @@ class EMConfig { var dtoForRequestPayload = false @Experimental - @Cfg("Disable multipart/form-data support when building REST actions." + - "This feature is disabled by default and can be enabled through RestActionBuilder options.") - var disableMultipartFormDataSupport = true + @Cfg("Enable multipart/form-data support when building REST actions." + + " This feature is disabled by default.") + var enableMultipartFormDataSupport = false @Important(6.0) @Cfg("Host name or IP address of where the SUT EvoMaster Controller Driver is listening on." + diff --git a/core/src/main/kotlin/org/evomaster/core/problem/rest/builder/RestActionBuilderV3.kt b/core/src/main/kotlin/org/evomaster/core/problem/rest/builder/RestActionBuilderV3.kt index b01ec830ba..ae6447b5a2 100644 --- a/core/src/main/kotlin/org/evomaster/core/problem/rest/builder/RestActionBuilderV3.kt +++ b/core/src/main/kotlin/org/evomaster/core/problem/rest/builder/RestActionBuilderV3.kt @@ -118,7 +118,7 @@ object RestActionBuilderV3 { val inferFormatFromNames: Boolean = true, - val disableMultipartFormDataSupport: Boolean = true, + val enableMultipartFormDataSupport: Boolean = false, ){ constructor(config: EMConfig): this( enableConstraintHandling = config.enableSchemaConstraintHandling, @@ -128,7 +128,7 @@ object RestActionBuilderV3 { usingWhiteBox = !config.blackBox, enableAdvancedFormats = config.enableAdvancedFormats, inferFormatFromNames = config.inferFormatFromNames, - disableMultipartFormDataSupport = config.disableMultipartFormDataSupport, + enableMultipartFormDataSupport = config.enableMultipartFormDataSupport, ) init { diff --git a/core/src/test/kotlin/org/evomaster/core/problem/rest/RestActionBuilderV3Test.kt b/core/src/test/kotlin/org/evomaster/core/problem/rest/RestActionBuilderV3Test.kt index 4af5fe1a00..1831a96b45 100644 --- a/core/src/test/kotlin/org/evomaster/core/problem/rest/RestActionBuilderV3Test.kt +++ b/core/src/test/kotlin/org/evomaster/core/problem/rest/RestActionBuilderV3Test.kt @@ -51,9 +51,9 @@ class RestActionBuilderV3Test{ fun testMultipartFormDataSupportOptionDefaultsToDisabled(){ val config = EMConfig() - assertTrue(config.disableMultipartFormDataSupport) - assertTrue(RestActionBuilderV3.Options(config).disableMultipartFormDataSupport) - assertFalse(RestActionBuilderV3.Options(disableMultipartFormDataSupport = false).disableMultipartFormDataSupport) + assertFalse(config.enableMultipartFormDataSupport) + assertFalse(RestActionBuilderV3.Options(config).enableMultipartFormDataSupport) + assertTrue(RestActionBuilderV3.Options(enableMultipartFormDataSupport = true).enableMultipartFormDataSupport) } @Test diff --git a/docs/options.md b/docs/options.md index f7a228abe4..7aced1fb28 100644 --- a/docs/options.md +++ b/docs/options.md @@ -281,7 +281,7 @@ There are 3 types of options: |`cgaNeighborhoodModel`| __Enum__. Cellular GA: neighborhood model (RING, L5, C9, C13). *Valid values*: `RING, L5, C9, C13`. *Default value*: `RING`.| |`classificationRepairThreshold`| __Double__. If using THRESHOLD for AI Classification Repair, specify its value. All classifications with probability equal or above such threshold value will be accepted. *Constraints*: `probability 0.0-1.0`. *Default value*: `0.5`.| |`collectSqlZ3Stats`| __Boolean__. Collect detailed statistics for Z3-based SQL generation: SAT/UNSAT/error counts, query uniqueness, Z3 execution time, and SMT-LIB generation time. Only meaningful when generateSqlDataWithZ3=true. *Depends on*: `generateSqlDataWithZ3=true`. *Default value*: `false`.| -|`disableMultipartFormDataSupport`| __Boolean__. Disable multipart/form-data support when building REST actions. *Default value*: `true`.| +|`enableMultipartFormDataSupport`| __Boolean__. Enable multipart/form-data support when building REST actions. *Default value*: `false`.| |`discoveredInfoRewardedInFitness`| __Boolean__. If there is new discovered information from a test execution, reward it in the fitness function. *Default value*: `false`.| |`dockerLocalhost`| __Boolean__. Replace references to 'localhost' to point to the actual host machine. Only needed when running EvoMaster inside Docker. *Default value*: `false`.| |`dpcTargetTestSize`| __Int__. Specify a max size of a test to be targeted when either DPC_INCREASING or DPC_DECREASING is enabled. *Default value*: `1`.| From 4099321d7150108a1fbdbc213a84f54e3adba252 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?ROMINA=20JULIETA=20SU=C3=81REZ?= Date: Thu, 13 Aug 2026 09:54:26 -0300 Subject: [PATCH 4/5] fix in key --- docs/options.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/options.md b/docs/options.md index 7aced1fb28..ef7fdc91e7 100644 --- a/docs/options.md +++ b/docs/options.md @@ -281,7 +281,6 @@ There are 3 types of options: |`cgaNeighborhoodModel`| __Enum__. Cellular GA: neighborhood model (RING, L5, C9, C13). *Valid values*: `RING, L5, C9, C13`. *Default value*: `RING`.| |`classificationRepairThreshold`| __Double__. If using THRESHOLD for AI Classification Repair, specify its value. All classifications with probability equal or above such threshold value will be accepted. *Constraints*: `probability 0.0-1.0`. *Default value*: `0.5`.| |`collectSqlZ3Stats`| __Boolean__. Collect detailed statistics for Z3-based SQL generation: SAT/UNSAT/error counts, query uniqueness, Z3 execution time, and SMT-LIB generation time. Only meaningful when generateSqlDataWithZ3=true. *Depends on*: `generateSqlDataWithZ3=true`. *Default value*: `false`.| -|`enableMultipartFormDataSupport`| __Boolean__. Enable multipart/form-data support when building REST actions. *Default value*: `false`.| |`discoveredInfoRewardedInFitness`| __Boolean__. If there is new discovered information from a test execution, reward it in the fitness function. *Default value*: `false`.| |`dockerLocalhost`| __Boolean__. Replace references to 'localhost' to point to the actual host machine. Only needed when running EvoMaster inside Docker. *Default value*: `false`.| |`dpcTargetTestSize`| __Int__. Specify a max size of a test to be targeted when either DPC_INCREASING or DPC_DECREASING is enabled. *Default value*: `1`.| @@ -290,6 +289,7 @@ There are 3 types of options: |`enableAdvancedFormats`| __Boolean__. Whether to enable the handling of new type formats in OpenAPI schemas, e.g., the ones introduced in 3.1.0. *Default value*: `false`.| |`enableCustomizedMethodForMockObjectHandling`| __Boolean__. Whether to apply customized method (i.e., implement 'customizeMockingRPCExternalService' for external services or 'customizeMockingDatabase' for database) to handle mock object. *Default value*: `false`.| |`enableCustomizedMethodForScheduleTaskHandling`| __Boolean__. Whether to apply customized method (i.e., implement 'customizeScheduleTaskInvocation' for invoking schedule task) to invoke schedule task. *Default value*: `false`.| +|`enableMultipartFormDataSupport`| __Boolean__. Enable multipart/form-data support when building REST actions. This feature is disabled by default. *Default value*: `false`.| |`enableRPCCustomizedTestOutput`| __Boolean__. Whether to enable customized RPC Test output if 'customizeRPCTestOutput' is implemented. *Default value*: `false`.| |`enableStaticFlakyInference`| __Boolean__. Specify whether to infer potential flakiness statically from response values, such as timestamps, UUIDs, hashes and runtime-specific messages. *Depends on*: `handleFlakiness=true`. *Default value*: `true`.| |`enableWriteSnapshotTests`| __Boolean__. Enable to print snapshots of the generated tests during the search in an interval defined in snapshotsInterval. *Default value*: `false`.| From fe897189379a505ad29335599b25c9386ccf9993 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?ROMINA=20JULIETA=20SU=C3=81REZ?= Date: Mon, 17 Aug 2026 15:07:15 -0300 Subject: [PATCH 5/5] Fix in comment --- core/src/main/kotlin/org/evomaster/core/EMConfig.kt | 3 +-- docs/options.md | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/core/src/main/kotlin/org/evomaster/core/EMConfig.kt b/core/src/main/kotlin/org/evomaster/core/EMConfig.kt index 5a95fbc7ad..9ad78df750 100644 --- a/core/src/main/kotlin/org/evomaster/core/EMConfig.kt +++ b/core/src/main/kotlin/org/evomaster/core/EMConfig.kt @@ -1379,8 +1379,7 @@ class EMConfig { var dtoForRequestPayload = false @Experimental - @Cfg("Enable multipart/form-data support when building REST actions." + - " This feature is disabled by default.") + @Cfg("Enable multipart/form-data support when building REST actions.") var enableMultipartFormDataSupport = false @Important(6.0) diff --git a/docs/options.md b/docs/options.md index ef7fdc91e7..9e78bd0202 100644 --- a/docs/options.md +++ b/docs/options.md @@ -289,7 +289,7 @@ There are 3 types of options: |`enableAdvancedFormats`| __Boolean__. Whether to enable the handling of new type formats in OpenAPI schemas, e.g., the ones introduced in 3.1.0. *Default value*: `false`.| |`enableCustomizedMethodForMockObjectHandling`| __Boolean__. Whether to apply customized method (i.e., implement 'customizeMockingRPCExternalService' for external services or 'customizeMockingDatabase' for database) to handle mock object. *Default value*: `false`.| |`enableCustomizedMethodForScheduleTaskHandling`| __Boolean__. Whether to apply customized method (i.e., implement 'customizeScheduleTaskInvocation' for invoking schedule task) to invoke schedule task. *Default value*: `false`.| -|`enableMultipartFormDataSupport`| __Boolean__. Enable multipart/form-data support when building REST actions. This feature is disabled by default. *Default value*: `false`.| +|`enableMultipartFormDataSupport`| __Boolean__. Enable multipart/form-data support when building REST actions. *Default value*: `false`.| |`enableRPCCustomizedTestOutput`| __Boolean__. Whether to enable customized RPC Test output if 'customizeRPCTestOutput' is implemented. *Default value*: `false`.| |`enableStaticFlakyInference`| __Boolean__. Specify whether to infer potential flakiness statically from response values, such as timestamps, UUIDs, hashes and runtime-specific messages. *Depends on*: `handleFlakiness=true`. *Default value*: `true`.| |`enableWriteSnapshotTests`| __Boolean__. Enable to print snapshots of the generated tests during the search in an interval defined in snapshotsInterval. *Default value*: `false`.|