Agent skill
tunit
Run TUnit tests with Playwright. Use when user asks to run tests, execute tests, or check if tests pass.
Install this agent skill to your Project
npx add-skill https://github.com/aiskillstore/marketplace/tree/main/skills/andrehogberg/tunit
SKILL.md
Running TUnit Tests
This project uses TUnit with Playwright for testing. Tests are located in tests/SummitUI.Tests.Playwright/.
Run All Tests
dotnet run --project tests/SummitUI.Tests.Playwright
Run Tests with Limited Parallelism (Recommended)
To prevent system overload when running Playwright tests, limit parallel test execution:
# Run with maximum 1 parallel test (sequential)
dotnet run --project tests/SummitUI.Tests.Playwright -- --maximum-parallel-tests 1
# Run with maximum 2 parallel tests
dotnet run --project tests/SummitUI.Tests.Playwright -- --maximum-parallel-tests 2
Run Tests with Filters
TUnit uses --treenode-filter with path pattern: /assembly/namespace/class/test
Filter by class name:
dotnet run --project SummitUI.Tests.Playwright -- --treenode-filter '/*/*/ClassName/*'
Filter by exact test name:
dotnet run --project SummitUI.Tests.Playwright -- --treenode-filter '/*/*/*/TestName'
Examples:
# Run all Select accessibility tests
dotnet run --project tests/SummitUI.Tests.Playwright -- --treenode-filter '/*/*/SelectAccessibilityTests/*'
# Run specific test by name
dotnet run --project tests/SummitUI.Tests.Playwright -- --treenode-filter '/*/*/*/Trigger_ShouldHave_RoleCombobox'
# Run tests matching pattern (wildcard in test name)
dotnet run --project tests/SummitUI.Tests.Playwright -- --treenode-filter '/*/*/*/Keyboard*'
# Run all tests in namespace
dotnet run --project tests/SummitUI.Tests.Playwright -- --treenode-filter '/*/SummitUI.Tests.Playwright/*/*'
Run Tests in Debug Mode
When a debugger is attached, Playwright will run in debug mode (PWDEBUG=1) automatically via the Hooks.cs setup.
View Test Output
Add --report flags for different output formats:
# Console output with details
dotnet run --project tests/SummitUI.Tests.Playwright -- --output-format console-detailed
# Generate TRX report
dotnet run --project tests/SummitUI.Tests.Playwright -- --report-trx
Flakiness Mitigation
The test project includes several features to reduce flakiness:
- Automatic Retries: Tests are automatically retried up to 2 times on failure (
[Retry(2)]in GlobalSetup.cs) - Fully Sequential Execution: All tests run sequentially via
[assembly: NotInParallel]in GlobalSetup.cs - Server Readiness Check:
Hooks.cswaits for the Blazor server to be fully ready before tests start - Extended Timeouts: Configured via
tunit.jsonfor longer test and hook timeouts
Project Structure
GlobalSetup.cs- Assembly-level test configuration (retries, parallelism)Hooks.cs- Test session setup/teardown (starts Blazor server)BlazorWebApplicationFactory.cs- WebApplicationFactory for hosting the test servertunit.json- TUnit configuration file*AccessibilityTests.cs- Accessibility test classes inheriting fromPageTest
Test Conventions
- Tests inherit from
TUnit.Playwright.PageTestto getPageaccess - Use
[Before(Test)]for per-test setup - Use
[Before(TestSession)]/[After(TestSession)]for session-wide setup - Access the running server via
Hooks.ServerUrl
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
perigon-backend
Perigon ASP.NET Core + EF Core + Aspire conventions
perigon-agent
Pointers for Copilot/agents to apply Perigon conventions
perigon-angular
Angular 21+ standalone/Material/signal conventions for Perigon WebApp
fastapi-mastery
Comprehensive FastAPI development skill covering REST API creation, routing, request/response handling, validation, authentication, database integration, middleware, and deployment. Use when working with FastAPI projects, building APIs, implementing CRUD operations, setting up authentication/authorization, integrating databases (SQL/NoSQL), adding middleware, handling WebSockets, or deploying FastAPI applications. Triggered by requests involving .py files with FastAPI code, API endpoint creation, Pydantic models, or FastAPI-specific features.
context7-efficient
Token-efficient library documentation fetcher using Context7 MCP with 86.8% token savings through intelligent shell pipeline filtering. Fetches code examples, API references, and best practices for JavaScript, Python, Go, Rust, and other libraries. Use when users ask about library documentation, need code examples, want API usage patterns, are learning a new framework, need syntax reference, or troubleshooting with library-specific information. Triggers include questions like "Show me React hooks", "How do I use Prisma", "What's the Next.js routing syntax", or any request for library/framework documentation.
browser-use
Browser automation using Playwright MCP. Navigate websites, fill forms, click elements, take screenshots, and extract data. Use when tasks require web browsing, form submission, web scraping, UI testing, or any browser interaction.
Didn't find tool you were looking for?