Agent skill

Writing Tests

by vert-x3 in vert-x3/vertx-redis-client

Testing patterns for Vert.x Redis Client: test frameworks, async testing, test locations, container setup, and how to run tests.

Apache-2.0Auto-check passedDatabases

Install Writing Tests

skills CLI
$ npx skills add vert-x3/vertx-redis-client --skill writing-tests -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install vert-x3/vertx-redis-client writing-tests --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/vert-x3/vertx-redis-client.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/writing-tests .claude/skills/writing-tests && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
writing-tests
GitHub stars
142
Token cost
~1.6k tokens
SKILL.md length
400 words
Files
1
Skills in repo
1
Repo updated
First seen
Licence
Apache-2.0

At a glance

Testing patterns for Vert.x Redis Client: test frameworks, async testing, test locations, container setup, and how to run tests.

  • Works in 4 steps: Forgetting to complete async tests —… → Using hardcoded Redis keys — Use… → Not closing the client — Always close… → …
  • Tasks that involve Test strategy
  • SKILL.md covers Test Framework, Test Annotations and Extensions, Async Test Patterns and Available Test Containers, plus 5 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Writing Tests is an agent skill from vert-x3/vertx-redis-client. Testing patterns for Vert.x Redis Client: test frameworks, async testing, test locations, container setup, and how to run tests.

Its SKILL.md is about 1.6k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Databases, covering Test strategy, Integration testing and Async programming. It works with Redis, Java and JUnit. The repository describes itself as: Redis client for Vert.x. The licence is Apache-2.0.

When your agent uses it

  • Tasks that involve Test strategy
  • Tasks that involve Integration testing
  • Tasks that involve Async programming

Example prompts

  • “/writing-tests”

Requirements

  • Docker

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Forgetting to complete async tests — Always call test.completeNow() or use test.succeedingThenComplete() / test.failingThenComplete()
  2. Using hardcoded Redis keys — Use TestUtils.randomKey() to prevent test interference
  3. Not closing the client — Always close Redis client in @AfterEach to avoid resource leaks
  4. Mixing up RedisAPI.api(client) vs RedisAPI.api(conn) — api(client) uses pooled connections, api(conn) uses a specific connection; choose…

What it can do on your machine

Read from SKILL.md and the folder at commit 39ef2b9. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are java).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Writing Tests loads about 1.6k tokens when it runs. Until then it costs about 36 tokens; SKILL.md has 400 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~36
When it runs · the whole SKILL.md, loaded when a task matches
~1.6k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from vert-x3/vertx-redis-client at commit 39ef2b9, republished under its Apache-2.0 licence (© vert-x3). 400 words, ~1,587 tokens.

Download SKILL.mdSave it as .claude/skills/writing-tests/SKILL.md (or your agent's skills folder).
name
writing-tests
description
Testing patterns for Vert.x Redis Client: test frameworks, async testing, test locations, container setup, and how to run tests.

Writing Tests

Vert.x Redis Client uses JUnit 5 with Vert.x-specific test utilities and Testcontainers for Redis infrastructure. Tests are mandatory for contributions.

Test Framework

  • JUnit 5 (Jupiter) — Standard test framework
  • VertxExtension — JUnit 5 extension for async tests
  • VertxTestContext — Async test utility for handling asynchronous operations
  • RunTestOnContext — JUnit 5 extension that provides a Vert.x instance and event loop context
  • Testcontainers — Docker-based Redis containers for integration tests

Test Annotations and Extensions

Standard Integration Test Setup
java
@ExtendWith(VertxExtension.class)
@Testcontainers
public class MyTest {

  @Container
  public static final RedisStandalone redis = new RedisStandalone();

  @RegisterExtension
  public final RunTestOnContext context = new RunTestOnContext();

  private Redis client;
  private RedisAPI api;

  @BeforeEach
  public void before(VertxTestContext test) {
    client = Redis.createClient(context.vertx(), new RedisOptions().setConnectionString(redis.getRedisUri()));
    client.connect().onComplete(test.succeeding(conn -> {
      api = RedisAPI.api(conn);
      test.completeNow();
    }));
  }

  @AfterEach
  public void after() {
    client.close();
  }
}

Async Test Patterns

Pattern 1: Using test.succeeding() with test.completeNow()

The most common pattern. Use test.succeeding() to assert the operation succeeded, then complete the test.

java
@Test
public void testSet(VertxTestContext test) {
  final String key = TestUtils.randomKey();
  api.set(List.of(key, "Hello"))
    .onComplete(test.succeeding(reply -> {
      assertEquals("OK", reply.toString());
      test.completeNow();
    }));
}
Pattern 2: Using test.succeedingThenComplete()

Shorthand when you only need to verify the operation succeeds without inspecting the result.

java
@Test
public void testDel(VertxTestContext test) {
  final String key = TestUtils.randomKey();
  api.set(List.of(key, "Hello"))
    .compose(ignored -> api.del(List.of(key)))
    .onComplete(test.succeedingThenComplete());
}
Pattern 3: Chaining with compose()

Chain multiple async operations using Future.compose().

java
@Test
public void testAppend(VertxTestContext test) {
  final String key = TestUtils.randomKey();
  api.del(List.of(key))
    .compose(ignored -> api.append(key, "Hello"))
    .compose(reply -> {
      assertEquals(5, reply.toLong());
      return api.append(key, " World");
    })
    .onComplete(test.succeeding(reply -> {
      assertEquals(11, reply.toLong());
      test.completeNow();
    }));
}
Pattern 4: Expecting failure with test.failingThenComplete()

When the operation is expected to fail.

java
@Test
public void testFailure(VertxTestContext test) {
  client.send(Request.cmd(Command.create("INVALID_COMMAND")))
    .onComplete(test.failingThenComplete());
}

Available Test Containers

All containers are in io.vertx.tests.redis.containers:

ContainerDescriptionUsage
RedisStandaloneSingle Redis instancenew RedisStandalone() or use RedisStandalone.builder() for options (version, password, TLS, mutual TLS, Unix domain sockets)
RedisClusterRedis Cluster setupClustered Redis with multiple nodes
RedisSentinelRedis Sentinel setupSentinel-managed Redis
RedisReplicationRedis Replication setupPrimary/replica Redis
PikaContainerPika (Redis-compatible)Alternative Redis-compatible store
ValkeyContainerValkey containerValkey (Redis fork)
Container Builder Example
java
@Container
public static final RedisStandalone redis = RedisStandalone.builder()
  .setVersion("7.2")
  .setPassword("secret")
  .build();

Test Location

  • Unit tests (no Redis required): src/test/java/io/vertx/tests/redis/internal/
    • Parser tests, URI handling, data structures (ArrayQueue, ZModem, MultiType, …)
  • Integration tests (require Docker): src/test/java/io/vertx/tests/redis/client/
    • Client tests, pub/sub, cluster, sentinel, replication, TLS, tracing, metrics, reconnect, …
  • Test containers: src/test/java/io/vertx/tests/redis/containers/
Show full SKILL.md (160 more words)Show less

Test Utilities

TestUtils.randomKey()

Always use TestUtils.randomKey() instead of hardcoded key names. This avoids collisions between test runs and parallel tests.

java
import static io.vertx.tests.redis.client.TestUtils.randomKey;

final String key = randomKey();
TestUtils.retryUntilSuccess()

Retry an async operation until it succeeds or reaches the maximum number of retries. Useful for waiting for cluster state to converge.

java
TestUtils.retryUntilSuccess(vertx, () -> api.clusterInfo(), 10)
  .onComplete(test.succeedingThenComplete());
TestUtils.executeWhenConditionSatisfied()

Wait until a boolean condition is true, then execute an action. Uses Vert.x timers (non-blocking).

java
TestUtils.executeWhenConditionSatisfied(vertx, () -> ready, () -> {
  // proceed with test
  test.completeNow();
});

Assertions

Use JUnit 5 assertions:

java
import static org.junit.jupiter.api.Assertions.*;

assertEquals(expected, actual);
assertTrue(condition);
assertFalse(condition);
assertNull(value);
assertNotNull(value);

Test Requirements

  • All new features must include tests
  • Tests must clean up resources — close clients in @AfterEach
  • Use random keys — TestUtils.randomKey() to avoid collisions
  • Integration tests need Docker — ensure Docker is running before executing

Common Pitfalls

  1. Forgetting to complete async tests — Always call test.completeNow() or use test.succeedingThenComplete() / test.failingThenComplete()
  2. Using hardcoded Redis keys — Use TestUtils.randomKey() to prevent test interference
  3. Not closing the client — Always close Redis client in @AfterEach to avoid resource leaks
  4. Mixing up RedisAPI.api(client) vs RedisAPI.api(conn) — api(client) uses pooled connections, api(conn) uses a specific connection; choose based on what you're testing

© vert-x3, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/writing-tests of vert-x3/vertx-redis-client.

Open the folder on GitHubat commit 39ef2b9

Compare with similar skills

Writing Tests next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Writing Tests compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Writing Tests this skillvert-x3/vertx-redis-client142—~1.6kAutomated safety check: PassApache-2.0
Extend Commands APIredis/lettuce5.8k—~7.7kAutomated safety check: NotesMIT
Extend Commands APIredis/jedis12k—~7.2kAutomated safety check: WarnMIT
Junit 5 Skillsickn33/agentic-awesome-skills47k1 repos~1.8kAutomated safety check: PassMIT
Spring Boot Test Patternsgiuseppe-trisciuoglio/developer-kit355—~2.3kAutomated safety check: NotesMIT
Unit Test Boundary Conditionsgiuseppe-trisciuoglio/developer-kit355—~2.3kAutomated safety check: NotesMIT

Similar skills

  • Extend Commands API

    redis/lettuce

    Official

    Add or extend Redis commands in the Lettuce client API end-to-end — a new core command, a family of new commands, an extension to an existing command's options, or a module/area command…

    5.8k GitHub stars~7.7k tokensUpdated yesterday
    DatabasesAuto-check: notes
  • Official

    Add or extend Redis commands in the Jedis client API — a new core command, a family of new commands, an extension to an existing command's options, or a module command (Search/TimeSeries/JSON/Bloom).

    12k GitHub stars~7.2k tokensUpdated yesterday
    DatabasesAuto-check: warnings
  • Junit 5 Skill

    sickn33/agentic-awesome-skills

    Generates production-grade JUnit 5 unit and integration tests in Java.

    47k GitHub starsUsed in 1 repo~1.8k tokens
    Testing & QAAuto-check passed
  • Spring Boot Test Patterns

    giuseppe-trisciuoglio/developer-kit

    Provides comprehensive testing patterns for Spring Boot applications covering unit, integration, slice, and container-based testing with JUnit 5, Mockito, Testcontainers, and performance optimization.

    355 GitHub stars~2.3k tokensUpdated 28 days ago
    Backend & APIsAuto-check: notes
  • Unit Test Boundary Conditions

    giuseppe-trisciuoglio/developer-kit

    Provides edge case, corner case, boundary condition, and limit testing patterns for Java unit tests.

    355 GitHub stars~2.3k tokensUpdated 28 days ago
    Testing & QAAuto-check: notes
  • Java Testing Junit Mockito

    makifbaysal/tasktrooper

    A skill your agent uses when writing tests for Java (Quarkus or Spring) code - JUnit Jupiter structure, Mockito for collaborators, test slices, Testcontainers, and framework-native integration…

    109 GitHub stars~1.1k tokensUpdated yesterday
    Testing & QAAuto-check passed

Works with

Questions about Writing Tests

What does Writing Tests do?

Testing patterns for Vert.x Redis Client: test frameworks, async testing, test locations, container setup, and how to run tests. Writing Tests is an agent skill from vert-x3/vertx-redis-client.x Redis Client: test frameworks, async testing, test locations, container setup, and how to run tests.

When should I use Writing Tests?

Writing Tests fits situations like: tasks that involve Test strategy; tasks that involve Integration testing; tasks that involve Async programming.

How do I install Writing Tests in Claude Code?

Run `npx skills add vert-x3/vertx-redis-client --skill writing-tests -a claude-code`. Or copy the skill folder (.agents/skills/writing-tests in vert-x3/vertx-redis-client) into .claude/skills/writing-tests in your project. Claude Code loads it when a task matches its description.

How do I install Writing Tests in Codex?

Run `npx skills add vert-x3/vertx-redis-client --skill writing-tests -a codex`. Or copy the skill folder (.agents/skills/writing-tests in vert-x3/vertx-redis-client) into .agents/skills/writing-tests in your project. Codex loads it when a task matches its description.

Can I use Writing Tests in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add vert-x3/vertx-redis-client --skill writing-tests -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/writing-tests, .gemini/skills/writing-tests, .github/skills/writing-tests and .opencode/skills/writing-tests in your project.

What does Writing Tests need to run?

SKILL.md names no scripts, command-line tools or credentials: Writing Tests is instructions for the agent only. Our summary lists: Docker.

Does Writing Tests access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Writing Tests safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Writing Tests use?

Writing Tests is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Writing Tests use?

About 1.6k tokens (SKILL.md is roughly 6.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Writing Tests?

Skills that share tags, products or a category with Writing Tests: Extend Commands API (redis/lettuce, 5.8k stars), Extend Commands API (redis/jedis, 12k stars), Junit 5 Skill (sickn33/agentic-awesome-skills, 47k stars) and Spring Boot Test Patterns (giuseppe-trisciuoglio/developer-kit, 355 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Writing Tests?

vert-x3 (a GitHub organization) maintains it in vert-x3/vertx-redis-client, which has 142 GitHub stars. The repository was last updated on October 7, 2026.

Source: vert-x3/vertx-redis-client on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.