Skip to content

Support nested collections, sets, and nulls in EvoMaster Core for DynamoDB insertions - #1943

Open
aschenzle wants to merge 1 commit into
feat/ddb-collections-dto-dsl-controllerfrom
feat/ddb-collections-core
Open

aschenzle wants to merge 1 commit into
feat/ddb-collections-dto-dsl-controllerfrom
feat/ddb-collections-core

Conversation

@aschenzle

Copy link
Copy Markdown
Collaborator

Added support for DDB collections (Map, List, Set). Built mirrored core class to avoid all DTOs on Core.

Core DynamoDB Model & Builder

  • DynamoDbValueType: Introduces the core enum representing all supported DynamoDB attribute types (STRING, NUMBER, BOOLEAN, MAP, LIST, STRING_SET, NUMBER_SET, NULL) with DTO conversion helpers.
  • DynamoDbSetGene: Adds a fixed-size CompositeFixedGene preserving STRING_SET and NUMBER_SET semantics independently from LIST (TupleGene), including nested sets.
  • DynamoDbInsertBuilder:
    • Adds buildDocumentGene() to recursively build fixed-structure gene trees (ObjectGene for MAP, TupleGene for non-empty LIST, DynamoDbSetGene for STRING_SET/NUMBER_SET, mutable scalar genes for all scalar leaves, and ImmutableDataHolderGene for NULL and empty LIST).
    • Uses unique indexed child names ("${currentName}_$index") for list and set elements so TupleGeneImpact does not collide on heterogeneous lists.
  • DynamoDbAttributeGene / DynamoDbAction / DynamoDbActionTransformer:
    • Adds toPlainValue(), toDto(), and insertionKey() supporting nested documents, canonical sorted sets, and nulls.
    • Simplifies DynamoDbActionTransformer.transform() to delegate to attribute.toDto().

Test Generation

  • DynamoDbWriter: Emits .ddbJson(name, json) using AWS DynamoDB JSON wire format (M, L, SS, NS, NULL, S, N, BOOL) for collection/set/null attributes while keeping .d(name, value) for top-level scalars.

Tests & E2E

  • Unit tests: Expanded DynamoDbActionTest, DynamoDbActionTransformerTest, DynamoDbInsertBuilderTest, and DynamoDbWriterTest (including compilation/round-trip of generated Kotlin DSL calls via CompilerForTestGenerated).
  • E2E SUT & test: Added PlayerCollectionsApp, PlayerCollectionsRest, PlayerCollectionsController, and DynamoDbCollectionsEMTest under core-tests/e2e-tests/spring/spring-rest-dynamodb.

@aschenzle
aschenzle requested a review from jgaleotti November 19, 2026 20:41
@aschenzle
aschenzle added this pull request to stack #1942 November 19, 2026 20:42
@aschenzle
aschenzle removed this pull request from stack #1942 November 28, 2026 01:08
@aschenzle
aschenzle added this pull request to stack #1964 November 28, 2026 01:08
@aschenzle
aschenzle force-pushed the feat/ddb-collections-core branch from 9e603a7 to 05b4ae7 Compare November 28, 2026 02:03
@aschenzle
aschenzle removed this pull request from stack #1964 December 2, 2026 06:48
@aschenzle
aschenzle force-pushed the feat/ddb-collections-core branch from 05b4ae7 to 849da34 Compare December 2, 2026 06:56
@aschenzle
aschenzle added this pull request to stack #1960 December 2, 2026 07:00
@jgaleotti
jgaleotti requested a review from arcuri82 December 2, 2026 19:29
@aschenzle
aschenzle force-pushed the feat/ddb-collections-core branch from 849da34 to 88ca5b8 Compare December 4, 2026 04:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants