tunit

Run TUnit tests with Playwright. Use when user asks to run tests, execute tests, or check if tests pass.

25 stars

Best use case

tunit is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Run TUnit tests with Playwright. Use when user asks to run tests, execute tests, or check if tests pass.

Teams using tunit should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/tunit/SKILL.md --create-dirs "https://raw.githubusercontent.com/ComeOnOliver/skillshub/main/skills/aiskillstore/marketplace/andrehogberg/tunit/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/tunit/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How tunit Compares

Feature / AgenttunitStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Run TUnit tests with Playwright. Use when user asks to run tests, execute tests, or check if tests pass.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Running TUnit Tests

This project uses TUnit with Playwright for testing. Tests are located in `tests/SummitUI.Tests.Playwright/`.

## Run All Tests

```bash
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:

```bash
# 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:
```bash
dotnet run --project SummitUI.Tests.Playwright -- --treenode-filter '/*/*/ClassName/*'
```

Filter by exact test name:
```bash
dotnet run --project SummitUI.Tests.Playwright -- --treenode-filter '/*/*/*/TestName'
```

Examples:
```bash
# 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:
```bash
# 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:

1. **Automatic Retries**: Tests are automatically retried up to 2 times on failure (`[Retry(2)]` in GlobalSetup.cs)
2. **Fully Sequential Execution**: All tests run sequentially via `[assembly: NotInParallel]` in GlobalSetup.cs
3. **Server Readiness Check**: `Hooks.cs` waits for the Blazor server to be fully ready before tests start
4. **Extended Timeouts**: Configured via `tunit.json` for 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 server
- `tunit.json` - TUnit configuration file
- `*AccessibilityTests.cs` - Accessibility test classes inheriting from `PageTest`

## Test Conventions

- Tests inherit from `TUnit.Playwright.PageTest` to get `Page` access
- Use `[Before(Test)]` for per-test setup
- Use `[Before(TestSession)]` / `[After(TestSession)]` for session-wide setup
- Access the running server via `Hooks.ServerUrl`

Related Skills

finding-arbitrage-opportunities

25
from ComeOnOliver/skillshub

Detect profitable arbitrage opportunities across CEX, DEX, and cross-chain markets in real-time. Use when scanning for price spreads, finding arbitrage paths, comparing exchange prices, or analyzing triangular arbitrage opportunities. Trigger with phrases like "find arbitrage", "scan for arb", "price spread", "exchange arbitrage", "triangular arb", "DEX price difference", or "cross-exchange opportunity".

csharp-tunit

25
from ComeOnOliver/skillshub

Get best practices for TUnit unit testing, including data-driven tests

startup-business-analyst-market-opportunity

25
from ComeOnOliver/skillshub

Generate comprehensive market opportunity analysis with TAM/SAM/SOM calculations

learning-opportunities

25
from ComeOnOliver/skillshub

Facilitates deliberate skill development during AI-assisted coding. Offers interactive learning exercises after architectural work (new files, schema changes, refactors). Use when completing features, making design decisions, or when user asks to understand code better. Supports the user's stated goal of understanding design choices as learning opportunities.

Daily Logs

25
from ComeOnOliver/skillshub

Record the user's daily activities, progress, decisions, and learnings in a structured, chronological format.

Socratic Method: The Dialectic Engine

25
from ComeOnOliver/skillshub

This skill transforms Claude into a Socratic agent — a cognitive partner who guides

Sokratische Methode: Die Dialektik-Maschine

25
from ComeOnOliver/skillshub

Dieser Skill verwandelt Claude in einen sokratischen Agenten — einen kognitiven Partner, der Nutzende durch systematisches Fragen zur Wissensentdeckung führt, anstatt direkt zu instruieren.

College Football Data (CFB)

25
from ComeOnOliver/skillshub

Before writing queries, consult `references/api-reference.md` for endpoints, conference IDs, team IDs, and data shapes.

College Basketball Data (CBB)

25
from ComeOnOliver/skillshub

Before writing queries, consult `references/api-reference.md` for endpoints, conference IDs, team IDs, and data shapes.

Betting Analysis

25
from ComeOnOliver/skillshub

Before writing queries, consult `references/api-reference.md` for odds formats, command parameters, and key concepts.

Research Proposal Generator

25
from ComeOnOliver/skillshub

Generate high-quality academic research proposals for PhD applications following Nature Reviews-style academic writing conventions.

Paper Slide Deck Generator

25
from ComeOnOliver/skillshub

Transform academic papers and content into professional slide deck images with automatic figure extraction.