Schedule runs
Replay one test or every Ready test on a cadence.
In short
A schedule replays one test, or every Ready test on a site, against one environment - hourly, daily, weekly or monthly. It runs as the person who created it.
Before you start
- Who: a schedule runs as the person who made it, or who took it over last. Making one needs Edit on the site.
- Plan: scheduled runs count against the monthly browser minutes of the person who created the schedule.
- First: a test that signs in by the environment's sign-in, not by a typed secret.
Add a schedule
- Open "Schedules" and press "New schedule", or choose "Schedule this test" on a test.
- Choose "One test" or "Every Ready test on the site", and the environment.
- Pick the frequency and time, and the weekday or a day of the month from 1 to 28.
- Press "Save schedule".
Run a schedule in your pipeline
Where {{brand}} does not drive a browser itself, a schedule runs in your own CI. Each turn waits for the run your pipeline reports; when none arrives in time the schedule shows "Late" and its owner is told.
- Open "Schedules" and choose "Run in CI" on the schedule.
- Pick GitHub Actions, Azure Pipelines or GitLab CI and copy the pipeline. It runs at the schedule's time in UTC.
- To check every release too, switch on "Also after each deploy" before copying: the pipeline then also runs after a successful deploy (for Azure Pipelines, put your deploy pipeline's name where the file asks for it).
- Keep the access token as KAMOCORE_TOKEN in the pipeline's secrets, with UiTester:read and UiTester:write, and every secret it names.
- The next reported run clears "Late".
Gate a pipeline on your tests
Your build pipeline can run a site's tests and stop when one fails. The tests run in a browser on the pipeline's own machine, exactly as {{brand}} would replay them, so a site only that machine reaches works. Each run is reported to {{brand}} and counts like any other run.
- In the pipeline, run: kamocore ui run --site <the site's id> --junit ui-results.xml. Every ready test of the site runs; --tag smoke runs only the tests with that tag, and --test runs chosen tests.
- The step fails when a test fails. It also fails - never passes - when a test could not run, its sign-in failed, it was stopped, it did not end within --timeout or {{brand}} could not record it.
- A test held in quarantine still runs and is reported, but never fails the pipeline.
- Secrets never come from {{brand}}: a secret named password is read from the pipeline's variable KAMOCORE_SECRET_PASSWORD, and none is printed or reported.
- --retry runs a failed test once more; a pass on the second run shows as flaky.
- The CLI downloads the browser on its first run; kamocore ui install --with-deps does it ahead, with the system libraries a fresh Linux machine needs.
- The access token needs UiTester:read and UiTester:write. Ready steps for GitHub Actions, GitLab and Azure Pipelines come with the CLI.
Good to know
- You give the time on your own clock; the dialog shows the UTC time it is stored as. Hourly means an hour after the schedule was saved or last ran.
- Switch a schedule off to pause it; switching it back on runs it straight away. "Run now" queues its runs without moving its next run.
- Scheduled runs count against the monthly browser minutes of the person who created the schedule. A failed one puts a message in their inbox.
- Scheduled runs are never given typed secrets: a test that must sign in needs the environment's sign-in.
- Upcoming scheduled runs show in the Planner.
- "Delete" on a schedule can be undone from the message that follows for ten minutes; a turn it missed meanwhile is skipped. A schedule whose test was deleted comes back only after the test does.
If something goes wrong
- "A weekly schedule needs a day of week." / "A monthly schedule needs a day of month between 1 and 28."
- "The schedule is not visible to its owner.": its owner lost access to the site. Someone who can open it takes it over.
- "A schedule cannot be moved to another scope. Create a new one instead."
Related
- /help/ui-tester/running-and-schedules
- /help/ui-tester/site-settings
- /help/planner/test-schedules-on-the-calendar