-
Notifications
You must be signed in to change notification settings - Fork 32
QADOCS tool use guide
Luis González edited this page Nov 18, 2021
·
15 revisions
After installing qa-docs
(you can follow the installation guide steps), you can check the qa-docs
help.
-
-h, --help
: Print theqa-docs
help message. -
-s, --sanity-check
: Perform a sanity check using the data previously parsed. Tests coverage, errors, and tests count. -
-v, --version
: Print theqa-docs
version. -
--no-logging
: Disableqa-docs
logging. -
-d, --debug
: Run in debug mode. -
--tests-path
: Specify the path of the tests to be parsed. Set it when you want to parse or run a sanity check. -
-t, --tests
: Parse the test(s) you specify as an argument. -
--types
: Parse the tests from type(s) that it is passed as an argument. -
--modules
: Parse the tests from module(s) that it is passed as an argument. -
-o
: Select the output directory where the documentation will be generated. -
-e
: Check if the given test(s) exist(s). -
--check-documentation
: Check if the test(s) passed with-t
is(are) documented following the currentqa-docs
schema. -
-i
: Index the data previously parsed. -
-l
: Launchsearch-ui
with the data previously indexed. -
-il
: Index the data previously parsed and launchsearch-ui
-
--docker-run
: Run a docker container that runsqa-docs
with the same arguments that it receives. This allows you to runqa-docs
as you would do in a local environment. -
--qa-branch
: Specifies the branch that allocates the tests input when--docker-run
is passed. -
--format
: Select the generated files format. Set as JSON by default.
-
-t
cannot be launched with--types
and--modules
,-e
,--exist
,-i
,-l
and-il
options. -
-t
,--types
,--modules
,-t
,-e
and-s
need the-I
option. -
-e
cannot be launched with--types
and--modules
,-i
,-l
and-il
options. -
-o
cannot be launched with--types
or--modules
,-e
,--exist
,-i
,-l
and-il
options. -
-s
only allows a run with the--tests-path
option. -
--check-documentation
only allows runs with the-t
option. -
--qa-branch
only allows runs with the--docker-run
option.
Parse all the tests within the path.
qa-docs --tests-path /tmp/wazuh-qa/tests
Parse integration
tests
qa-docs --tests-path /tmp/wazuh-qa/tests --types integration
Parse test_active_response
and test_agentd
tests
qa-docs --tests-path /tmp/wazuh-qa/tests --types integration --modules test_active_response test_agentd
Create an index with the data previously parsed
qa-docs -i index_name
Launch search-ui
the data previously indexed via web browser
qa-docs -l index_name
Index the data previously parsed and launch search-ui
qa-docs -il index_name
Parse integration tests modules, index the data and launch search-ui
to visualize it via web browser
qa-docs --tests-path /tmp/wazuh-qa/tests --types integration --modules test_active_response test_agentd -il index_name
Parse integration tests modules, index the data and launch search-ui
to visualize it via web browser(using YAML format)
qa-docs --tests-path /tmp/wazuh-qa/tests --types integration --modules test_active_response test_agentd -il index_name --format yaml
Perform a sanity check after a previous parse run
qa-docs --tests-path /tmp/wazuh-qa/tests -s
Parse a list of tests
qa-docs --tests-path /tmp/wazuh-qa/tests -t test_cache test_general_settings_enabled
Parse a list of tests and give a custom output directory
qa-docs --tests-path /tmp/wazuh-qa/tests -t test_cache test_general_settings_enabled -o /tmp
Check if a list of tests exists
qa-docs --tests-path /tmp/wazuh-qa/tests -e test_cache test_general_settings_enabled
Check if a test is properly documented
qa-docs --tests-path /tmp/wazuh-qa/tests -t test_day_wday --check-documentation
Parse test_active_response
tests and generate the documentation in /tmp/qa_docs
using Docker
qa-docs --docker-run --qa-branch 1796-migrate-doc-active-response --types integration --modules test_active_response
Parse test_fim
tests and generate the documentation in custom output path using Docker
qa-docs --docker-run --qa-branch 1796-migrate-doc-active-response --types integration --modules test_fim -o /custom/path
Parse test_active_response
tests and launch search-ui to visualize the documentation using Docker
qa-docs --docker-run --qa-branch 1796-migrate-doc-active-response --types integration --modules test_active_response -il qa-index
More details and examples can be found in the qa-docs
README.MD.