Agent skill

Writing Tests

by quarkusio in quarkusio/quarkus

Testing patterns for Quarkus extensions: test annotations, test locations, QuarkusExtensionTest patterns, and how to run tests.

Apache-2.0Auto-check passedTesting & QA

Install Writing Tests

skills CLI
$ npx skills add quarkusio/quarkus --skill writing-tests -a claude-code

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

GitHub CLI
$ gh skill install quarkusio/quarkus 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/quarkusio/quarkus.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
16k
Token cost
~1k tokens
SKILL.md length
402 words
Files
1
Skills in repo
12
Repo updated
First seen
Licence
Apache-2.0

At a glance

Testing patterns for Quarkus extensions: test annotations, test locations, QuarkusExtensionTest patterns, and how to run tests.

  • Tasks that involve Test strategy
  • SKILL.md covers Test Annotations, Test Extensions (used with…, Test Location and QuarkusExtensionTest Pattern, 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 quarkusio/quarkus. Testing patterns for Quarkus extensions: test annotations, test locations, QuarkusExtensionTest patterns, and how to run tests.

Its SKILL.md is about 1k 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 Testing & QA, covering Test strategy. The repository describes itself as: Quarkus: Supersonic Subatomic Java. The licence is Apache-2.0.

When your agent uses it

  • Tasks that involve Test strategy

Example prompts

  • “/writing-tests”

Requirements

  • Docker

What it can do on your machine

Read from SKILL.md and the folder at commit 8a03c56. 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 bash and 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 1k tokens when it runs. Until then it costs about 35 tokens; SKILL.md has 402 words of instructions outside code blocks.

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

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 quarkusio/quarkus at commit 8a03c56, republished under its Apache-2.0 licence (© quarkusio). 402 words, ~1,034 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 Quarkus extensions: test annotations, test locations, QuarkusExtensionTest patterns, and how to run tests.

Writing Tests

Quarkus uses JUnit 5 with custom extensions. Tests and documentation are mandatory for contributions.

Test Annotations

  • @QuarkusTest — Starts a full Quarkus application. Use for integration tests in integration-tests/.
  • @QuarkusIntegrationTest — Tests against a built artifact (JAR or native binary). In the main repo, most run only with -Dnative.

Test Extensions (used with @RegisterExtension)

  • QuarkusExtensionTest — Used in deployment module tests. Creates a synthetic application defined in the test. This is the primary way to test build-time behavior. Replaces the deprecated QuarkusUnitTest.
    • When writing these tests, if Quarkus configuration needs to be specified, prefer the overrideConfigKey and overrideRuntimeConfigKey methods of QuarkusExtensionTest
  • QuarkusDevModeTest — Tests hot reload / dev mode behavior.

Test Location

  • Extension tests for deployment logic: extensions/<name>/deployment/src/test/
  • Integration tests needing a running app: integration-tests/
  • Deployment module tests use QuarkusExtensionTest, NOT @QuarkusTest

QuarkusExtensionTest Pattern

java
@RegisterExtension
static final QuarkusExtensionTest config = new QuarkusExtensionTest()
    .withApplicationRoot((jar) -> jar
        .addClasses(MyResource.class, MyService.class));

@Test
void testFeature() {
    // test with RestAssured or similar
}

If the tests have to set Quarkus configuration, then using QuarkusExtensionTest#overrideConfigKey for build time configuration and QuarkusExtensionTest#overrideRuntimeConfigKey for runtime configuration is preferable.

Running Tests

bash
# Run tests for an extension
./mvnw verify -f extensions/<name>/

# Run a single test class
./mvnw test -f integration-tests/<name>/ -Dtest=MyTest

# Run a single test method
./mvnw verify -Dtest=fully.qualified.ClassName#methodName

# Native integration tests
./mvnw verify -f integration-tests/<name>/ -Dnative

Native Test Registration

Native tests are split into parallel categories for CI performance. Each new integration test module must be registered in .github/native-tests.json to have its native tests run in CI. Without this, -Dnative tests will not execute for the module.

Note: @QuarkusIntegrationTest tests in the main repo only run when -Dnative is passed — even verify with -DskipITs=false will not trigger them.

MicroProfile TCK Tests

The tcks/ module contains MicroProfile TCK tests (Config, JWT, Fault Tolerance, Health, Metrics, OpenAPI, Telemetry, REST Client, Reactive Messaging, Context Propagation). If your work touches any of these areas, run the TCKs:

bash
# Run all TCKs
./mvnw verify -f tcks/ -Ptcks

# Run a specific TCK
./mvnw verify -f tcks/<area>/ -Ptcks
Show full SKILL.md (150 more words)Show less

Assertions

  • Prefer AssertJ (org.assertj.core.api.Assertions.assertThat) over JUnit 5 assertions (org.junit.jupiter.api.Assertions). AssertJ provides fluent, readable assertions and better failure messages.
  • Use RestAssured for HTTP endpoint testing.

Key Rules

  • Do NOT use @QuarkusTest in deployment module tests — use QuarkusExtensionTest
  • Integration tests belong in integration-tests/, not in extension modules
  • Use RestAssured for HTTP endpoint testing
  • Test in both JVM and native mode for non-trivial changes
  • New native tests must be registered in .github/native-tests.json
  • Verify that build-time errors produce clear, actionable error messages
  • Container engine (Docker/Podman) is needed for dev-services tests
  • Parallel test execution is not supported
  • When writing a test that verifies a bug has been fixed, ensure that the test has run against the code that does not contain the fix and verify this test fails. This provides some confidence that the test does actually verify the fix; in other words, this addresses the never trust a test you haven't seen fail adage

© quarkusio, 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 quarkusio/quarkus.

Open the folder on GitHubat commit 8a03c56

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 skillquarkusio/quarkus16k—~1kAutomated safety check: PassApache-2.0
Testing OpenLogi UIAprilNEA/OpenLogi23k—~1.1kAutomated safety check: PassApache-2.0
Testing Hashqlhashintel/hash1.7k—~1.9kAutomated safety check: PassAGPL-3.0
Dynamo Unit TestingDynamoDS/Dynamo2k—~622Automated safety check: PassApache-2.0
Designing TestsCloudAI-X/opencode-workflow275—~2.9kAutomated safety check: PassMIT
Openprd Test StrategyDavidLam-oss/obsidian-wechat-converter334—~578Automated safety check: PassMIT

Similar skills

  • Testing OpenLogi UI

    AprilNEA/OpenLogi

    Verifies OpenLogi's native GPUI interface with focused tests, the component gallery and a mock agent, choosing the evidence that fits each change.

    23k GitHub stars~1.1k tokensUpdated today
    Testing & QAAuto-check passed
  • Testing Hashql

    hashintel/hash

    HashQL testing strategies including compiletest (UI tests), unit tests, and snapshot tests.

    1.7k GitHub stars~1.9k tokensUpdated today
    Testing & QAAuto-check passed
  • Dynamo Unit Testing

    DynamoDS/Dynamo

    Write comprehensive NUnit tests for the Dynamo codebase following Dynamo testing patterns, conventions, and architectural constraints.

    2k GitHub stars~622 tokensUpdated today
    Testing & QAAuto-check passed
  • Designing Tests

    CloudAI-X/opencode-workflow

    Guides test strategy, TDD/BDD approaches, test coverage planning, and testing best practices.

    275 GitHub stars~2.9k tokensUpdated 9 mo ago
    Testing & QAAuto-check passed
  • Openprd Test Strategy

    DavidLam-oss/obsidian-wechat-converter

    OpenPrd 测试策略分流 skill:按风险把任务分到单元、集成、端到端、人工、视觉、小程序、性能和安全验证,并要求 evidence-plan。

    334 GitHub stars~578 tokensUpdated today
    Testing & QAAuto-check passed
  • Go Testing

    Gentleman-Programming/gentle-ai

    Trigger: Go tests, go test coverage, Bubbletea teatest, golden files.

    7.6k GitHub stars~550 tokensUpdated today
    Testing & QAAuto-check passed

More from quarkusio/quarkus

All 12 skills in this repo
  • Manage Deprecations

    quarkusio/quarkus

    Maintain @Deprecated code in the Quarkus codebase: remove code that has been deprecated for more than 12 months, add the @Deprecated annotations that were missed when a related element was…

    16k GitHub stars~2.8k tokensUpdated today
    Auto-check passed
  • Building And Testing

    quarkusio/quarkus

    How to build and test Quarkus: Maven commands, build flags, incremental builds, justfile aliases, and important build rules.

    16k GitHub stars~615 tokensUpdated today
    Auto-check passed
  • Building Docs

    quarkusio/quarkus

    How to build, preview, and verify Quarkus documentation locally: root Maven build, docs rebuild, Roq dev server preview.

    16k GitHub stars~1.8k tokensUpdated today
    Auto-check passed
  • Quarkus split classloading model, runtime-dev module wiring, conditional dependencies, and common classloading mistakes.

    16k GitHub stars~635 tokensUpdated today
    Auto-check passed
  • Step-by-step guide for converting Quarkus extensions from the legacy @Record/@Recorder pattern to the ServiceRegistrar service system.

    16k GitHub stars~4.6k tokensUpdated today
    Auto-check passed
  • Creating Extensions

    quarkusio/quarkus

    How to create a new Quarkus extension: full module layout, package naming, artifact naming, dependency rules, and Dev UI setup.

    16k GitHub stars~929 tokensUpdated today
    Auto-check passed

Categories

Questions about Writing Tests

What does Writing Tests do?

Testing patterns for Quarkus extensions: test annotations, test locations, QuarkusExtensionTest patterns, and how to run tests. Writing Tests is an agent skill from quarkusio/quarkus. Testing patterns for Quarkus extensions: test annotations, test locations, QuarkusExtensionTest patterns, and how to run tests.

When should I use Writing Tests?

Writing Tests fits situations like: tasks that involve Test strategy.

How do I install Writing Tests in Claude Code?

Run `npx skills add quarkusio/quarkus --skill writing-tests -a claude-code`. Or copy the skill folder (.agents/skills/writing-tests in quarkusio/quarkus) 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 quarkusio/quarkus --skill writing-tests -a codex`. Or copy the skill folder (.agents/skills/writing-tests in quarkusio/quarkus) 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 quarkusio/quarkus --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 1k tokens (SKILL.md is roughly 4.1k 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: Testing OpenLogi UI (AprilNEA/OpenLogi, 23k stars), Testing Hashql (hashintel/hash, 1.7k stars), Dynamo Unit Testing (DynamoDS/Dynamo, 2k stars) and Designing Tests (CloudAI-X/opencode-workflow, 275 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Writing Tests?

quarkusio (a GitHub organization) maintains it in quarkusio/quarkus, which has 15,933 GitHub stars. The repository holds 12 skills in this directory. The repository was last updated on October 9, 2026.

Source: quarkusio/quarkus on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.