mcpbeat Sign in

Run Tests Agent Skill

Run project tests using Maven (mvn). Use when the user asks to run tests.

776 tokens
context cost
the whole folder, loaded on every use
1
files
instructions only
0
copies elsewhere
how many repositories repackaged it
2566
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/Azure/azure-sdk-for-java --skill run-tests

The instruction itself

9 sections, as written by the author

Run Tests (Maven)

Use Maven (mvn) to run tests. Confirm you are in a directory with a pom.xml (project root or module root).

Common commands

All tests (default)

mvn test

Specific module (multi-module)

mvn -pl <module> -am test

Specific test class or method (Surefire)

mvn -Dtest=MyTest test
mvn -Dtest=MyTest#myMethod test

Test modes (AZURE_TEST_MODE)

If the user asks for live/record/playback, set the env var for the command:

$env:AZURE_TEST_MODE = "LIVE"
mvn test

Running tests with secrets

Tests often require environment variables with connection strings, keys, or other secrets. If another skill or tool for loading secrets or work resources is available, consult the user and use it. Otherwise, ask the user to provide the required environment variables manually. To discover which variables are needed, search for classes named *ClientTestBase in the test sources — these typically define the expected environment variable names.

Steps

  • Ensure you're in the correct Maven project directory (contains pom.xml). If not, ask for the correct path.
  • Start simple: mvn "-Dtest=<TestClass>" test. Only add flags if something fails.
  • If the user provides a test name, use -Dtest=<pattern>.
  • If the user specifies a module, use -pl <module> -am test.
  • If the user specifies a test mode (LIVE/RECORD/PLAYBACK), set the env var.
  • If tests require secrets, use an available skill or tool for loading secrets if one exists (consult the user first); otherwise ask the user to provide the required environment variables manually.
  • If the command fails, report the error output and ask how they want to proceed.

Troubleshooting (only add flags when needed)

Apply these only if the simple mvn test command fails with the specific error described:

  • Samples fail to compile on Java 8 base-testCompile: add -Dbuildhelper.addtestsource.skip=true -Dbuildhelper.addtestresource.skip=true
  • JPMS/module-path errors (e.g., okio module issues): add -Dsurefire.useModulePath=false
  • Build plugins block the run: add skip flags as needed, e.g. -Denforcer.skip=true -Dcodesnippet.skip=true -Dcheckstyle.skip=true
  • Reactor blocking errors in async tests (Netty thread): add $env:AZURE_TEST_HTTP_CLIENTS = "okhttp"
  • SSL handshake / PKIX path building failed (SSLHandshakeException, unable to find valid certification path to requested target): the JVM's trust store is missing the corporate root CA. On Windows, add -Djavax.net.ssl.trustStoreType=WINDOWS-ROOT to use the Windows certificate store. On Linux/macOS, the corporate root CA must be imported into the JVM trust store (or configure a custom one via -Djavax.net.ssl.trustStore / -Djavax.net.ssl.trustStorePassword). This is common on corporate networks with proxy/firewall TLS interception.

Do NOT preemptively add all these flags. Start simple and escalate only on failure.

Other skills for the same job

different authors, same section of the catalogue
Webapp Testing
by anthropics
vendor ×12

Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.

6k tokens scripts
Finishing A Development Branch
by ZhanlinCui
×7

Use when implementation is complete, all tests pass, and you need to decide how to integrate the work - guides completion of development work by presenting structured options for merge, PR, or cleanup

1k tokens
Test Driven Development
by w95
×7

Use when implementing any feature or bugfix, before writing implementation code

2k tokens
Systematic Debugging
by ratacat
×7

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes

10k tokens scripts
Verification Before Completion
by ZhanlinCui
×6

Use when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always

1k tokens
Backtest Expert
by BaggaT236
×3

Expert guidance for systematic backtesting of trading strategies. Use when developing, testing, stress-testing, or validating quantitative trading strategies. Covers "beating ideas to death" methodology, parameter robustness testing, slippage modeling, bias prevention, and interpreting backtest results. Applicable when user asks about backtesting, strategy validation, robustness testing, avoiding overfitting, or systematic trading development.

15k tokens scripts
Adaptyv
by christophacham
×3

Cloud laboratory platform for automated protein testing and validation. Use when designing proteins and needing experimental validation including binding assays, expression testing, thermostability measurements, enzyme activity assays, or protein sequence optimization. Also use for submitting experiments via API, tracking experiment status, downloading results, optimizing protein sequences for better expression using computational tools (NetSolP, SoluProt, SolubleMPNN, ESM), or managing protein design workflows with wet-lab validation.

16k tokens
Aeon
by christophacham
×3

This skill should be used for time series machine learning tasks including classification, regression, clustering, forecasting, anomaly detection, segmentation, and similarity search. Use when working with temporal data, sequential patterns, or time-indexed observations requiring specialized algorithms beyond standard ML approaches. Particularly suited for univariate and multivariate time series analysis with scikit-learn compatible APIs.

19k tokens

How to use it

Copy the folder

Take azure/run-tests from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.