Add description of profiles to OSTF Contributor`s Guide

Added description on how to use __profile__ dictionary
for setup of test sets.

Change-Id: I5da19861793928a98f602f11e6a13232e8ec1302
Closes-Bug: #1301286
This commit is contained in:
Anastasiia Naboikina 2014-04-02 13:23:30 +03:00
parent 00b2e1015e
commit d593b43f02

View File

@ -82,6 +82,59 @@ Here's a test example which confirms the above explanations:
.. image:: _images/test_docstring_structure.png
Test run ordering and profiles
------------------------------
Each test set (sanity, smoke, ha and platform_tests) contains a special
variable in __init__.py module which is called __profile__.
The profile variable makes it possible to set different rules, such as test run
order, set up deployment tags, information gathering on cleanup and expected
time estimate for running a test set.
If you are develop a new set of tests, you need to create __init__.py module
and place __profile__ dict in it. It is important that your profile matches
the following structure::
__profile__ = {
"test_runs_ordering_priority": 4,
"id": "platform_tests",
"driver": "nose",
"test_path": "fuel_health/tests/platform_tests",
"description": ("Platform services functional tests."
" Duration 3 min - 60 min"),
"cleanup_path": "fuel_health.cleanup",
"deployment_tags": ['additional_components'],
"exclusive_testsets": []
}
Take note of each field in the profile, along with acceptable values.
- test_runs_ordering_priority is a field responsible for setting the priority
in which the test set will be displayed, for example, if you set "6" for
sanity tests and "3" for smoke tests, smoke test set will be displayed
first on the HealthCheck tab;
- id is just the unique id of a test set;
- driver field is used for setting the test runner;
- test_path is the field representing path where test set is located starting
from fuel_health directory;
- description is the field which contains the value to be shown on the UI
as the tests duration;
- cleanup_path is the field that specifies path to module responsible for
cleanup mechanism (if you do not specify this value, cleanup will not be
started after your test set);
- deployment_tags field is used for defining when these tests should be
available depending on cluster settings;
- exclusive_testsets field gives you an opportunity to specify test sets that
will be run successively. For example, you can specify "smoke_sanity" for
smoke and sanity test set profiles, then these tests will be ran not
simultaneously, but successively.
It is necessary to specify a value for each of the attributes. The optional
attribute is "deployment_tags", meaning optionally you may not specify it
in your profile at all. You can leave the "exclusive_testsets" empty ([]) to
run your testset simultaneously with other ones.
How to execute my tests?
------------------------