Skip to content

Redis data generation.#1487

Open
aszyrej wants to merge 4 commits intomasterfrom
redis-e2e-extension
Open

Redis data generation.#1487
aszyrej wants to merge 4 commits intomasterfrom
redis-e2e-extension

Conversation

@aszyrej
Copy link
Copy Markdown
Collaborator

@aszyrej aszyrej commented Mar 25, 2026

Added Redis execution info extraction and data generation (only for GET command).

RedisActions are now included, and new data is being inserted into Redis. Test cases also include Redis new data using RedisDsl and a RedisWriter.

@aszyrej aszyrej requested a review from jgaleotti March 25, 2026 03:07
import java.util.ArrayList;
import java.util.List;

public class RedisExecutionsDto {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add class javadoc

@@ -0,0 +1,19 @@
package org.evomaster.client.java.controller.api.dto.database.execution;

public class RedisFailedCommand {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add class javadoc

import java.util.ArrayList;
import java.util.List;

public class RedisDatabaseCommandDto {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add Javadoc

@@ -0,0 +1,13 @@
package org.evomaster.client.java.controller.api.dto.database.operations;

public class RedisInsertionDto {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add Javadoc

public class RedisFailedCommand {
public String command;
public String type;
public String key;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add javadoc for fields


object RedisDbActionTransformer {

fun transform(actions: List<RedisDbAction>): RedisDatabaseCommandDto {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add javadoc.

import org.evomaster.client.java.controller.api.dto.database.execution.RedisExecutionsDto
import org.evomaster.client.java.controller.api.dto.database.execution.RedisFailedCommand

class RedisExecution(val failedCommands: MutableList<RedisFailedCommand>?) {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add javadoc.

return failedCommands
.filter { it.key !in existingKeys }
.map { cmd ->
val valueGene = StringGene("value").also {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a comment explaining more complex types should be supported here.

it.randomize(randomness, false)
}
RedisDbAction(
keyspace = "0",
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this keyspace always use? Can keyspace be different than 0?

return dto?.data
}

private fun <T> executeRedisDatabaseCommandAndGetResults(dto: RedisDatabaseCommandDto,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add javadoc

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