Logo di Run Tests

Run Tests

CommunityPopolare
platonai
run-tests

Discovers and runs Browser4 test suites (unit, integration, E2E, CLI, PowerShell, real-world scenarios, production acceptance). Use when asked to run, check, or verify tests.

Add to TypingMind

Panoramica

Pubblicato daplatonai
RepositoryBrowser4
Nome della skillrun-tests
Stelle
1.2K
Fork
152
File inclusi
Solo istruzioni
LicenzaApache-2.0
Link
  • Istruzioni in Markdown

    Un file SKILL.md che il modello carica quando serve, consumando token solo quando una richiesta è effettivamente pertinente.

  • Funziona con qualsiasi LLM

    Le skill IA sono in semplice Markdown, non in codice specifico di un fornitore, quindi funzionano con GPT, Claude, Gemini, Grok o un modello locale.

  • Tutto nelle istruzioni

    Tutto ciò che serve al modello è nelle istruzioni: nessun file aggiuntivo da sincronizzare.

  • Open source

    Pubblicata da platonai su GitHub. Leggi i sorgenti prima di installarla.

Installazione

Installa la skill IA Run Tests in TypingMind per usarla con qualsiasi LLM, oppure copiala in un altro agente in grado di leggere SKILL.md.

1

Installa in TypingMind

TypingMind installa una skill direttamente dalla sua cartella GitHub: legge SKILL.md, raccoglie i file delle risorse e salva il risultato in locale.

  1. Apri l'app e vai su Plugin → Skill.
  2. Scegli "Installa da GitHub".
  3. Incolla l'URL della cartella della skill riportato qui sotto e conferma.
    https://github.com/platonai/Browser4/tree/main/coworker/skills/run-tests
  4. Attiva la skill in ogni chat in cui vuoi averla a disposizione.
Plugin → Skill → Aggiungi skill → Da URL GitHub, poi incolla l'URL della cartella e premi Continua.
2

Installa in un altro agente

Qualsiasi agente che legge il formato Agent Skills può usare questa skill: copia la cartella della skill nella directory delle skill di quell'agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/platonai/Browser4.git /tmp/Browser4
mkdir -p .claude/skills
cp -r /tmp/Browser4/coworker/skills/run-tests .claude/skills/run-tests
Dopo la copia, riavvia Claude Code per caricare la nuova skill.

Usala in TypingMind

Attiva Run Tests in qualsiasi chat di TypingMind e al resto pensa il modello. Il nome e la descrizione della skill sono nel prompt di sistema e, non appena arriva una richiesta pertinente, il modello carica da solo le istruzioni complete: non devi mai richiamarla manualmente e non consuma token finché non viene effettivamente usata.

Il modello carica automaticamente Run Tests non appena riceve una richiesta pertinente.

Funziona con qualsiasi modello IA

Le skill IA sono semplici istruzioni in Markdown, non codice specifico di un fornitore, quindi Run Tests non è vincolata al modello per cui è stata scritta. Installala una sola volta in TypingMind e usala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modello locale che esegui tu, sempre con le tue chiavi API.

  • Caricata solo quando serve

    Il prompt di sistema contiene solo il nome e la descrizione. Le istruzioni vengono recuperate alla prima richiesta pertinente, quindi una skill inutilizzata non costa nulla.

  • Cambia modello durante la chat

    Poiché la skill è composta da istruzioni e non da codice, continua a funzionare anche se cambi modello: il nuovo modello legge lo stesso file SKILL.md.

Istruzioni della skill

Questo è il contenuto di SKILL.md che il modello carica. Leggilo prima dell'installazione: una skill è un insieme di istruzioni che il tuo modello seguirà.

Run Tests

Two test entrypoints:

  • bin/test.ps1 — unified test orchestrator for the Browser4 monorepo. Supports Maven tests, Rust CLI tests, PowerShell *.tests.ps1 files, real-world scenario agent evaluations, and mock-server launch.

  • bin/test-production.ps1 — acceptance test for the latest production release of browser4-cli. Downloads, installs, exercises, uninstalls, and re-installs the global CLI from the public OSS distribution channel.

When to Use

  • "run the tests"
  • "run fast / unit tests"
  • "run integration / it tests"
  • "run e2e tests"
  • "run cli tests"
  • "run all PowerShell tests"
  • "run real-world scenarios"
  • "check what tests would run" (-DryRun / -Show)
  • "resume failed tests"
  • "launch mock server"
  • "run production acceptance test"
  • "acceptance test the latest release"

