зеркало из https://github.com/mozilla/normandy.git
Removed use of TestRail for recording results of test runs, updated documentation to reflect these changes
This commit is contained in:
Родитель
2f435b761f
Коммит
aabdb99342
|
@ -5,7 +5,6 @@ import pytest
|
|||
from datetime import datetime
|
||||
|
||||
from normandy.recipes import signing
|
||||
from pytest_testrail.plugin import testrail
|
||||
|
||||
|
||||
def canonical_json(data):
|
||||
|
@ -31,7 +30,6 @@ def check_action_schema_format(action):
|
|||
"are actually added to mozilla-central. "
|
||||
)
|
||||
)
|
||||
@testrail("C7108")
|
||||
def test_expected_action_types(conf, requests_session):
|
||||
r = requests_session.get(conf.getoption("server") + "/api/v1/action/")
|
||||
r.raise_for_status()
|
||||
|
@ -47,7 +45,6 @@ def test_expected_action_types(conf, requests_session):
|
|||
assert record["name"] in expected_records
|
||||
|
||||
|
||||
@testrail("C7109")
|
||||
def test_console_log(conf, requests_session):
|
||||
r = requests_session.get(conf.getoption("server") + "/api/v1/action/")
|
||||
r.raise_for_status()
|
||||
|
@ -72,7 +69,6 @@ def test_console_log(conf, requests_session):
|
|||
check_action_schema_format(record)
|
||||
|
||||
|
||||
@testrail("C7110")
|
||||
def test_show_heartbeat(conf, requests_session):
|
||||
r = requests_session.get(conf.getoption("server") + "/api/v1/action/")
|
||||
r.raise_for_status()
|
||||
|
@ -96,7 +92,6 @@ def test_show_heartbeat(conf, requests_session):
|
|||
check_action_schema_format(record)
|
||||
|
||||
|
||||
@testrail("C7113")
|
||||
def test_recipe_signatures(conf, requests_session):
|
||||
r = requests_session.get(conf.getoption("server") + "/api/v1/recipe/signed/")
|
||||
r.raise_for_status()
|
||||
|
|
|
@ -1,7 +1,3 @@
|
|||
from pytest_testrail.plugin import testrail
|
||||
|
||||
|
||||
@testrail("C7114")
|
||||
def test_heartbeat_is_ok(conf, requests_session):
|
||||
r = requests_session.get(conf.getoption("server") + "/__heartbeat__")
|
||||
# No r.raise_for_status() so we can check other things first
|
||||
|
|
|
@ -2,7 +2,6 @@ from urllib.parse import urljoin
|
|||
|
||||
import html5lib
|
||||
import pytest
|
||||
from pytest_testrail.plugin import testrail
|
||||
|
||||
|
||||
"""These are paths hit by self repair that need to be very fast"""
|
||||
|
@ -25,13 +24,11 @@ class TestHotPaths(object):
|
|||
site, such as cache headers.
|
||||
"""
|
||||
|
||||
@testrail("C9490")
|
||||
def test_no_redirects(self, conf, requests_session, path):
|
||||
r = requests_session.get(conf.getoption("server") + path)
|
||||
r.raise_for_status()
|
||||
assert 200 <= r.status_code < 300
|
||||
|
||||
@testrail("C9491")
|
||||
def test_no_vary_cookie(self, conf, requests_session, path, only_readonly):
|
||||
r = requests_session.get(conf.getoption("server") + path)
|
||||
r.raise_for_status()
|
||||
|
|
|
@ -31,45 +31,3 @@ To run these tests, use the following command from the root project directory.
|
|||
where ``<server>`` is the server you want to test, such as
|
||||
``https://stage.normandy.cloudops.mozgcp.net`` or `https://localhost:8000`.
|
||||
|
||||
If you want to send results of the test run to TestRail, you need the following
|
||||
pre-requisites:
|
||||
|
||||
1. You have VPN access to the staging environment
|
||||
2. You have an account on https://testrail.stage.mozaws.net
|
||||
3. Copy `testrail.cfg.dist` to `testrail.cfg`
|
||||
4. Modify that TestRail configuration file with your email, TestRail password and TestRail user ID
|
||||
|
||||
Then, for any test case you want to report results for, make sure the
|
||||
script file the test is in imports the proper TestRail module:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
from pytest_testrail.plugin import testrail
|
||||
|
||||
and then you use a decorator to indicate this test case will be reporting
|
||||
results. Here's an example:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
@testrail('C5603')
|
||||
def test_expected_action_types(conf, requests_session):
|
||||
|
||||
The ID for the test case (C5603 in this example) is generated by TestRail when
|
||||
the test case is created.
|
||||
|
||||
To run the tests and report the results to TestRail, use the following command:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
py.test --server=<server> -v \
|
||||
--no-ssl-cert-check \
|
||||
--testrail=contract-tests/testrail.cfg contract-tests/
|
||||
|
||||
The values for ``<server>`` are the same as before.
|
||||
|
||||
`--no-ssl-cert-check` tells pytest to not check if the SSL certificate for the
|
||||
TestRail install is valid -- we are using a self-signed certificate and the
|
||||
underlying code throws an exception unless we tell it not to check.
|
||||
|
||||
`--testrail=` tells pytest that we wish to report the results of TestRail
|
||||
decorated tests and where we can find the configuration file.
|
||||
|
|
|
@ -186,8 +186,6 @@ pytest-django==3.5.1 \
|
|||
pytest-mock==1.10.4 \
|
||||
--hash=sha256:43ce4e9dd5074993e7c021bb1c22cbb5363e612a2b5a76bc6d956775b10758b7 \
|
||||
--hash=sha256:5bf5771b1db93beac965a7347dc81c675ec4090cb841e49d9d34637a25c30568
|
||||
pytest-testrail==2.3.3 \
|
||||
--hash=sha256:d1981ff94fb28b485fa51c28042ea728bab5362b4f08de86aa849d398aede6fc
|
||||
raven==6.10.0 \
|
||||
--hash=sha256:44a13f87670836e153951af9a3c80405d36b43097db869a36e92809673692ce4 \
|
||||
--hash=sha256:3fa6de6efa2493a7c827472e984ce9b020797d0da16f1db67197bcc23c8fae54
|
||||
|
|
Загрузка…
Ссылка в новой задаче