optimizetests

Benchmark and optimize OpenClaw tests to reduce CI wall time.

Updated Dec 6, 2016
One-click install
npx skills add https://github.com/majunbao/learn --skill optimizetests-majunbao
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: optimizetests
Source: https://github.com/majunbao/learn/tree/main/openclaw_tags/openclaw-2026.4.24/.agents/skills/optimizetests
Command: npx skills add https://github.com/majunbao/learn --skill optimizetests-majunbao

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

OpenClaw's test suite often suffers from slow tests, duplicated imports, misaligned coverage, and long CI wall times. This Skill targets identifying and addressing these bottlenecks without sacrificing coverage.

Core Features & Use Cases

  • Benchmarking: measure test execution time, identify hotspots, and quantify the impact of changes.
  • Targeted optimization: reduce expensive imports and duplicated setup without altering semantics.
  • Use Case: imagine a CI pipeline that spends minutes waiting on a flaky suite; optimize to shave seconds and keep 100% coverage.

Quick Start

Run the optimizetests plan to benchmark hotspots, apply fixes, and push improvements while maintaining full test coverage.

Frequently Asked Questions about optimizetests

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I speed up slow tests in my CI pipeline without losing coverage?

Test benchmarking measures individual test execution times to identify performance bottlenecks and hotspots. By quantifying the impact of changes on the test suite, it helps target slow tests and heavy imports for optimization, ensuring evidence collection for controlled refactors.

How do I benchmark OpenClaw tests to identify performance hotspots?

You can reduce CI wall time by targeting slow tests and heavy imports identified through benchmarking. Applying controlled refactors to duplicated setup and expensive imports optimizes the test suite, shaving off execution time while maintaining 100% test coverage in your CI gates.

Can I optimize my test suite to reduce CI wall time without altering test semantics?

Yes, optimizing tests without sacrificing coverage is possible by applying controlled refactors to slow tests and heavy imports. The approach emphasizes evidence collection, hotspot targeting, and verification to ensure that test coverage remains intact while reducing CI wall time.

What causes slow CI wall times when running large test suites?

Slow CI wall times often result from duplicated imports, misaligned coverage in CI gates, and heavy setup overhead. Benchmarking identifies these specific hotspots so you can apply controlled refactors to reduce expensive imports and duplicated setup without losing test coverage.

Do I need to benchmark test execution time before optimizing slow tests?

Yes, benchmarking test execution time is required before optimizing to collect evidence on slow tests and heavy imports. Measuring execution time quantifies the impact of changes, ensuring controlled refactors target actual hotspots effectively while maintaining full test coverage.