1
1
pytest-testrail
2
2
===============
3
3
4
- |Build Status |
4
+ |Build Status | | PyPI version |
5
5
6
6
This is a pytest plugin for creating/editing testplans or testruns based
7
7
on pytest markers. The results of the collected tests will be updated
@@ -12,7 +12,7 @@ Installation
12
12
13
13
::
14
14
15
- pip install pytest-testrail
15
+ pip install pytest-testrail
16
16
17
17
Configuration
18
18
-------------
@@ -24,19 +24,19 @@ Add a marker to the tests that will be picked up to be added to the run.
24
24
25
25
.. code :: python
26
26
27
- from pytest_testrail.plugin import testrail
27
+ from pytest_testrail.plugin import testrail
28
28
29
- @testrail (' C1234' , ' C5678' )
30
- def test_foo ():
31
- # test code goes here
29
+ @testrail (' C1234' , ' C5678' )
30
+ def test_foo ():
31
+ # test code goes here
32
32
33
- # OR
33
+ # OR
34
34
35
- from pytest_testrail.plugin import pytestrail
35
+ from pytest_testrail.plugin import pytestrail
36
36
37
- @pytestrail.case (' C1234' , ' C5678' )
38
- def test_bar ():
39
- # test code goes here
37
+ @pytestrail.case (' C1234' , ' C5678' )
38
+ def test_bar ():
39
+ # test code goes here
40
40
41
41
See a `more detailed example here <tests/livetest/livetest.py >`__.
42
42
@@ -47,15 +47,15 @@ Config for TestRail
47
47
48
48
.. code :: ini
49
49
50
- [API]
51
- url = https://yoururl.testrail.net/
52
- email = user@email.com
53
- password = <api_key>
50
+ [API]
51
+ url = https://yoururl.testrail.net/
52
+ email = user@email.com
53
+ password = <api_key>
54
54
55
- [TESTRUN]
56
- assignedto_id = 1
57
- project_id = 2
58
- suite_id = 3
55
+ [TESTRUN]
56
+ assignedto_id = 1
57
+ project_id = 2
58
+ suite_id = 3
59
59
60
60
Or
61
61
@@ -70,58 +70,59 @@ updated in TestRail:
70
70
71
71
.. code :: bash
72
72
73
- py.test --testrail --tr-config=< settings file> .cfg
73
+ py.test --testrail --tr-config=< settings file> .cfg
74
74
75
75
All available options
76
76
~~~~~~~~~~~~~~~~~~~~~
77
77
78
78
::
79
79
80
- --testrail Create and update testruns with TestRail
81
- --tr-config=TR_CONFIG
82
- Path to the config file containing information about
83
- the TestRail server (defaults to testrail.cfg)
84
- --tr-url=TR_URL TestRail address you use to access TestRail with your
85
- web browser (config file: url in API section)
86
- --tr-email=TR_EMAIL Email for the account on the TestRail server (config
87
- file: email in API section)
88
- --tr-password=TR_PASSWORD
89
- Password for the account on the TestRail server
90
- (config file: password in API section)
91
- --tr-testrun-assignedto-id=TR_TESTRUN_ASSIGNEDTO_ID
92
- ID of the user assigned to the test run (config file:
93
- assignedto_id in TESTRUN section)
94
- --tr-testrun-project-id=TR_TESTRUN_PROJECT_ID
95
- ID of the project the test run is in (config file:
96
- project_id in TESTRUN section)
97
- --tr-testrun-suite-id=TR_TESTRUN_SUITE_ID
98
- ID of the test suite containing the test cases (config
99
- file: suite_id in TESTRUN section)
100
- --tr-testrun-suite-include-all
101
- Include all test cases in specified test suite when
102
- creating test run (config file: include_all in TESTRUN
103
- section)
104
- --tr-testrun-name=TR_TESTRUN_NAME
105
- Name given to testrun, that appears in TestRail
106
- (config file: name in TESTRUN section)
107
- --tr-run-id=TR_RUN_ID
108
- Identifier of testrun, that appears in TestRail. If
109
- provided, option "--tr-testrun-name" will be ignored
110
- --tr-plan-id=TR_PLAN_ID
111
- Identifier of testplan, that appears in TestRail. If
112
- provided, option "--tr-testrun-name" will be ignored
113
- --tr-version=TR_VERSION
114
- Indicate a version in Test Case result.
115
- --tr-no-ssl-cert-check
116
- Do not check for valid SSL certificate on TestRail
117
- host
118
- --tr-close-on-complete
119
- Close a test plan or test run on completion.
120
- --tr-dont-publish-blocked
121
- Do not publish results of "blocked" testcases in
122
- TestRail
123
- --tr-skip-missing Skip test cases that are not present in testrun
124
-
125
-
126
- .. |Build Status | image :: https://travis-ci.org/dubner/pytest-testrail.svg?branch=master
80
+ --testrail Create and update testruns with TestRail
81
+ --tr-config=TR_CONFIG
82
+ Path to the config file containing information about
83
+ the TestRail server (defaults to testrail.cfg)
84
+ --tr-url=TR_URL TestRail address you use to access TestRail with your
85
+ web browser (config file: url in API section)
86
+ --tr-email=TR_EMAIL Email for the account on the TestRail server (config
87
+ file: email in API section)
88
+ --tr-password=TR_PASSWORD
89
+ Password for the account on the TestRail server
90
+ (config file: password in API section)
91
+ --tr-testrun-assignedto-id=TR_TESTRUN_ASSIGNEDTO_ID
92
+ ID of the user assigned to the test run (config file:
93
+ assignedto_id in TESTRUN section)
94
+ --tr-testrun-project-id=TR_TESTRUN_PROJECT_ID
95
+ ID of the project the test run is in (config file:
96
+ project_id in TESTRUN section)
97
+ --tr-testrun-suite-id=TR_TESTRUN_SUITE_ID
98
+ ID of the test suite containing the test cases (config
99
+ file: suite_id in TESTRUN section)
100
+ --tr-testrun-suite-include-all
101
+ Include all test cases in specified test suite when
102
+ creating test run (config file: include_all in TESTRUN
103
+ section)
104
+ --tr-testrun-name=TR_TESTRUN_NAME
105
+ Name given to testrun, that appears in TestRail
106
+ (config file: name in TESTRUN section)
107
+ --tr-run-id=TR_RUN_ID
108
+ Identifier of testrun, that appears in TestRail. If
109
+ provided, option "--tr-testrun-name" will be ignored
110
+ --tr-plan-id=TR_PLAN_ID
111
+ Identifier of testplan, that appears in TestRail. If
112
+ provided, option "--tr-testrun-name" will be ignored
113
+ --tr-version=TR_VERSION
114
+ Indicate a version in Test Case result.
115
+ --tr-no-ssl-cert-check
116
+ Do not check for valid SSL certificate on TestRail
117
+ host
118
+ --tr-close-on-complete
119
+ Close a test plan or test run on completion.
120
+ --tr-dont-publish-blocked
121
+ Do not publish results of "blocked" testcases in
122
+ TestRail
123
+ --tr-skip-missing Skip test cases that are not present in testrun
124
+
125
+ .. |Build Status | image :: https://travis-ci.org/allankp/pytest-testrail.svg?branch=master
127
126
:target: https://travis-ci.org/allankp/pytest-testrail
127
+ .. |PyPI version | image :: https://badge.fury.io/py/pytest-testrail.svg
128
+ :target: https://badge.fury.io/py/pytest-testrail
0 commit comments