mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-02 14:40:19 -07:00
Minor testing docs improvements (#24103)
Fix a few formatting issues spotted post review. Also reapply missing commit
This commit is contained in:
parent
ecbf8e933a
commit
8733253a76
6 changed files with 42 additions and 120 deletions
|
@ -82,12 +82,24 @@ See `eos_banner test <https://github.com/ansible/ansible/blob/devel/test/units/
|
|||
|
||||
Code Coverage
|
||||
`````````````
|
||||
|
||||
Most ``ansible-test`` commands allow you to collect code coverage, this is particularly useful when to indicate where to extend testing.
|
||||
|
||||
To collect coverage data add the ``--coverage`` argument to your ``ansible-test`` command line:
|
||||
|
||||
.. code:: shell
|
||||
|
||||
ansible-test units --coverage
|
||||
ansible-test coverage html
|
||||
ansible-test units --coverage apt
|
||||
ansible-test coverage html
|
||||
|
||||
Results will be written to ``test/results/reports/coverage/index.html``
|
||||
|
||||
Reports can be generated in several different formats:
|
||||
|
||||
* ``ansible-test coverage report`` - Console report.
|
||||
* ``ansible-test coverage html`` - HTML report.
|
||||
* ``ansible-test coverage xml`` - XML report.
|
||||
|
||||
To clear data between test runs, use the ``ansible-test coverage erase`` command. For a full list of features see the online help::
|
||||
|
||||
ansible-test coverage --help
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue