-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Created using advanced configs (infra) (#642)
* Created using advanced configs Minor: new plugin to put todos in the docs * Fixed spelling * Minor: fixed typo * Implemented feedback from review * Apply suggestions from code review Co-authored-by: Matias Piipari <[email protected]> * update format in reference * add config inheritance to explanation * add auto-retry how-to guide * add ui verbosity how-to guide * rework tutorial * add syntax highlighting * add spelling check exception --------- Co-authored-by: tang-mm <[email protected]> Co-authored-by: Matias Piipari <[email protected]> Co-authored-by: MengT <[email protected]>
- Loading branch information
1 parent
db453f5
commit 07260d6
Showing
10 changed files
with
789 additions
and
255 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,6 +35,7 @@ github | |
GitHub | ||
GPLv | ||
hostname | ||
html | ||
http | ||
https | ||
INI | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
Configuring auto-retry for failing tests | ||
========================================== | ||
|
||
You can use launchers to configure Checkbox to automatically retry failing jobs. | ||
|
||
Enable auto-retry | ||
------------------ | ||
|
||
To apply the auto-retry function to all failing test jobs, add a ``ui`` section | ||
in your launcher and set the ``ui.auto-retry`` option to ``yes``. You can also | ||
specify the maximum number of attempts and the delay between each retry. | ||
|
||
For example: | ||
|
||
.. code-block:: ini | ||
:caption: my_launcher | ||
:emphasize-lines: 9-10, 12 | ||
[test plan] | ||
unit = com.canonical.certification::smoke | ||
forced = yes | ||
[test selection] | ||
forced = yes | ||
[ui] | ||
auto_retry = yes | ||
max_attempts = 2 | ||
# the delay is in seconds | ||
delay_before_retry = 2 | ||
After every test was executed, all failing tests were retried up to two times, | ||
waiting 2 seconds between one attempt and the next. This may be useful if, for | ||
example, a test relies on an external factor like WiFi access. | ||
|
||
For more details about the ``ui`` section in Checkbox launchers, see | ||
:doc:`../../reference/launcher`. | ||
|
||
Skip auto-retry | ||
---------------- | ||
|
||
When ``auto_retry`` is set to ``yes``, **every** failing job will be retried. | ||
This can be a problem: for instance, for jobs that take a really long time | ||
to run. To avoid this, you can use the ``auto-retry=no`` inline override | ||
in the test plan to explicitly mark each job you do not wish to see | ||
retried. | ||
|
||
For example: | ||
|
||
.. code-block:: yaml | ||
:caption: my_test_plan.pxu | ||
:emphasize-lines: 5 | ||
id: foo-bar-and-froz | ||
_name: Tests Foo, Bar and Froz | ||
include: | ||
foo | ||
bar auto-retry=no | ||
froz | ||
In this case, even if the job ``bar`` fails and auto-retry is activated, it | ||
will not be retried. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
Changing output verbosity | ||
=============================== | ||
|
||
When test are executed, by default, Checkbox prints errors and warnings of all | ||
test jobs on the standard output. But sometimes you may want to know more on the | ||
tests that are executing, or you may only care about the results. | ||
|
||
To customize the types of output information produced while running tests, you can | ||
either apply verbosity options when you launch Checkbox, or change the UI output | ||
options in a launcher: ``ui.output`` and ``ui.verbosity``. | ||
|
||
Hide output by job types | ||
------------------------- | ||
|
||
You can hide output from resource jobs and automatic jobs by toggling the | ||
``ui.output`` option. | ||
|
||
For example, when resource jobs are plenty, the standard output may fill up with their | ||
output. In this case, consider the ``hide-resource-and-attachment`` option in the | ||
following launcher: | ||
|
||
.. code-block:: ini | ||
:emphasize-lines: 9 | ||
[test plan] | ||
unit = com.canonical.certification::smoke | ||
forced = yes | ||
[test selection] | ||
forced = yes | ||
[ui] | ||
output = hide-resource-and-attachment | ||
Similarly, to hide the standard output of automatic jobs, use the | ||
``hide-automated`` option as in the following launcher: | ||
|
||
.. code-block:: ini | ||
:emphasize-lines: 10 | ||
[test plan] | ||
unit = com.canonical.certification::smoke | ||
forced = yes | ||
[test selection] | ||
forced = yes | ||
[ui] | ||
# This also hides resource and attachments, they are automated as well! | ||
output = hide-automated | ||
Change verbosity level | ||
----------------------- | ||
|
||
By default, Checkbox only prints errors and warnings to the output. If you want to have more detailed information about Checkbox execution, run Checkbox tests with one of the verbosity levels: | ||
|
||
* verbose - report informational messages during execution, such as job starting | ||
* debug - report all debug messages | ||
|
||
Using command options | ||
~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
When you invoke Checkbox, add either the ``--verbose`` or ``--debug`` option respectively. | ||
|
||
For example:: | ||
|
||
$ checkbox.checkbox-cli --debug launcher mylauncher | ||
|
||
Using launcher configurations | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
Add the ``verbosity`` option in the ``ui`` section of your launcher file. For example: | ||
|
||
.. code-block:: ini | ||
:emphasize-lines: 10 | ||
[test plan] | ||
unit = com.canonical.certification::smoke | ||
forced = yes | ||
[test selection] | ||
forced = yes | ||
[ui] | ||
# Also, `debug` is available | ||
verbosity = verbose | ||
For more information about the ``ui`` section, see :doc:`../../reference/launcher`. |
Oops, something went wrong.