Fistron docs

fistron.io

Audit the quality of your tests and CI

The quality audit is the first look at a project: what its tests and CI say today, a plan of what raises the quality, and what the audit needs that the project does not give yet. It reads only and changes nothing. It runs by rules, without a model, and each finding cites the document it comes from.

What the audit looks at

Part What it says What it needs
Tests and CI tests that fail in at least half of their runs (broken; with low confidence below 10 runs), the slowest tests, the jobs that fail most, the CI minutes of every failed job run (a run without a duration counted apart, never as 0), and how much of the window the history covers (a Jenkins job keeps only its newest builds) a CI history with test reports (JUnit or Cucumber JSON; on Jenkins without a test report, Connect Jenkins test_reports)
Flaky tests flaky events of tests and jobs (each a failure that passed at the same revision of its job, every test, also below the rule by which Flaky tests lists a candidate), and the CI minutes of the failed jobs a CI history
Coverage whether the tests’ per-test coverage is collected; not applicable to an end-to-end suite (Cucumber) a CI history with a coverage artifact
Suite Health its recommendations, counted by action (quarantine, retire, merge, review), the worst tests first: tests that add nothing: duplicate, slow without coverage of their own; with the suite map, end-to-end scenarios that check nothing, repeat another’s steps or never found a product failure (use-suite-health.md) a CI history and the closed core
The suite against the product the product’s functions no test reaches, and the plan of the tests to write a suite map (Map your suite and plan the missing tests)
The feedback loop when the CI’s answer comes (the first result, the first failure, the whole run), what starts the runs (per change, nightly, weekly, by hand), where a run’s test time goes by feature, the tests that never failed in the window and the tests that caught the failures; for a job run per change, the features that never failed as a nightly tier’s candidates, each feature whole, with the minutes it saves (an estimate) and the risk, once its history is long enough to tell (5 runs over 14 days); for a nightly or weekly job, a short smoke run of the tests that failed, first, the rest unchanged a CI history (Get your CI’s answer sooner)
Delivery lead time, change failure rate, time to green, each with its unit; a snapshot that measured no change says why (e.g. its pull requests were closed without a merge) a delivery snapshot (baseline-collect)

A part without its input is marked an input is missing, and the audit lists the input with how to give it. A part that fails says why, and the others still run; the audit’s run (on Work in a control plane) carries a warning for each part that failed, so it is seen without opening the record. The suite map reads its repositories below suite-map/sources/ of the audit’s output, so it runs on an agent whose root file system is read-only.

Before you start

Give the audit what you have; nothing is required:

The first audit, guided

