Token导航 LogoToken导航TokenDH.com
开发操作浏览器clawhub未标认证来源可访问clear审计通过

test-runner-codex测试 runner Codex

Agent Skill

用于辅助测试设计、自动化测试、用例整理和回归验证。它适合让 Agent 编写单元测试、端到端测试、测试计划或根据失败日志定位问题。使用时需要确认项目测试框架、运行命令和夹具数据,避免为了通过测试而改坏真实逻辑;涉及浏览器或外部服务时,应区分本地模拟、测试环境和生产环境。

总安装

5,566

周安装

223

GitHub Stars

公开资料未说明

下载量

1,802
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:test-runner-codex(测试 runner Codex)
来源仓库:https://github.com/alexwoo-awso/test-runner-codex
安装命令:
openclaw skills install test-runner-codex
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install test-runner-codex

简介

跨语言和框架的统一测试执行工具。test-runner-codex 属于开发类 Skill,可作为该场景下的辅助能力补充。

  • 支持多种测试类型包括单元和集成测试。适用宿主包括 OpenClaw,接入前应确认版本、权限和运行环境要求。
  • 自动识别项目配置并选择合适的运行器。
  • 通过 clawhub 平台安装技能。
  • 需确保本地已安装对应语言的测试依赖包。

SKILL.md

name
test-runner
description
Write and run tests across languages and frameworks.

Test Runner

Core workflow

  1. Detect the language, package manager, and existing test framework before changing anything.
  2. Prefer the project's current test stack over introducing a new one.
  3. Run the smallest relevant test scope first, then widen coverage after the failure is understood.
  4. When fixing bugs, start with a failing test, make the smallest code change that passes, then refactor.
  5. After changes, run the narrow test again and then a broader suite if the local workflow supports it.

Framework selection

Use the existing framework when one is already configured. If the project has no test stack, prefer:

LanguageUnit testsIntegrationEnd-to-end
TypeScript / JavaScriptVitestSupertestPlaywright
Pythonpytestpytest + httpxPlaywright
SwiftXCTestXCTestXCUITest

Command guide

Vitest

npm install -D vitest @testing-library/react @testing-library/jest-dom
npx vitest
npx vitest run
npx vitest --coverage

Use this baseline config when a project needs one:

import { defineConfig } from 'vitest/config'

export default defineConfig({
  test: {
    globals: true,
    environment: 'jsdom',
    setupFiles: './tests/setup.ts',
  },
})

Jest

npm install -D jest @types/jest ts-jest
npx jest
npx jest --watch
npx jest --coverage
npx jest path/to/test

pytest

uv pip install pytest pytest-cov pytest-asyncio httpx
pytest
pytest -v
pytest -x
pytest --cov=app
pytest tests/test_api.py -k "test_login"
pytest --tb=short

XCTest

swift test
swift test --filter MyTests
swift test --parallel

Playwright

npm install -D @playwright/test
npx playwright install
npx playwright test
npx playwright test --headed
npx playwright test --debug
npx playwright test --project=chromium
npx playwright show-report

Red-green-refactor

  1. Red: write a failing test for the behavior you need.
  2. Green: implement the smallest change that makes it pass.
  3. Refactor: clean up without changing behavior.

Test patterns

Arrange, act, assert

test('calculates total with tax', () => {
  const cart = new Cart([{ price: 100, qty: 2 }])

  const total = cart.totalWithTax(0.08)

  expect(total).toBe(216)
})

Async tests

test('fetches user data', async () => {
  const user = await getUser('123')
  expect(user.name).toBe('Colt')
})

Mocking with Vitest

import { vi } from 'vitest'

const mockFetch = vi.fn().mockResolvedValue({
  json: () => Promise.resolve({ id: 1, name: 'Test' }),
})

vi.stubGlobal('fetch', mockFetch)

API tests in Python

import pytest
from httpx import AsyncClient
from app.main import app


@pytest.mark.asyncio
async def test_get_users():
    async with AsyncClient(app=app, base_url="http://test") as client:
        response = await client.get("/users")

    assert response.status_code == 200
    assert isinstance(response.json(), list)

React component tests

import { fireEvent, render, screen } from '@testing-library/react'
import { Button } from './Button'

test('calls onClick when clicked', () => {
  const handleClick = vi.fn()
  render(<Button onClick={handleClick}>Click me</Button>)
  fireEvent.click(screen.getByText('Click me'))
  expect(handleClick).toHaveBeenCalledOnce()
})

Coverage commands

# JavaScript / TypeScript
npx vitest --coverage
npx jest --coverage

# Python
pytest --cov=app --cov-report=html
pytest --cov=app --cov-report=term
pytest --cov=app --cov-fail-under=80

What to test

Always test:

  • Public APIs and exported functions
  • Edge cases such as empty input, null, and boundary values
  • Error handling such as invalid input or network failures
  • Business logic such as calculations and state transitions

Usually skip:

  • Private implementation details
  • Framework internals
  • Trivial getters and setters
  • Third-party library behavior

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

81.33%
按下载量换算1,466

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

通过

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills