majesticlabs-dev/majestic-marketplace

test-runner

Run test suite and return structured pass/fail results.

View source
Original skill document

Rendered from the source repository. Headings, examples, code, tables, links, and referenced images are preserved.

Test Runner

Run tests and return structured results.

Input

yaml
scope: string  # Optional: directory, file path, or test name pattern

Process

  1. Detect framework from project files (if not provided):
  • spec/ + _spec.rb + .rspec = RSpec
  • test/ + _test.rb = Minitest
  • jest.config.js or *.test.js = Jest/Vitest
  • go.mod + _test.go = Go test
  • pytest.ini or conftest.py = pytest
  1. Run tests (scoped if provided, otherwise full suite)
  1. Parse output for pass/fail counts and failure details

Framework Commands

FrameworkRun AllRun FileRun Single
RSpecbundle exec rspecbundle exec rspec path/to/spec.rbbundle exec rspec path:LINE
Minitestbundle exec rake testruby -Itest path/to/test.rbruby -Itest path -n test_name
Jestnpx jestnpx jest path/to/test.jsnpx jest path -t "name"
pytestpytestpytest path/to/test.pypytest path::test_name
Gogo test ./...go test ./path/go test ./path/ -run TestName

Output

yaml
status: PASS | FAIL
total: int
passed: int
failed: int
failures:        # Only if failed
  - file: string
    line: int
    name: string
    message: string

Error Handling

ScenarioAction
Test framework unclearAsk user
Tests failReturn FAIL with failure details
Command errorReturn FAIL with stderr
from this repository

More skills

All skills