In a control plane, the guide does the history, the delivery snapshot, the suite map and the audit for you, one after another:

  1. On Solutions, choose Start the first audit on the card of Quality improvement or End-to-end quality.
  2. Choose Find the CI sources. An agent reads the repositories bound to the project (Organisation › Projects; with none bound, every repository it may read, and the page says so) and proposes, for each, its role, its main workflow and where its test reports are, and the Jenkins jobs. Keep or change each proposal: you choose, you type nothing. The main workflow is the one that runs most on pull requests and runs the tests: a check of the change’s form (a changelog, lint, the title) is proposed only when nothing else ran, and the repository says which it passed over. When its runs hold no test reports and another workflow’s do, that one is proposed, and said: tests that run only after a merge, in a workflow a push runs that calls them (image.yml calling ci.yml), are then read from its runs, each test with its result. A repository’s Role is backport when it has maintenance branches: a branch that names the version it maintains (release-4.3, release/2.1.x, stable-…, manager-4.3) and lives, with commits of its own over two weeks at least. A branch that only starts with release (release-notes-0.4.0), a short-lived one, and a bot’s or a site’s branch (dependabot/…, gh-pages) are never maintenance branches; the short-lived ones are named in the repository’s notes. The role is a proposal: change it in the row, and the row says what Fistron proposed. A repository you make a suite is offered for the suite map, and its delivery is not measured. GitHub’s own workflows (Dependabot’s, code scanning’s default setup: a path under dynamic/) are listed but never proposed; a repository or a workflow the agent cannot read is listed with its error, and the rest is proposed. A GitLab project has no workflow to choose: its CI history is its pipelines, with the jobs of its newest pipeline named, and GitLab’s own test reports; one with no pipeline yet cannot be chosen. With many sources, choose them at once: Select all and Deselect all, Filter the sources by a part of the name (the buttons then choose among what is shown), Only the failing jobs, Not audited yet and The same as audited before. Each source says when it was last audited, and each Jenkins job its newest build that ran (“last build that ran: #210, failure”), with the one running now or a newer one that did not run beside it; a job none of whose builds ran says “no build that ran yet”. Measure delivery adds one more work for a repository, which reads its pull requests and says how long a change takes from open to merge. It is proposed for the repository the product is delivered from: those with maintenance branches, else the one whose main workflow runs most on pull requests; never a test suite’s. A repository bound to the project that the agent returned nothing for is named above the table. Window is the days of history the audit reads of a repository, with the reason: fewer than 90 when its test reports are large, or when a busy workflow’s runs would take more reads than the code host allows the agent’s token in an hour (GitHub: 5,000). A history says in its audit when it covers less than its window, and back to which day its runs were read.
  3. Choose Review the plan: the works in their order, the agent that runs each and how long it takes. A work takes as long as the same source took before (a large repository’s history as long as it did), else as its operation usually runs on that agent, else on any; the table says which. An agent runs a project’s works one after another, whatever its [agent] concurrency (which lets it run other projects’ works meanwhile), so the plan’s time is their sum on one agent, with the time it should end; two agents that serve the project share the works. Once the run is started, its page says when it should end, and beside each work the time it really took, how long it waited and its estimate; at the end, what its works took against the plan. Up to 100 sources go in one audit; the page says how many you chose before anything is sent, and how to split an audit of more (one per version or per platform). The control plane queues at most 10 of the run’s works at a time, and a work you start meanwhile, such as an investigation, goes before them.
  4. Choose Start the first audit. You may leave the page: the control plane keeps the run and starts each work when the ones before it are done. When the suite map is uncertain, the page asks you to check it on the Test plan and to Confirm the map.
  5. At the end, choose Read the audit (below), or open each stream’s audit from the page. When the run’s last work ends, the control plane makes the summary again by itself, so Read the audit shows the audit you just ran.

Once an audit ran, the solution’s card on Solutions says Last audit: when, its works, its state and how long its works ran, a link to that run’s page; its button says Audit again. The run’s page lists The runs of the audit, the one shown and the earlier ones, each opened by its link.

The audit is also in the menu under Control and changes, beside the Daily CI review: the page a team comes back to. It has three tabs, as the quality health audit has them, the result first: The result (below), The inputs (the CI sources and the plan, the first audit’s steps 1 and 2) and The run (the newest run and the runs before). It opens on The result once there is one; Audit again leads to The inputs.

Read the audit

The project’s page The audit is the audits’ result in one place. The step Run the quality audit of a solution’s checklist leads to it once it is done, and so do the first audit’s page, and the dashboard’s Broken tests and Assessment summary. Above the broken tests, the audits at a glance: the sources with a ring of what their tests say (broken tests, none broken, no test results), the broken tests, the flaky events and the job runs failed, and the sources with the most of them.

Once the audits are summarised, The result starts with the audit at a glance, as the quality health audit has it: under the title, when the summary was made and of how many sources; its state in one sentence beside Fištrónek’s head (“1 of 2 streams is red today; 1 item of the plan fails today”), with Red today: the streams red today; then a tile of Red streams today with the streams today as a ring by their colour, Failed job runs and Broken tests, each with its trend in a word (▼ better, = as before; the whole of it on hover), and the share of failed job runs day by day over the last 14 days.

The result is long, so its sections are a second row of tabs under the glance: For management, The plan (with a shorter loop and what nothing tests), Where you stand (with the slowest tests several streams share), Today and 14 days, Broken tests, Each source’s audit and The rest (priorities, features, the streams paired, what the summary does not say, its sources). The summary’s card, with Download as Markdown, is at the result’s end (above them while there is no summary). The address keeps the section (#result/where), a link to a part of the result opens its section, and printing prints every section.

Both rows of tabs stay at the top while you scroll, with Refresh on their right. The page reads the audits and the summary once, and again when you choose Refresh; beside it, when they were loaded (in a narrow window, that is Refresh’s title). A link within the page, such as How it is counted, only opens its section and scrolls there: nothing is read or drawn again. Once the page is scrolled down, Top in its corner leads back to the top.

Beside the result, What to do now, as the other result pages have it: the action of the plan’s first item as one button, with Start with: and why now (before the audits are summarised, it says to summarise first), then From the audit to the fixes, a step a line: audited, summarised, the broken tests with a cause, the fixes proposed and the next audit that measures them, the step to do now marked. These count different tests: a test broken in two streams is one test to fix. The register of broken tests opens the register.

  1. Choose Summarise the audit. Fistron writes the summary by its rules, without a model, from the newest audit of each source and the Daily CI reviews of the last two weeks: what weighs most across the sources, today and the last 14 days, where each source stands, what to do first, and what the audits could not say. Each figure cites its document. The summary is kept as the project’s document. An audit’s run makes it again when it ends. An audit started on its own (one source’s Audit again, a schedule) does not: the page then says at its top that the summary is older than so many of the audits, before any number, and Summarise again is there. A job is one source whatever its spelling: its CI name (server-2.4-tests-K3S) and a normalised one (server-2-4-tests-k3s, as an older audit or a review’s case may name it) are the same job. Only its newest audit is counted, the older one is said under what the audits could not say as superseded, and the dashboard’s Broken tests and CI jobs show the job once.

  2. The plan comes first in the summary: a few items to work through, in the order of its rule, said above it: what fails today and is not waived first, then what costs most (failed job runs and their CI minutes), then what one action fixes for the most tests and streams; what the summary still needs comes last. It is a table, like every result (a row an item: #, What, Kind, Fix belongs in, Streams, Cost, Today, Since, Solution, Solution state, Action), that sorts, filters by kind, by where the fix belongs and by today’s state, and exports as CSV or Markdown; a row opens to why now, The whole cause and how its solution does it. Move it stays in each row. A column no item has a value in is left out. Each item says:

    • what to do: a cause the RCA of the newest review found (one item per cause, across the streams that share it, titled with the cause in a few words and how many tests it fails; The whole cause opens the RCA’s text), the broken tests of one feature to investigate first, or a step of the audits’ plans (flaky tests, Suite Health, coverage, proposed tests, a missing input);
    • why now, with its numbers: for a cause, its own tests, the job runs they failed since their first failure in the audits’ history and the CI minutes they took, never its streams’ (a build’s only cause is said with its streams’); a cause that other failures only follow comes first;
    • where the fix belongs (the test, the deployment, the product, the infrastructure, or not known yet), said as “fix belongs in”, never as a state;
    • the Fistron solution that does it, its name, and under Solution state its state in a word (ready, not set up, not in your licence), and one button in the row, the first of its buttons (Investigate, Fix it, Repair the test for a cause in the test only, Measure the flaky tests, Propose a test…) when your licence has it and it is set up; the row opens to the others, with Set it up and Ask for it, so that a row stays one line; when the agent reads your CI but the setup has a step left (your pipeline, for example), the buttons all the same, with “ready” and the step left, which makes it automatic, and Set it up on that step; Set it up on the step left when the solution is not set up for this project yet; what it needs, the first plan that has it (available in Business, for example) and Ask for it when your licence does not have it;
    • for a cause, Waive: the Daily CI review’s waivers open with the cause’s job (and its feature, when its tests are of one) chosen, for a known failure the team waives until it is fixed;
    • Open as an issue: the item (its title, why now, the whole cause, where its fix belongs, its streams) as an issue of a repository the agent may write to ([actions] allows open-issue there), with the label fistron plan;
    • what was started from it: Investigated with the state of the newest investigation of its build, and Issue #12 once its issue is opened, each linked;
    • how that solution does it here, in your own numbers: the failed tests whose cause it points at, the CI minutes their streams lost, the minutes a week a change would save (an estimate, said as one);
    • who can do it, where Fistron cannot do it alone;
    • what changed since the summary before, when there is one: “failed job runs 20 → 12”.

    After its items, the practices to adopt, once each and never on every finding: Happy Path Story where the audits’ delivery counted feature changes without a test (“7 of 14 feature changes in 90 days came without a test”), Release Validation Report and Happy Path Story as the project’s newest health audit offers them where the audits do not measure them (its figures, or the team’s words, said so). Their state says “in development” while their solution is, with what works today where the row opens; their button opens the solution’s guide.

    Its streams are counted and each is named by what tells it apart, the words all the plan’s streams share left out, so that a version and a runtime stay (“4: 2.1 k8s, 2.1 podman, 2.0, 2.1 hub”): a stream has the same short name in every row. Four are named and the others counted; hover for all of them whole, and the row opens to them. The charts of the audit name each source and stream the same way, the whole name in the tooltip. A shorter loop costs nothing: its cost is what it takes today and what it saves a week.

    When the plan has items of several solutions, the buttons above it show one solution’s items at a time, with what that solution would close: its items, tests and streams, and the minutes a week it would save. No longer named since the summary of … lists what the summary before named and this one does not: done, or passing again, where its streams were read again; with what it was then. An item whose streams this summary did not read is not said done. A cause is known by the tests it explains, not by the words of the RCA that said it: when the next RCA says it in other words, or one more test fails by it, it is the same item, with what it was beside it. The failures of a job no RCA explains are that job’s item, whatever its build.

    A shorter feedback loop follows, what saves the most minutes a week first: what each stream’s audit proposes for its loop, relative to what starts its runs (a job run per change: the features that never failed to a nightly tier; a nightly job: a short smoke run of the tests that failed, first; Propose the tiers and Measure the loop start them on Work), a slow setup several streams repeat prepared once (a mirror, an image or a snapshot: the streams may test other versions on servers of their own, so its run cannot serve them all), and the Suite Health decisions. Each row’s Cost says what it takes today and what it saves a week, the minutes its order is by: a later tier “a run 95 min → about 82.5 min, saves about 250 min a week”; a smoke run first “first failure after 240 min → an answer after about 17.5 min, saves about 1558 min a week” (the minutes the team waits less for an answer); a setup several streams repeat “about 29 min of each run in 4 streams (840 min a week), saves about 420 min a week”. A setup’s row names its scenario, a link to the audit that timed it, and what to prepare once: a local mirror of what it syncs, the image it builds, a snapshot of the server after it, or a fixture with what it sets up. An item whose streams’ runs a week are not known follows, by what it saves a run. Every saving is an estimate; nothing changes before a person approves it. A stream audited before this version gets its proposal after its next audit.

    What nothing tests follows: the Test plan’s open items (the API no scenario calls, documentation pages no feature covers, platforms and migration paths no test runs, features in no run set, run sets naming a feature that does not exist), once across the streams, the riskiest first: what changed and no test meets, then platforms and migration paths, then the API that changes data. The API no scenario calls is an item for each of the three areas whose uncalled methods change data the most (“9 of its 12 methods change data”); the other areas are one item that names each with its count, the riskiest first, and opens the Test plan, where each area is an item of its own. Each gives an example of its gaps and a button: Propose a test opens it on the Test plan; Schedule or retire them and Fix the reference open the item, and the team changes the run sets. When a stream’s Test plan reads no documentation of the product, its documentation gaps are not measured, and the section says so (“Documentation gaps: not measured in …”) rather than showing none; the plan asks for the product’s documentation. Today lists the streams of the newest Daily CI review. Its status says what it means under the rule your review colours by. By where the pipeline got to: “ran to its end” (with “tests failed” when tests did) or “stopped”. By the waivers: “every test passed”, “every failure waived” or “a failure not waived”. The line under the table says which rule it is. A stream that ran to its end with 25 failed tests is therefore never just “green”.

    Where you stand is a stream a row: Stream (with the job or repository audited beside it when its name differs), Runs, Job runs failed, Tests, Tests failed, Broken tests, Flaky events, CI minutes lost and Audit, and as its last row the total of the streams shown, which is what the key figures add up. Each header has an info button that says what its column counts, and the same lines stand under the table. It sorts, filters by the kind of source (CI-server jobs, pull-request checks, branch and scheduled builds) and exports like every result. The slowest tests several streams share follows as a table of its own: each test with in how many streams it is among the slowest, its slowest median and its median in each stream.

  3. The broken tests, and what they were counted from names each broken test with the source whose audit counted it and in how many of its runs it failed: every broken test the audit counted, as many as Broken tests above says (a source whose list is cut says how many of its broken tests it names: those that fail most). A ring above the table shows them By cause (where the cause is fixed, not concluded, or no cause yet), By stream (the newest Daily CI review’s) or By the way to its fix (no cause yet, investigated, cause found, fix proposed, fix merged, passing again, set aside), from the register of broken tests. The three biggest shares have their own colour and the rest are grey; the legend names every share with its count. Click a slice, or a share in the legend, to see only its tests; Show every broken test shows them all again. Search the broken tests finds them by their name, source, cause, stream or the way to their fix, as every table of tests does. Each test says its cause, its stream (the stream of the source that counted it) and where it is on the way to its fix, and what to do next: Investigate opens Investigate a failed build with the review’s build it failed in. A test broken in two streams has one cause; the other stream’s row says “from the RCA of #”. For a concluded cause with no fix proposed yet, Fix it with Fistron (a cause in the product, the pipeline or the infrastructure’s files) or Repair the test (a cause in the test) opens its causes’ report there.

    To work on a group of streams at once:

    1. Write a part of their names in The streams, for example kubernetes. The page says which streams match and shows only their tests; the address keeps it, so a link opens the same group.
    2. Choose the tests in the table, or all of them in its header. A test whose fix is on its way, or that failed in no build of the review, is not chosen with the others.
    3. The button says how many tests and builds you chose, and beside it how long it takes and what it costs, from the project’s last chains. Click Work on these: Fistron investigates each build the tests failed in, at most 10, and writes a fix for each cause it concludes. Nothing is sent.
    4. The work on these lists each build with its state, what it found and what next: Send it to your fork, Answer it, or Follow it while it runs. What to do now beside the page says the first of them, what decides it and The way to the fixes, until nothing is left to send or answer.
  4. Each source’s audit lists every source with when it was audited, its tests, its flaky events and its failed job runs, each a link to its own audit. A source whose audit read no test report says “no test results”, with how many job runs failed before a test was reported. It is never “0 broken”. Against the audit before says how the source changed since its own previous audit (“3 fewer broken, 25 more flaky events”, or “its first audit”), and the sentence above the table says the same for the sources together: in how many the broken tests fell, rose or stayed, and their number now and then.

Read it as a manager

The section For management, the first under the glance, is for the reader who decides rather than repairs: where the project stands, as gadgets, each naming the document its numbers come from and when it is from. It is there once the audits are summarised. A summary made before Fistron wrote it says so, and Summarise again adds it.

  1. The state today says in one sentence whether a stream is red today or an item of the plan fails today. Fištrónek’s head beside it holds the green checkbox when nothing fails, frowns over a red box when something does, and holds a dashed box when no Daily CI review says.
  2. Key figures are the numbers the documents give: red streams, the share of failed job runs (one for each kind of runs when there are several: pull-request checks that fail rarely and nightly jobs that fail most nights make no single number), broken tests (counted in each stream they are broken in, as the column of Where you stand adds up, with how many different tests that is), flaky events, CI minutes lost, the plan’s open items, the share of the plan’s failing tests with a concluded cause (a cause a review only says is most likely is a hypothesis to check, said beside it, and a refuted one is none), and the lead time when the project measures it. Under each stands how it moved since the summary before (“was 35 %: better”) and the team’s goal when it has one (“goal: at most 24 h, met”). How it is counted leads to the section below that counts it. For the failed job runs, the flaky events and the CI minutes lost, that is Where you stand, with the figure explained above the table: what it counts, that it is its column added up over the streams, the streams most of it comes from and what it leaves out. The column is marked and the table ordered by it; a figure of one kind of runs shows that kind’s streams only. Close the explanation hides it. A number the documents cannot give is left out, never shown as 0.
  3. What changed since the summary before is three lines: the plan, the streams that turned red or stopped being red, and the figure that moved most. An item stays the same item when its cause is said in other words, and a build’s failed tests no cause explained continue as the cause found for them since: still open, with its cause found, not done and new. Done, not read again and still open add up to the items the summary before named.
  4. What we ask of you lists what waits for a decision, each with the page that decides it: a proposed change of the plan’s order, an order no manager confirmed, changes of the Test plan’s next revision, an item whose solution is not in your licence, an item Fistron cannot do alone, goals not set.
  5. Over time draws the failed job runs and the CI minutes they took, by day (by week when the audits span more than five weeks), a line a stream: the three streams with the most failed job runs by name, the others together. Point at a chart, or focus it and use the arrow keys, to read one day; As a table shows the same numbers. 7 days, 14 days, 30 days and Every day draw the last days only, or all of them; Full screen shows a chart on the whole screen, drawn at its width (Leave the full screen, or Esc, to come back). The days under a chart are as many as fit, never one over another. A day with a failed run without a duration has no minutes, never 0. The lines need audits made by this version of Fistron or a newer one: the gadget says to audit the sources again when they have none.
  6. The streams shows each stream’s colour day by day in the Daily CI reviews of the last two weeks, as status icons (a day that ran to its end with failed tests has the warning sign, never a plain green, as in the Daily CI review), and the streams with their figures: an audit’s row by the Daily CI review’s stream its job is in, the job or repository audited beside it, and today’s colour that stream’s.
  7. Causes and the plan shows the failing tests by the layer their fix belongs in, how many of them have a concluded cause, what became of the plan since the summary before, and the plan’s first items. What Fistron does says for each what Fistron can do about it: Writes the fix (Fix it with Fistron, for a concluded cause in the files it cites: the product’s, the pipeline’s, the infrastructure’s, a test in another language than Python), Repairs the test (a Python test), Finds the cause first (a cause not concluded, also one that follows another), Says the fix in words (a cause no file holds, such as a cluster’s state, or one in the product that cites no file), Proposes it, Does it, or A person does it; the first three lead to the page that does it. A person sends each request.
  8. Goals and cost shows the team’s goals with baseline, now and target, from the project’s outcome values, and what the models cost by month, in the unit of your endpoints’ prices. Calls on an endpoint without a price are said beside the cost; nothing is priced by a guess. Money and time are measured values, and nothing is counted per person.
  9. To present it, choose Present or print the view for management: the dashboard alone. Print or save as PDF there gives landscape sheets, one a part, in the light theme whatever theme you use. The engineering view leads back.

Decide the order of the work

Fistron proposes the order of The plan, A shorter feedback loop and What nothing tests by its rule; the team decides it. The same holds for the Broken tests page and the plan’s items on the Test plan. Above each list:

Under each item, Move it puts it To the top, To the bottom or To a position, with Why (kept with who and when). A moved item says where Fistron proposed it and why it moved; Back where the rule puts it takes the move back. A move whose item is gone from the list is listed under the order until someone takes it back.

A manager’s change applies at once. An engineer’s is a proposal: it is listed under the order until a manager clicks Accept or Reject, with a note. Its history lists every change, who made it and when. Nothing waits for a confirmation: the order with its moves applies at once; the confirmation says a manager agreed with it.

Run the audit

  1. Start the operation quality-audit on the Work page of the project (admin-schedules.md). For History, Baseline and Map file choose the project’s documents, newest first: the history may come from one agent (Jenkins) and the snapshot from another (GitHub), and the audit runs on either. In the local UI, start it under Operations, or run fistron quality-audit with --history, --map and --baseline.
  2. Open the record of kind quality_audit under Documents. Its view shows the plan first, then each part with its findings, then what the audit lacked.

Read the plan

The plan is ordered by what costs the team most:

  1. Flaky tests: a failure that passes on a retry blocks changes that are right. Quarantine them (Handle flaky tests and quarantine).
  2. Broken tests: a test failing in most runs is ignored, and hides a real failure. Repair or retire it (Repair tests that work badly).
  3. Suite Health: decide its recommendations (Review the health of your test suite).
  4. Test plan: the suite map’s open items, each a test to write. On the Test plan page, Propose a test writes it as a pull or merge request (Get new tests proposed).
  5. Coverage and Inputs: what to collect so that the next audit says more.

Run the audit again after each step: the plan shrinks as the gaps close.