Testing Software

VerifiedCaution

Write effective tests for code quality and reliability. Covers unit, integration, and E2E testing.

Sby Skills Guide Bot
TestingIntermediate
7/23/2026
Claude Code
#unit-testing#integration-testing#e2e-testing#test-coverage#chrome-devtools

Recommended for

Automated summary

Guides an agent through writing deterministic unit, integration, and E2E tests, including coverage analysis and browser-based checks with Chrome DevTools.

Strengths

  • Combines a testing-pyramid workflow with concrete checklists for analysis, edge cases, regression tests, and E2E flows.
  • Includes an Arrange-Act-Assert example using JUnit 5 and Mockito plus common Maven commands for running tests and generating JaCoCo coverage.
  • Uses Glob/Grep to locate untested code and Chrome DevTools MCP for browser automation, screenshots, Lighthouse, and console checks.

Limitations

  • Code examples and commands are Java/Maven-centric; other stacks get principles but not framework-specific patterns.
  • E2E browser automation depends on the Chrome DevTools MCP tools being available and configured.
  • Does not prescribe a coverage threshold or detailed strategy for diagnosing flaky tests.
When to use it

Use when adding or improving tests for a feature or bug fix, checking coverage gaps, or validating a user flow in a real browser.

When not to use it

Do not use as the sole reference for non-Java test framework setup or when Chrome DevTools MCP access is unavailable for required E2E work.

Security analysis

Caution
Quality score78/100

No destructive, exfiltration, obfuscated, or safety-disabling instructions are present. The risk is moderate because the skill grants Bash and Chrome DevTools access, but those tools are used for ordinary testing and browser E2E workflows.

Findings
  • •Declares Bash and mcp__chrome-devtools__*, enabling command execution and browser/network automation; usage in the file is limited to legitimate Maven test commands and E2E checks.
  • •Commands such as `mvn test` execute code from the target project, so the skill should only be used in trusted repositories.
How this analysis is made

Examples

Add unit tests for a service
Add JUnit 5 and Mockito unit tests for UserService.register, covering a valid email and an invalid email, then run mvn test -Dtest=UserServiceTest.
Find coverage gaps
Use Glob and Grep to find public functions in src/main/java that have no corresponding tests, then add focused unit tests for the most important gaps.
E2E checkout flow
Use Chrome DevTools to run an E2E test of the checkout flow: fill the form, submit it, capture a screenshot, and check the console for errors.

name: testing description: Write effective tests for code quality and reliability. Use when implementing features, fixing bugs, or improving coverage. Covers unit, integration, and E2E testing. allowed-tools: Read, Write, Edit, Bash, Glob, Grep, mcp__chrome-devtools__*

Testing Software

MCP Tools

Chrome DevTools (E2E testing):

  • Automate user flows in real browser
  • Capture screenshots for visual regression
  • Run Lighthouse for accessibility testing
  • Profile performance during test runs

Testing Pyramid

  1. Unit Tests (Many): Fast, isolated, test single units
  2. Integration Tests (Some): Test component interactions
  3. E2E Tests (Few): Test complete user flows — use Chrome DevTools

Workflows

  • [ ] Analyze: Use Glob and Grep to identify untested code
  • [ ] Unit Tests: Cover all public functions
  • [ ] Edge Cases: Test boundaries and error conditions
  • [ ] Integration: Test external dependencies
  • [ ] E2E: Use Chrome DevTools for browser automation
  • [ ] Regression: Add test for each bug fix

Test Quality Standards

Deterministic

Tests must produce the same result every time.

Isolated

Tests should not depend on each other or shared state.

Clear

Test names should describe the behavior being tested.

Test Patterns

Arrange-Act-Assert (AAA) (Java + JUnit 5)

@ExtendWith(MockitoExtension.class)
class UserServiceTest {
    @Mock
    private EmailService emailService;

    @InjectMocks
    private UserService userService;

    @Test
    void registerUser_ValidEmail_SendsWelcomeEmail() {
        // Arrange
        String email = "test@example.com";
        ArgumentCaptor<Email> emailCaptor = ArgumentCaptor.forClass(Email.class);

        // Act
        userService.register(email);

        // Assert
        verify(emailService).send(emailCaptor.capture());
        Email sentEmail = emailCaptor.getValue();
        assertThat(sentEmail.getTo()).isEqualTo("test@example.com");
        assertThat(sentEmail.getSubject()).isEqualTo("Welcome!");
    }
}

E2E Testing with Chrome DevTools

// Use Chrome DevTools MCP for browser automation
// - Navigate to pages
// - Fill forms and click buttons
// - Capture screenshots for visual regression
// - Run Lighthouse accessibility audits
// - Check console for errors

Commands (Java/Maven)

# Run unit tests
mvn test

# Run tests with coverage
mvn verify

# Run specific test class
mvn test -Dtest=UserServiceTest

# Run specific test method
mvn test -Dtest=UserServiceTest#registerUser_ValidEmail_SendsWelcomeEmail

# Generate coverage report
mvn jacoco:report

# View coverage report
open target/site/jacoco/index.html

Finding Untested Code

Use Glob and Grep to identify gaps:

  1. Use Glob to find all source files and test files
  2. Check which source files have corresponding test files
  3. Use Grep to see if functions are referenced in tests

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/testing-software-mrx3xwdz/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/testing-software-mrx3xwdz' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/testing-software-mrx3xwdz/download' --output '.skill-downloads/testing-software-mrx3xwdz/SKILL.md.part' && mv '.skill-downloads/testing-software-mrx3xwdz/SKILL.md.part' '.skill-downloads/testing-software-mrx3xwdz/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

Tools declared by the author (check availability in your agent): Read, Write, Edit, Bash, Glob, Grep, mcp__chrome-devtools__*

No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.

Claude Code
test -f '.skill-downloads/testing-software-mrx3xwdz/SKILL.md' && test -s '.skill-downloads/testing-software-mrx3xwdz/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/testing' && cp -R '.skill-downloads/testing-software-mrx3xwdz' '.claude/skills/testing'

OpenSkills

OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.

Official OpenSkills installation
openskills install './.skill-downloads/testing-software-mrx3xwdz'

openskills read 'testing-software-mrx3xwdz'

Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.

For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.

openskills sync

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/testing-software-mrx3xwdz/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills