writing-pyromaniac-integration-tests
Skill4 starsChanged 8 months agoMITView on GitHub
Create or update integration tests in the Pyromaniac repository, especially `testcode/tests-*.txt` suites, expectation files under `testcode/expect/`, BASIC smoke tests in `testcode/basic/`, and assembly exercisers in `testcode/s/`.
In this repository47 other files it gives its agents.
- allocating-resourcesSkill
- ci-testingSkill
- creating-pull-requestsSkill
- designing-modulesSkill
- porting-to-riscos-cSkill
- reading-assemblySkill
- riscos-commandsSkill
- riscos-desktop-fileractionSkill
- riscos-filer-likeSkill
- riscos-filesystemSkill
- riscos-graphics-convertersSkill
- riscos-network-dcistatisticsSkill
- riscos-network-resolverSkill
- riscos-outputSkill
- riscos-reSkill
- riscos-styleSkill
- riscos-throwbackSkill
- riscos-urls-fetchingSkill
- riscos-urls-launchingSkill
- riscos-wimp-appSkill
- riscos-wimpSkill
- riscos-wimp-templatesSkill
- updating-robe-skillsSkill
- using-bbcbasicSkill
- using-cmhgSkill
- using-ghSkill
- using-gitSkill
- using-libasmSkill
- using-libgcontextSkill
- using-liboslibSkill
- using-libriscoslibSkill
- using-libtoolboxSkill
- using-makefilesSkill
- using-perlSkill
- using-stronghelpSkill
- using-toolbox-imagefilegadgetSkill
- using-tooltesterSkill
- writing-assemblySkill
- writing-assembly-testsSkill
- writing-cmodulesSkill
- writing-cplusplusSkill
- writing-cSkill
- writing-fortranSkill
- writing-oslib-defsSkill
- writing-pascalSkill
- writing-prminxmlSkill
- writing-pymodulesSkill
The file
We split this skill into the rules it gives an agent
9 rules. About 0 are common, 4 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 10
Use this skill when wiring a feature into the Pyromaniac integration test harness.
- Very specific: line 15
Use --command only when a simple OSCLI command is enough.
- Very specific: line 17
Use BASIC in testcode/basic/ when you need:
- Very specific: line 24
Use assembly in testcode/s/ when you need:
- Very specific: line 31
Use the writing-assembly-tests skill for the assembly pattern and using-bbcbasic for BASIC specifics.
- Distinctive: line 104
When a test fails:
- Very specific: line 106
read the -actual file first
- Distinctive: line 110
Do not blindly replace expectations without checking whether the interface change was deliberate.
- Distinctive: line 115
Prefer a few scenario-driven tests that cover the public contract end to end:
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
writing-pyromaniac-integration-tests
Use this skill when wiring a feature into the Pyromaniac integration test harness.
Choose the smallest useful test surface
Use --command only when a simple OSCLI command is enough.
Use BASIC in testcode/basic/ when you need:
SYScalls with multiple returned registers- XSWI error inspection
- loops or a few sequential checks
- simple smoke coverage without building an assembly helper
Use assembly in testcode/s/ when you need:
- a compact command-line front end for many SWI scenarios
- explicit register-level control
- grouped scenario strings such as
rgsdx - reusable exercisers that are easier to drive from
tests-*.txt
Use the writing-assembly-tests skill for the assembly pattern and
using-bbcbasic for BASIC specifics.
Repository workflow
Build assembly helpers:
make testcodeRun one suite:
make tests TEST=<name>Manual runs:
./pyro.py --load-internal-modules --command '*Command'
./pyro.py --load-internal-modules testcode/bin/<tool> <args>
./pyro.py --load-internal-modules --load-module "$ROSYSMODULES/BASIC,ffa" \
--command 'Run TestThing' testcode/basic/TestThing,fd1Suite structure
Suites live in testcode/tests-<name>.txt.
make tests TEST=<name>runs that file directlymake testsneedstestcode/tests.txtto include ittestcode/tests.txtis the full suite list for normal runs; add newInclude: tests-<name>.txtlines in the appropriate section so the suite is part of the standard test set- expectations live under
testcode/expect/... - on mismatch,
testcode/test.plwrites<expect-file>-actual
A common parameterised pattern is:
Group: Module: Operations
Command: $TOOL --load-internal-modules bin/<tool> $ARG1
Expect: expect/<area>/<tool>/<tool>_$ARG1
Test: Do one scenario
Args: abcScenario arguments can include setup parameters as well as verbs. For example:
Command: $TOOL --load-internal-modules bin/urlfetcher $ARG1
Test: Fetch via file URL
Args: ffile:testdata/urlfetcher.txt,rgsdxThat pattern is useful when the tool must accept a runtime URL, filename, or other string parameter.
Be explicit about cwd-sensitive cases. In particular, relative file: URLs in
the Pyromaniac URL fetcher resolve against the process current working
directory:
- under
make tests,testcode/test.plruns fromtestcode - manual
./pyro.py ...runs from the repository root use a different base
So a relative file: URL that works in the harness may need a different path
when run manually.
Updating expectations
When a test fails:
- read the
-actualfile first - compare it with the checked-in expectation
- decide whether the code regressed or the output intentionally changed
Do not blindly replace expectations without checking whether the interface change was deliberate.
Good coverage choices
Prefer a few scenario-driven tests that cover the public contract end to end:
- success path
- expected error path
- edge case or length-only path
- cleanup/deregister/finalise path
- one test that confirms user-visible text or formatting when that output is part of the contract
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

