circleci-smarter-testing-onboarding
CircleCI Smarter Testing Onboarding
Testsuite replaces a raw test command with .circleci/test-suites.yml + circleci testsuite run "<suite name>". This skill gets a suite onboarded and doctor-clean, checks the free features work, then enables whichever credit-charged features the user asks for. It covers onboarding only, not running or debugging an already onboarded suite.
Always start with:
circleci testsuite doctor "<suite name>" --json
Doctor's action_items say exactly what's wrong and how to fix it. Apply the fix, rerun doctor, repeat until checks all pass. Never run the project's raw test command or the YAML's discover/run directly to validate — always go through doctor.
- No config found — use doctor's starter
test-suites.yml, adapted to the project's real test runner. If a test step already exists (rawnpm test/pytest/go test, or legacycircleci tests split/circleci tests run), basediscover/runon it rather than inventing a new one. - JUnit atoms not matching results — usually the reporter isn't emitting a
fileattribute per test case. Fix at the source, e.g.JEST_JUNIT_ADD_FILE_ATTRIBUTE=truefor jest-junit, or--override-ini=junit_family=xunit1for pytest. - Ignore any
next_stepsabout test impact analysis, dynamic test splitting, or auto-rerun until the user has chosen features below.
Once doctor is clean: replace the old test step in .circleci/config.yml with circleci testsuite run "<suite name>", and remove now-redundant legacy test-split steps. Test results are uploaded either by a store_test_results job step pointed at the directory of outputs.junit, or by options: store-test-results: true in test-suites.yml, which replaces that step. Use one or the other, never both.