testing
Improves code reliability by assisting in the writing and execution of comprehensive test suites across the testing pyramid.
Install
mkdir -p .claude/skills/testing-nguyenhuuca && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/13205" && unzip -o skill.zip -d .claude/skills/testing-nguyenhuuca && rm skill.zipInstalls to .claude/skills/testing-nguyenhuuca
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Write effective tests for code quality and reliability. Use when implementing features, fixing bugs, or improving coverage. Covers unit, integration, and E2E testing.Key capabilities
- →Write unit tests for single code units
- →Create integration tests for component interactions
- →Develop end-to-end tests for complete user flows
- →Automate user flows in a real browser using Chrome DevTools
- →Capture screenshots for visual regression testing
- →Run Lighthouse for accessibility testing during test runs
How it works
The skill supports creating tests at different levels of the testing pyramid, from isolated unit tests to browser-automated E2E tests using Chrome DevTools.
Inputs & outputs
When to use testing
- →Writing unit tests for new logic
- →Automating user flow tests
- →Adding regression tests for bug fixes
About this skill
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
- Unit Tests (Many): Fast, isolated, test single units
- Integration Tests (Some): Test component interactions
- 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 = "[email protected]";
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("[email protected]");
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:
- Use Glob to find all source files and test files
- Check which source files have corresponding test files
- Use Grep to see if functions are referenced in tests
When not to use it
- →When only static analysis or linting is needed
- →When performance profiling is the sole objective without testing
- →When the code is not intended for execution
Limitations
- →It requires Chrome DevTools for E2E browser automation
- →It focuses on testing and not on code generation
- →It does not cover all possible testing methodologies
How it compares
This skill provides a structured approach to testing across unit, integration, and E2E levels, including browser automation and visual regression, unlike just running a test runner.
Compared to similar skills
testing side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| testing (this skill) | 0 | 6mo | Review | Intermediate |
| python-testing-patterns | 77 | 2mo | Review | Intermediate |
| chrome-devtools | 41 | 7mo | Review | Intermediate |
| bats | 9 | 7mo | Review | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by nguyenhuuca
View all by nguyenhuuca →You might also like
python-testing-patterns
wshobson
Implement comprehensive testing strategies with pytest, fixtures, mocking, and test-driven development. Use when writing Python tests, setting up test suites, or implementing testing best practices.
chrome-devtools
mrgoonie
Browser automation, debugging, and performance analysis using Puppeteer CLI scripts. Use for automating browsers, taking screenshots, analyzing performance, monitoring network traffic, web scraping, form automation, and JavaScript debugging.
bats
OleksandrKucherenko
Bash Automated Testing System (BATS) for TDD-style testing of shell scripts. Use when: (1) Writing unit or integration tests for Bash scripts, (2) Testing CLI tools or shell functions, (3) Setting up test infrastructure with setup/teardown hooks, (4) Mocking external commands (curl, git, docker), (5) Generating JUnit reports for CI/CD, (6) Debugging test failures or flaky tests, (7) Implementing test-driven development for shell scripts.
browser-daemon
noiv
Persistent browser automation via Playwright daemon. Keep a browser window open and send it commands (navigate, execute JS, inspect console). Perfect for interactive debugging, development, and testing web applications. Use when you need to interact with a browser repeatedly without opening/closing it.
performance-profiling
davila7
Performance profiling principles. Measurement, analysis, and optimization techniques.
obsidian-local-dev-loop
jeremylongshore
Configure Obsidian plugin development with hot-reload and fast iteration. Use when setting up development workflow, configuring test vaults, or establishing a rapid development cycle. Trigger with phrases like "obsidian dev loop", "obsidian hot reload", "obsidian development workflow", "develop obsidian plugin".