How It Works

bin/test.ps1 buckets test-type arguments into dispatch categories (Maven, CLI, PowerShell, RWS, server) and runs each in sequence. The script must be invoked from the repository root (it Set-Locations there automatically).

Test results are persisted per invocation to .test-sessions/<session-id>/test-session.json (see bin/common/test-session.psm1). Pass -NoSession to skip persistence or -SessionPath to write to a custom location.

Usage

bash
./bin/test.ps1 [OPTIONS] [TEST-TYPES...] [EXTRA-ARGS...]

Options

FlagDescription
-DryRunCompile only (test-compile), do not run tests
-ShowPrint the final command, do not execute anything
-NoSessionSkip persisting test results to .test-sessions/
-SessionPath <path>Custom path for the test-session JSON file

Test Types

TypeCategoryDescription
fastMavenFast unit tests
itMavenIntegration tests (-DrunITs=true)
e2eMavenEnd-to-end tests (-DrunE2ETests=true)
restMavenREST module tests (-DrunRestTests=true)
skillsMavenSkills-focused agentic tests (browser4-agentic)
mcpMavenMCP-focused agentic tests (browser4-agentic)
mainMavenAll Browser4 main tests: fast + it + e2e + rest
cliCLIRust Browser4 CLI tests (cargo test --test e2e). Alias: browser4-cli
psPowerShellAll *.tests.ps1 files in the project
resumeMavenResume from the last failed module (-rf)
mock-siteServerLaunch MockSiteBoot (aliases: server, mocksite)
rwsRWSReal-world scenario agent evaluations. Bare rws shows help; pass --scenarios or --task to run.

RWS Flags (accepted after rws)

FlagDescription
--scenarios [names...]Run agent-scenario tasks (requires claude or kimi)
--task <file>Run a single task file
--productionUse installed browser4-cli instead of cargo run
--fail-fastStop after the first failing scenario
--listList discovered scenarios, don't run
--silentSuppress agent output
--skip-version-checkSkip browser4-cli version check
--timeout <minutes>Per-task timeout (default: no timeout)

Examples

bash
# Run fast unit tests
./bin/test.ps1 fast

# Show the Maven command without executing
./bin/test.ps1 -DryRun fast

# Run integration tests with extra Maven args
./bin/test.ps1 it -pl browser4-core

# Run end-to-end tests
./bin/test.ps1 e2e

# Run CLI tests (Rust cargo test)
./bin/test.ps1 cli

# Pass extra cargo test args to CLI tests
./bin/test.ps1 cli -- --help

# Run all PowerShell test files (+ the skills/ document conformance check)
./bin/test.ps1 ps

# Run all PS tests quietly
./bin/test.ps1 ps -Quiet

# Run all main tests together
./bin/test.ps1 main

# Run fast tests and PS tests together
./bin/test.ps1 fast ps

# Run fast tests without persisting session
./bin/test.ps1 -NoSession fast

# Write session to a custom path
./bin/test.ps1 -SessionPath out/session.json ps

# Preview what tests would be run
./bin/test.ps1 -Show main

# Resume from the last failed Maven module
./bin/test.ps1 resume

# Launch the mock server
./bin/test.ps1 mock-site -Dmock.site.port=18080

# Run all real-world scenarios
./bin/test.ps1 rws --scenarios

# Run a specific scenario
./bin/test.ps1 rws --scenarios amazon

# Run scenarios against installed production CLI
./bin/test.ps1 rws --scenarios --production

# List discovered scenarios
./bin/test.ps1 rws --scenarios --list

# Run a single task file directly
./bin/test.ps1 rws --task tasks/real-world/generic/amazon.md

# Run scenarios with 30-minute per-task timeout
./bin/test.ps1 rws --scenarios --timeout 30

Test Session

After each invocation, results are persisted to .test-sessions/<session-id>/test-session.json. To inspect the latest session:

