Add support to xml data type#1393
Add support to xml data type#1393suarezrominajulieta wants to merge 31 commits intoWebFuzzing:masterfrom
Conversation
arcuri82
left a comment
There was a problem hiding this comment.
@suarezrominajulieta thx for your first PR! see comments
core/src/main/kotlin/org/evomaster/core/output/service/HttpWsTestCaseWriter.kt
Outdated
Show resolved
Hide resolved
core/src/main/kotlin/org/evomaster/core/problem/rest/builder/RestActionBuilderV3.kt
Outdated
Show resolved
Hide resolved
core/src/main/kotlin/org/evomaster/core/search/gene/ObjectGene.kt
Outdated
Show resolved
Hide resolved
core/src/main/kotlin/org/evomaster/core/search/gene/ObjectGene.kt
Outdated
Show resolved
Hide resolved
core/src/main/kotlin/org/evomaster/core/search/gene/ObjectGene.kt
Outdated
Show resolved
Hide resolved
core/src/main/kotlin/org/evomaster/core/search/gene/ObjectGene.kt
Outdated
Show resolved
Hide resolved
core/src/main/kotlin/org/evomaster/core/search/gene/ObjectGene.kt
Outdated
Show resolved
Hide resolved
core/src/main/kotlin/org/evomaster/core/search/gene/ObjectWithAttributesGene.kt
Outdated
Show resolved
Hide resolved
|
thank you for the comments! I'll look into them |
78fbc42 to
5617fa1
Compare
commit 4105091 Merge: a2aac9d 8fcd380 Author: ROMINA JULIETA SUÁREZ <romi_de_munro@hotmail.com> Date: Mon Feb 2 21:32:01 2026 -0300 Merge branch 'master' into master_temp commit a2aac9d Author: ROMINA JULIETA SUÁREZ <romi_de_munro@hotmail.com> Date: Sun Feb 1 21:49:29 2026 -0300 Fix tests commit c2b1461 Author: ROMINA JULIETA SUÁREZ <romi_de_munro@hotmail.com> Date: Sun Feb 1 21:32:42 2026 -0300 Fixes for pr commit 1b4d1c7 Merge: cc9d149 7d0333f Author: ROMINA JULIETA SUÁREZ <romi_de_munro@hotmail.com> Date: Sun Feb 1 17:07:14 2026 -0300 Merge branch 'master' into master_temp commit cc9d149 Author: ROMINA JULIETA SUÁREZ <romi_de_munro@hotmail.com> Date: Thu Jan 29 19:45:12 2026 -0300 Try fixing Genes commit ee978c9 Author: ROMINA JULIETA SUÁREZ <romi_de_munro@hotmail.com> Date: Thu Jan 29 19:39:34 2026 -0300 Try excluding problematic genes commit 875653e Merge: fac65b4 39de778 Author: ROMINA JULIETA SUÁREZ <romi_de_munro@hotmail.com> Date: Thu Jan 29 00:22:31 2026 -0300 Merge branch 'master' into master_temp commit fac65b4 Author: ROMINA JULIETA SUÁREZ <romi_de_munro@hotmail.com> Date: Wed Jan 28 23:05:46 2026 -0300 whitebox test passed commit 437766c Author: ROMINA JULIETA SUÁREZ <romi_de_munro@hotmail.com> Date: Wed Jan 28 21:16:01 2026 -0300 Fix whitebox commit a6c9666 Author: ROMINA JULIETA SUÁREZ <romi_de_munro@hotmail.com> Date: Tue Jan 27 21:47:53 2026 -0300 Change for items_item commit ccaee1a Author: ROMINA JULIETA SUÁREZ <romi_de_munro@hotmail.com> Date: Tue Jan 27 00:15:10 2026 -0300 fix the faults tests for bbxml commit 2169cd9 Merge: 4f71753 1354ec1 Author: ROMINA JULIETA SUÁREZ <romi_de_munro@hotmail.com> Date: Mon Jan 26 18:29:57 2026 -0300 Merge branch 'master' into master_temp commit 4f71753 Author: ROMINA JULIETA SUÁREZ <romi_de_munro@hotmail.com> Date: Mon Jan 26 00:03:45 2026 -0300 Fixes for bbxmltest commit 62b2ff9 Author: ROMINA JULIETA SUÁREZ <romi_de_munro@hotmail.com> Date: Sun Jan 25 23:01:11 2026 -0300 try to log the error commit b931cfd Author: ROMINA JULIETA SUÁREZ <romi_de_munro@hotmail.com> Date: Sun Jan 25 19:58:03 2026 -0300 try again commit 550fb33 Author: ROMINA JULIETA SUÁREZ <romi_de_munro@hotmail.com> Date: Sun Jan 25 17:32:17 2026 -0300 try catch the error commit 29daedc Author: ROMINA JULIETA SUÁREZ <romi_de_munro@hotmail.com> Date: Sun Jan 25 10:15:51 2026 -0300 try only containssamevalueas commit 9f7c967 Author: ROMINA JULIETA SUÁREZ <romi_de_munro@hotmail.com> Date: Sun Jan 25 02:34:42 2026 -0300 try without those functions commit ca6674c Merge: c4e495e e3eca4a Author: ROMINA JULIETA SUÁREZ <romi_de_munro@hotmail.com> Date: Sat Jan 24 11:27:12 2026 -0300 Merge branch 'master' into master_temp commit c4e495e Author: ROMINA JULIETA SUÁREZ <romi_de_munro@hotmail.com> Date: Sat Jan 24 00:09:29 2026 -0300 try 2nd version commit 8b3c79d Author: ROMINA JULIETA SUÁREZ <romi_de_munro@hotmail.com> Date: Sat Jan 24 00:07:16 2026 -0300 try this version commit 3b8441d Author: ROMINA JULIETA SUÁREZ <romi_de_munro@hotmail.com> Date: Fri Jan 23 19:25:44 2026 -0300 try commit 74e95c5 Author: ROMINA JULIETA SUÁREZ <romi_de_munro@hotmail.com> Date: Fri Jan 23 00:35:51 2026 -0300 try commit 1f9adef Author: ROMINA JULIETA SUÁREZ <romi_de_munro@hotmail.com> Date: Wed Jan 21 22:55:18 2026 -0300 try ci for sampler commit 2baac85 Author: ROMINA JULIETA SUÁREZ <romi_de_munro@hotmail.com> Date: Mon Jan 19 23:19:42 2026 -0300 fix _items not child commit 516e713 Author: ROMINA JULIETA SUÁREZ <romi_de_munro@hotmail.com> Date: Sun Jan 18 23:33:21 2026 -0300 Quitamos el ref, dejamos el _items por el test de stacktrace commit ccde334 Author: ROMINA JULIETA SUÁREZ <romi_de_munro@hotmail.com> Date: Sun Jan 18 00:54:21 2026 -0300 update reference in restAction for _items commit a62edfa Author: ROMINA JULIETA SUÁREZ <romi_de_munro@hotmail.com> Date: Sat Jan 17 23:18:30 2026 -0300 Update sampler commit 804d9eb Author: ROMINA JULIETA SUÁREZ <romi_de_munro@hotmail.com> Date: Sat Jan 17 20:30:40 2026 -0300 Update GeneSamplerForTests.kt commit 3638350 Merge: e4ec618 319e839 Author: ROMINA JULIETA SUÁREZ <romi_de_munro@hotmail.com> Date: Sat Jan 17 19:11:16 2026 -0300 Merge branch 'master' into master_temp commit e4ec618 Author: ROMINA JULIETA SUÁREZ <romi_de_munro@hotmail.com> Date: Sat Jan 17 18:49:45 2026 -0300 update tests commit 4cfe9d6 Author: ROMINA JULIETA SUÁREZ <romi_de_munro@hotmail.com> Date: Sat Jan 17 13:45:57 2026 -0300 some changes commit 2f677b5 Merge: ba340f1 af2b540 Author: ROMINA JULIETA SUÁREZ <romi_de_munro@hotmail.com> Date: Fri Jan 16 10:53:17 2026 -0300 Merge branch 'master' into master_temp commit ba340f1 Author: ROMINA JULIETA SUÁREZ <romi_de_munro@hotmail.com> Date: Fri Jan 16 10:53:05 2026 -0300 Update RestActionBuilderV3.kt commit db4c99f Author: ROMINA JULIETA SUÁREZ <romi_de_munro@hotmail.com> Date: Fri Jan 16 00:57:28 2026 -0300 try ci commit 98f04c6 Author: ROMINA JULIETA SUÁREZ <romi_de_munro@hotmail.com> Date: Fri Jan 16 00:24:57 2026 -0300 Quito validacion que ya realiza objectGene commit 55b5c6c Author: ROMINA JULIETA SUÁREZ <romi_de_munro@hotmail.com> Date: Wed Jan 14 23:57:23 2026 -0300 Change in white test and sut commit 5c150c4 Merge: 5096e0a 0869cd7 Author: ROMINA JULIETA SUÁREZ <romi_de_munro@hotmail.com> Date: Wed Jan 14 21:03:25 2026 -0300 Merge branch 'master' into master_temp commit 5096e0a Author: ROMINA JULIETA SUÁREZ <romi_de_munro@hotmail.com> Date: Tue Jan 13 22:57:23 2026 -0300 Try ci without white box test commit 76fa3c7 Author: ROMINA JULIETA SUÁREZ <romi_de_munro@hotmail.com> Date: Mon Jan 12 20:41:29 2026 -0300 Try changes from rest and objectGene commit 13b3acf Author: Romihime <romi_de_munro@hotmail.com> Date: Wed Jan 7 00:04:11 2026 -0300 Try CI again commit b606ef4 Merge: 2204d25 6364863 Author: Romihime <romi_de_munro@hotmail.com> Date: Tue Jan 6 23:30:20 2026 -0300 Merge branch 'develop_xml2' into master_temp commit 2204d25 Merge: 78fbc42 5617fa1 Author: Romihime <romi_de_munro@hotmail.com> Date: Tue Jan 6 23:28:55 2026 -0300 Merge branch 'master' of https://github.com/suarezrominajulieta/EvoMaster commit 6364863 Author: Romihime <romi_de_munro@hotmail.com> Date: Mon Jan 5 23:36:29 2026 -0300 Add whitebox simple test commit 750380e Author: Romihime <romi_de_munro@hotmail.com> Date: Sun Jan 4 17:30:48 2026 -0300 try ci commit 2b533dd Author: Romihime <romi_de_munro@hotmail.com> Date: Thu Jan 1 12:26:11 2026 -0300 Fix: this is not a valid test commit 6b54851 Author: Romihime <romi_de_munro@hotmail.com> Date: Thu Jan 1 11:53:52 2026 -0300 Add test to ArrayGene and check if it prints ok with xml mode commit 0f1894a Author: Romihime <romi_de_munro@hotmail.com> Date: Mon Dec 29 23:59:54 2025 -0300 Fixed the application, only missing the [ fix on arrays commit 72ca9e3 Author: Romihime <romi_de_munro@hotmail.com> Date: Mon Dec 29 00:25:27 2025 -0300 We need name otherwise it is body commit 170dd03 Author: Romihime <romi_de_munro@hotmail.com> Date: Sun Dec 28 23:47:44 2025 -0300 Move objectWithAttributesGeneTest and fix logs commit 18ad2c9 Author: Romihime <romi_de_munro@hotmail.com> Date: Sun Dec 28 18:19:45 2025 -0300 Seven out of nine comments commit fbb6378 Author: Romihime <romi_de_munro@hotmail.com> Date: Sun Dec 28 00:01:49 2025 -0300 try ci commit 5110c21 Author: Romihime <romi_de_munro@hotmail.com> Date: Sun Dec 21 21:30:24 2025 -0300 try commit e502b99 Author: Romihime <romi_de_munro@hotmail.com> Date: Mon Dec 15 20:06:05 2025 -0300 Somefixes commit 78fbc42 Merge: 4a89841 9204b77 Author: Juan Pablo Galeotti <jgaleotti@gmail.com> Date: Wed Nov 26 09:52:54 2025 -0300 Merge pull request #2 from suarezrominajulieta/develop_xml2 support for XML attributes using ObjectGeneWithAttributes commit 9204b77 Merge: fb8565e 4a89841 Author: Romihime <romi_de_munro@hotmail.com> Date: Tue Nov 25 22:47:20 2025 -0300 Merge branch 'master' into develop_xml2 commit fb8565e Author: Romihime <romi_de_munro@hotmail.com> Date: Tue Nov 25 19:17:37 2025 -0300 Try commit 0325e67 Author: Romihime <romi_de_munro@hotmail.com> Date: Tue Nov 25 07:57:08 2025 -0300 Fix commit 801575a Author: Romihime <romi_de_munro@hotmail.com> Date: Mon Nov 24 22:01:42 2025 -0300 Changes from pr commit 4336523 Author: Romihime <romi_de_munro@hotmail.com> Date: Wed Nov 19 22:16:21 2025 -0300 Fix cuantity of genes commit efac187 Merge: 9303840 5bbad0a Author: Romihime <romi_de_munro@hotmail.com> Date: Wed Nov 19 20:24:18 2025 -0300 Merge branch 'master' into develop_xml2 commit 9303840 Author: Romihime <romi_de_munro@hotmail.com> Date: Wed Nov 19 20:03:21 2025 -0300 Fix restActionBuilderV3 commit c739885 Author: Romihime <romi_de_munro@hotmail.com> Date: Wed Nov 19 19:48:08 2025 -0300 Update HttpWsTestCaseWriter.kt commit 87e97ab Author: Romihime <romi_de_munro@hotmail.com> Date: Mon Nov 17 21:22:30 2025 -0300 New branch_xml due to changes from master
|
Hi Andrea @arcuri82 , how are you? Sorry for the delay, I made a few changes to the comments and added the tests. I'd appreciate it if you had a moment to look at them. Thank you very much! |
...spring/spring-rest-bb/src/test/kotlin/org/evomaster/e2etests/spring/rest/bb/xml/BBXMLTest.kt
Outdated
Show resolved
Hide resolved
core/src/main/kotlin/org/evomaster/core/problem/rest/builder/RestActionBuilderV3.kt
Show resolved
Hide resolved
core/src/main/kotlin/org/evomaster/core/search/gene/collection/ArrayGene.kt
Show resolved
Hide resolved
core/src/test/kotlin/org/evomaster/core/search/gene/ArrayGeneTest.kt
Outdated
Show resolved
Hide resolved
core/src/test/kotlin/org/evomaster/core/search/gene/GeneRandomizedTest.kt
Outdated
Show resolved
Hide resolved
core/src/test/kotlin/org/evomaster/core/search/gene/GeneRandomizedTest.kt
Outdated
Show resolved
Hide resolved
core/src/test/kotlin/org/evomaster/core/search/gene/GeneRandomizedTest.kt
Outdated
Show resolved
Hide resolved
core/src/test/kotlin/org/evomaster/core/search/gene/ArrayGeneTest.kt
Outdated
Show resolved
Hide resolved
|
Hi, i made the changes requested: i fixed the bbxml test, add the comments, removed the spanish comments, and the changes to the GeneRandomisedTest, that i didn't want to change, it was a mistake. Thank you! |
| import org.slf4j.Logger | ||
| import org.slf4j.LoggerFactory | ||
|
|
||
| class ObjectWithAttributesGene( |
There was a problem hiding this comment.
add couple of sentences in /** */ to state differences of this class from ObjectGene
| isFixed: Boolean, | ||
| template: PairGene<StringGene, Gene>? = null, | ||
| additionalFields: MutableList<PairGene<StringGene, Gene>>? = null, | ||
| val attributeNames: Set<String> = emptySet() |
There was a problem hiding this comment.
specify how/what this attributeNames name is
| .filter { it !is OptionalGene || (it.isActive && it.gene !is CycleObjectGene) } | ||
| .filter { it.isPrintable() } | ||
|
|
||
| val attributeFields = includedFields.filter { attributeNames.contains(it.name) } |
There was a problem hiding this comment.
is this attributeFields variable used anywhere?
|
|
||
| // "#text" CANNOT be an attribute - warn if schema incorrectly defines it as one | ||
| if (attributeNames.contains("#text")) { | ||
| LoggingUtil.uniqueWarn(log, "Invalid XML schema: '#text' cannot be used as an attribute. It will be treated as content instead.") |
There was a problem hiding this comment.
should rather throw an IllegalArgument exception
There was a problem hiding this comment.
also, is there any invariant/property that should old for this attributeNames input field? eg, should all of its content defined under fixedFields? ie, what happen if we have a name in attirbuteNames that is no present in the fields of the object?
There was a problem hiding this comment.
Right now, if the object is in the set of attributes but not in fixedFields, nothing happens; it's not printed. Should we throw an exception instead?
| isFixed, | ||
| template, | ||
| copiedAdditional, | ||
| attributeNames.toMutableSet() |
| // If other is also ObjectWithAttributesGene, attributeNames must match | ||
| // If other is plain ObjectGene, this.attributeNames must be empty to produce same XML | ||
| if (other is ObjectWithAttributesGene) { | ||
| if (this.attributeNames != other.attributeNames) { |
There was a problem hiding this comment.
is this correct? isn't it checking reference equality instead of set content?
There was a problem hiding this comment.
Hi @arcuri82 — correct me if I'm wrong, but in Kotlin != calls .equals() under the hood, so this is comparing by content, not by reference (reference identity would require !==). Since Set.equals() checks that both sets contain the same elements regardless of order, I believe the comparison is correct: two ObjectWithAttributesGene instances with the same attribute names — even if constructed separately — should be considered equivalent for the purposes of this method. Please let me know if you had something else in mind!
| .filter { it.isPrintable() } | ||
|
|
||
| val attributeFields = includedFields.filter { attributeNames.contains(it.name) } | ||
| val childFields = includedFields.filter { !attributeNames.contains(it.name) } |
There was a problem hiding this comment.
should rather use partition{} instead of filter
No description provided.