Get new tests proposed
For an item of the plan of the missing tests, Fistron first looks for an existing test that already covers it. Otherwise it composes a new test from the suite’s own building blocks (step definitions, fixtures and helpers), generates only what no block provides and labels it, checks it, and proposes it as a pull or merge request. A person merges; Fistron never does.
Before you start
- A built suite map with a plan (Map your suite and plan the missing tests).
- A licence with the feature
authoring, and the closed core where the agent runs (it runs the operationtest-author). - The agent’s configuration allows
propose-test(levelproposeordecide) for the repository you propose into, the project’s or its fork (Connect GitHub and GitLab). - The role Engineer or Admin in the project, not under an access grant.
- A model for the role authoring (Configure models (LLM endpoints)): without one Fistron does not write new tests, and Propose a test is off.
Fistron writes tests for these plan items:
| Plan item | Met on the request when |
|---|---|
api_uncalled |
the suite map links the method by calls |
function_untested |
the suite map links the page |
platform_unvalidated |
the suite map links the platform |
Other items (a feature in no run set, a broken run set, undefined steps, never run, failing, flaky) are repairs of the suite and are refused with what to do instead.
An item of system checks of an infrastructure change (check_unsupported
with a system check) gets a test in your own tool instead: an openQA
module added to its schedule, a Testkube workflow, an Ansible playbook or
a testinfra test, in the suite the Test plan names for the changed file
(use-test-plan.md). It runs
in the tool, not on the request’s CI.
Propose a test
- Open the project’s Test plan page.
- In the card Propose a test, choose the Plan item (shown with its priority).
- Enter the Repository:
owner/nameof the project or its fork. - Click Check the repository. An agent reads it with the token of
[actions.github](fork-check) and says what to do first, if anything: a fork behind its upstream is synced (Sync fork on its page on GitHub); Actions are enabled, and a fork’s workflows are enabled on its Actions tab, so that the test’s CI runs. Do it, then Check the repository again until it says the repository is ready. - Click Propose a test. For a new platform’s item (Validate …: no scenario runs on it), Fistron first asks what the suite does not say: the card shows Fistron asks, each question with its suggestion filled in, why, and the lines that need it. For example Which architecture is …, where … has “aarch64”? suggests the architecture the platforms with none in their name have most. Keep or change each answer; an empty answer removes a word where the question says so. Then click Answer and propose. The request says what was answered.
- The card follows the work
test-author. The model writes the test by your team’s code review rules that apply to its files, and Fistron reviews it as it reviews a request; a finding atwarningor above goes back to the model once. The card shows what that own review found. When the test is checked, it startspropose-testand links its work; when that has succeeded, the card links the request it opened (“Proposed: pull request #7 in …”). A test that still breaks a rule of your team after its revision waits for you: tick I know that this test breaks the rules named there and click Propose it all the same; the request says which rules it breaks and that you asked for it knowing that (on the command line,fistron propose test --breaks). Otherwise it says why:- covered: an existing test covers the item, nothing to propose;
- described: no model may write it; what to write is described for a person;
- refused: a static check refused the written test; see the record.
A fork must have the revision the map read. When its default branch is
behind it, propose-test fails and says so: “the fork is N commits behind
Before a test is proposed it must parse, change only test files, assert something, label every generated piece, and apply cleanly. A Gherkin test must also resolve every step to exactly one definition and be named in a run set, and follow the project’s Rules for new tests when it has any (use-test-plan.md).
Follow the proposed tests
- Open the project’s Proposed tests page.
- Each plan item shows its newest record:
- State: planned, covered, described, refused, checked, proposed, accepted, rejected, merged or closed;
- Test: its file and name, or the existing test that covers it;
- Generated: how many pieces no building block provided;
- Request and Verdict.
- Click the plan item to open the record: the test, each piece’s origin, the checks, what it must pass and the verdict.
- For a test in the state proposed, an engineer clicks Measure on its head: the agent maps the suite again at the request’s head and comments on the request whether the plan item is met there. The test stays proposed until the runs of the request’s CI are read.
Name the run of a new platform’s test
A new platform’s features run in the build validation’s pipeline, not on the request’s CI, so the request gets no verdict by itself. You name the Jenkins builds that ran it, and Fistron reads them (ADR 0128).
Before you start:
- The agent’s configuration reads the Jenkins:
[acquisition.jenkins]with the job in itsjobs. - It allows
propose-testfor the request’s repository: the verdict is the request’s comment. - The pipeline ran the request’s head: its branch, or the default branch after the request was merged into a test branch that contains it.
- On Proposed tests, click Name the run that ran it for the proposed test of a new platform.
- Enter the Jenkins job (its full name) and Its builds: their numbers, separated by commas. Each build is one run; the dialog says how many runs are asked.
- Click Read the builds. The work
proposal-named-run:- checks that each build ran the request’s head, its branch or a commit
that contains it, and that its test report names the new platform’s
scenarios (
examplos11_minion,examplos11_sshminion); - counts a build as passed when those scenarios passed, failed when one failed; another platform’s failures in the same build do not count;
- has the closed core give the verdict, accepted or rejected, as the request’s comment.
- checks that each build ran the request’s head, its branch or a commit
that contains it, and that its test report names the new platform’s
scenarios (
- With fewer builds than asked the test is rejected and the runs’ record says how many more to name: name them all again when they have run.
Run a test in your own tool
A proposed test in openQA, Testkube, Ansible or testinfra runs in the tool and gets its verdict there.
Before you start:
- An agent of the project whose configuration agrees to run proposed
tests:
run_proposed_tests = truein its[validation]section, with a target markedstagingorisolated(for openQA itsopenqa_host, for Testkube itskube_context, for Ansible itsinventory) (authoring.md). The run executes the request’s code, for Ansible and testinfra on the agent’s host. - The agent’s configuration allows
propose-testfor the repository: the verdict is the request’s comment.
- On Proposed tests, click Run in
for a proposed test, for example Run in openQA. - Enter the Target (a target of the agent’s
[validation.targets]) and The change’s build (for example the image the request’s CI built). The build before the change and, for openQA, The job’s settings are filled from the suite in the Test plan; change them for this run if needed. - Click Run. The control plane runs two works one after the other, so
you can leave the page:
authoring-runruns the test on the change’s build as many times as its record asks, and once on the build before the change when it must fail there;proposal-verify-test(the closed core) answers each verification and comments the verdict on the request: accepted or rejected.
- Open the record: The verdict cites the runs. The runs’ record
(
test_authoring_runs) lists each run: passed, failed (the test failed) or not completed (the run itself did not complete), with what the tool kept.
Only the commit Fistron wrote on the request runs, never a commit someone else pushed to the branch. A test proposed by an earlier Fistron names no such commit: propose or revise it again.
A test is accepted only when it runs and passes on its request’s CI, passes its repeated runs and measurably meets its plan item. Generated pieces are named in the request for a closer review.
Answer the review
When reviewers comment on Fistron’s request, Fistron can change the test and answer them on the same request.
- An admin names the reviewers whose comments Fistron follows: on the
Test plan, under Reviewers Fistron follows
(use-test-plan.md),
or in the agent’s configuration:
reviewers = ["their-login"]in the[actions.github](or[actions.gitlab]) group of the repository. Comments of anyone else are counted, never followed. - On Proposed tests, an engineer clicks Answer the review for a
proposed test. The control plane runs three works one after the other,
each started when the one before succeeds, so you can leave the page;
the row follows the newest, and each work on Work says what came
next:
proposal-reviewreads the reviewers’ new comments; with none it says “No new comment of the reviewers to answer” and stops;test-revise(the closed core) changes the test and words an answer to each comment; the changed test passes the same checks;propose-testcommits the change to the same branch and replies to each comment: Changed, Answered or Not changed, with why.
- Open the record: the part The review lists each comment and what Fistron did about it.
When a check refuses the revision, the request stays as it was: the row still shows the proposed test with its buttons, and a link Its revision was refused by a check opens the refused revision with the check that failed. Answer the review again once the cause is fixed.
When the request is in a fork, keep the fork’s default branch in sync with the project’s repository (GitHub: Sync fork, then Update branch on the pull request). A fork behind it gets a note in the review’s record (“… is N commits behind the suite’s revision”).
Fistron never merges, approves or resolves a thread; the reviewer does.
Without a model, only what needs none is done: a GitHub suggestion is
applied, a line Convention: … is kept as written, and other comments are
answered Not changed (no model writes this project’s tests).
What Fistron remembers from a review
Most comments are about the test in front of the reviewer: Fistron changes that test and answers, and later tests are not affected. A comment that states a rule for every test is also kept as the project’s convention. The revision of that request follows it at once; later tests follow it once a person confirms it on Fistron Memory, tab Conventions for code Fistron writes (use-memory.md):
-
Said by the reviewer: start a line of the comment with
Convention:, for exampleConvention: Step definitions keep scenario data with add_context, never in instance variables.The line is kept as written, with or without a model. Use it whenever a remark should hold for the next tests too.
-
Recognised by the model: a comment that clearly states a general rule (for example how a new file is named) is kept in the model’s words. A comment that reads as about this test only is not.
The reply to the comment says Kept as the project’s convention: …, and so does the record’s part The review. The confirmed conventions are listed on the Test plan under Rules for new tests → Conventions (use-test-plan.md), where a engineer removes one that no longer holds. A convention guides how a model writes the next tests; a rule that must be checked without a model (file names, tags, forbidden steps, run sets) belongs in Rules for new tests themselves.
Troubleshooting
| You see | Cause and fix |
|---|---|
| “Writing a test needs the core’s authoring: this control plane does not run test-author yet.” | No agent of the project offers test-author: the closed core with the feature authoring is needed. |
| Propose a test is disabled | Fištrónek’s head beside it says why: enter a repository as owner/name, and Check the repository until it is ready. |
| Answer and propose is disabled | A question needs an answer: only a question that says “Empty: nothing” may be left empty, and variants needs one at least. |
The test-author work fails: “the suite has no platform … to derive from” |
The answer to the first question names no platform of the suite: choose one of the list and answer again. |
The proposal-named-run work fails: “build N ran …, not the request’s head …” |
The build ran another commit: name a build of the request’s branch, or one of a branch that contains the request’s head. |
The proposal-named-run work fails: “build N’s test report names no scenario of …” |
The build’s run did not onboard the new platform: name a build whose run includes it (the pipeline’s list of clients names it). |
| No Name the run that ran it | The test is not a new platform’s, it runs in a tool (Run in …), or the agent’s Fistron does not offer proposal-named-run yet. |
| No Fistron asks for a new platform | The agent’s Fistron does not offer authoring-questions yet: update the agent’s image; until then the test is written as the rules derive it and its lines are to verify. |
| The test is described | No model may write it, for example because no endpoint may receive the suite’s data class. |
| The propose work fails: “the fork is N commits behind …: Sync fork, then Propose again” | The fork lacks the revision the map read: Sync fork on GitHub, then propose again. |
| The propose work fails, saying a file changed: “write the test again” | The default branch changed the file the test was written against since the map: build the map again and propose the test again. |
| No new request appears | An open request of the same item is not replaced. |
| “No model writes this project’s tests: proposing a test is off.” | Choose a model for the role authoring on Models, or give an endpoint of the agent’s configuration that role. |
| “Answering a review needs the core’s test-revise: not run here yet.” | The agent’s closed core does not offer test-revise yet: update the agent’s image. |
The proposal-review work fails: “name the reviewers” |
The agent’s configuration names no reviewers for the repository. |
| “A check refused the revision” | The changed test broke a check or a rule: the request stays as it was; see the record. |
| Merging from Fistron is refused | Level merge is never allowed for new tests: a person merges. |
| “Proposed by an earlier Fistron: propose or revise it again to run it in …” | The record does not name the commit Fistron wrote: answer the review or propose the test again. |
authoring-run stays queued |
No agent of the project agrees to run proposed tests: run_proposed_tests = true in its [validation]. |
authoring-run fails: “refused: … is marked production” |
Choose a target marked staging or isolated. |
authoring-run fails: “give it (before)” |
The test must fail on the build before the change: enter it, or name it in the suite on the Test plan. |
Details: authoring.md, actions.md.