bash
ls -t .test-sessions/*/test-session.json | head -1 | xargs cat

The session records the last status, log paths, per-file results (for ps), system environment, and a rolling 5-entry history per test type. Pass -NoSession to skip persistence, or -SessionPath <path> to write to a custom location.

Production Acceptance Test

bin/test-production.ps1 simulates a real end user's journey with the published browser4-cli release. It is designed to be run in CI or locally before tagging a release.

Safe default

Running with no arguments shows help (safe default):

bash
./bin/test-production.ps1

Options

FlagDescription
-WorkingDir <path>Working directory for temporary artifacts (default: random subdir under system temp)
-StressEnable the multi-scenario stress suite (opt-in)
-MultiScenariosIterations <n>Iterations for the multi-scenario suite (default: 1, only with -Stress)
-RemoveWorkingDirDelete the working directory on exit (default: preserved for review)

What it tests

  1. Creates an isolated working directory (default: system temp + random suffix)
  2. Cleans any pre-existing global browser4-cli installation
  3. Installs the latest CLI via the remote bootstrap script (unmodified)
  4. Verifies the CLI is on PATH after install (fails if the install script is broken)
  5. Smoke-tests: --help, --version, config --help, agent-run --help, invalid command
  6. Cold-starts the browser server (open), verifies health endpoint responds
  7. Measures warm-start latency vs cold-start (cycle 2)
  8. Shuts down the server (close-all, kill-all), verifies it's unreachable
  9. Uninstalls and verifies runtime data is removed
  10. Repeats the install cycle to verify idempotency
  11. (With -Stress) Runs multi-scenarios.ps1 against the global CLI

Key principle

The script acts like a real end user — it does not patch install scripts, create missing symlinks, or manually clean up after uninstall. If any of those are needed, the test fails because a real user would hit the same broken behavior.

Examples

bash
# Show help (no arguments = safe default)
./bin/test-production.ps1

# Run the full acceptance test
./bin/test-production.ps1 -Stress

# Production CI: stress test with multiple iterations, clean up afterward
./bin/test-production.ps1 -Stress -MultiScenariosIterations 3 -RemoveWorkingDir

# Use a specific working directory
./bin/test-production.ps1 -WorkingDir /tmp/my-acceptance-test

Domande frequenti

Cosa fa la skill IA Run Tests?

Discovers and runs Browser4 test suites (unit, integration, E2E, CLI, PowerShell, real-world scenarios, production acceptance). Use when asked to run, check, or verify tests.

Perché usare Run Tests su TypingMind?

Perché la installi una volta e la usi con qualsiasi modello. Run Tests è scritta in semplice Markdown anziché in codice specifico di un fornitore, quindi la stessa skill funziona con GPT-5, Claude, Gemini, Grok o un modello locale, e puoi cambiare modello durante la chat senza che la skill smetta di funzionare. TypingMind usa le tue chiavi API, quindi paghi direttamente i fornitori anziché un abbonamento per posto utente, e le tue skill e chat restano nel tuo spazio di archiviazione.

Come installo Run Tests in TypingMind?

Apri Plugin → Skill → Installa da GitHub in TypingMind e incolla https://github.com/platonai/Browser4/tree/main/coworker/skills/run-tests. TypingMind legge il file SKILL.md e installa la skill, che puoi abilitare per ogni singola chat.

Quali modelli IA possono usare Run Tests?

Qualsiasi modello che colleghi a TypingMind. Le skill IA sono semplici istruzioni in Markdown anziché codice specifico di un fornitore, quindi GPT, Claude, Gemini, Grok e i modelli locali possono tutti caricare questa skill quando una richiesta corrisponde al suo scopo.

Quanti modelli IA posso usare con Run Tests?

Quanti ne vuoi. Se un modello supporta le skill, puoi usarlo con Run Tests: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e molti altri, tutti su TypingMind con le tue chiavi API.

La skill IA Run Tests è gratuita?

Sì. È pubblicata su GitHub da platonai con licenza Apache-2.0. Paghi solo il tuo fornitore IA per i token che usi.

Cosa sono le skill IA?

Una skill IA è un pacchetto di istruzioni riutilizzabili che insegna a un modello IA come svolgere un'attività specifica. Segue il formato aperto Agent Skills: un file SKILL.md con un nome e una descrizione, più eventuali script, template o file di riferimento di cui il modello potrebbe aver bisogno. Il modello legge le istruzioni solo quando la tua richiesta corrisponde alla skill, quindi una skill installata non comporta costi finché non viene usata.

In cosa si differenziano le skill IA dai plugin o dai server MCP?

Un plugin o un server MCP fornisce a un modello nuovi strumenti da richiamare: codice che viene eseguito da qualche parte e restituisce un risultato. Una skill IA, invece, fornisce al modello conoscenze e procedure: come affrontare un'attività, quali passaggi seguire e quali caratteristiche deve avere un buon output. Le skill sono semplici istruzioni in Markdown, quindi non richiedono server, chiavi API né ambienti di esecuzione e funzionano con qualsiasi modello.

Elenco completo

Crea subito il tuo spazio di lavoro AI

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