External tests
External tests
External tests keep their code and membership in a source-controlled Git
repository. Cofactor discovers stable test identities, runs selected tests
against an Application Sandbox, and stores run history and proof references.
Start with a Playwright repository that contains cofactor.tests.yaml.
Feedback. Tell Cofactor the moment a step in this guide is wrong, unclear or missing; a command fails in a way the guide did not predict; you took a detour or had to guess; or a tool you needed does not exist. Send it when it happens, not only at the end: one sentence on what happened and what would have helped. Run cofactor feedback "<what happened; what would have helped>" --topic instructions --command "cofactor test-suite guide <section>", or call the cofactor_feedback_submit MCP tool with the same text, topic and command. Never include secrets, customer data, real names or URLs; use neutral examples (Acme, example.com).
The journey
- Connect and authorize the test repository, then link it to the Application whose Sandbox the tests will exercise. The repository must already be available among that Application's linked repositories.
- Declare the install, Playwright configuration and runtime environment
references in
cofactor.tests.yaml. Create an external suite for that linked repository, then configure its branch and retry policy. - Validate the declaration locally. The first real suite run discovers tests before executing them; newly discovered tests appear as Unverified until a result is recorded.
- Claim and sync a Sandbox at the pushed Application commit, select one or more discovered tests, and run them. The claim's Application and environment are authoritative for that run.
- Attach a complete passing or flaky test result to a pull request criterion, then render the proof block again after every push or evidence change.
The source repository remains the place to review and merge test changes. Discovery updates suite membership; Cofactor does not archive or promote external tests. A rename creates a new test identity while the old identity and its history remain available.
Use cofactor external-run guide for run diagnostics and preparation errors.
The full authoring, selection and proof procedure is available in the guide:
cofactor test-suite guide declaration cofactor test-suite guide discovery cofactor test-suite guide proofs