QA TOUCH + PYTEST
Upload pytest results to your QA Touch test run
Install the pytest-qatouch plugin and mark each test with its QA Touch case number. Your pytest results are then uploaded to the test run you choose.
Setup: pip install, TR markers, five QA Touch settings
pytest runs the tests. QA Touch keeps the record.
Your pytest suite already says what passed and what failed. The QA Touch plugin sends those results to the test run your team reports from, with no copying in between.
-
Problem: Results from a pytest run are copied into QA Touch by hand.
With the integration: The plugin uploads the results to the test run you specify.
-
Problem: It’s unclear which test belongs to which QA Touch case.
With the integration: A TR marker with the case number ties each test to its case.
-
Problem: Parameterized tests blur into one result.
With the integration: pytest.param can mark each parameter set with its own case number.
pytest run
Illustrative sample data. Test names and case numbers are examples.
What the integration does
Four capabilities from QA Touch’s pytest plugin guide, from install to the uploaded result.
One plugin from PyPI
Install pytest-qatouch with pip. It uploads test results to the test run you specify in your QA Touch portal.
Tests marked with a case number
Decorate a test with @qatouch.TR(number) to link it to its QA Touch test case.
Parameterized tests, one by one
Attach the marker to a parameter set with pytest.param(…, marks=qatouch.TR(number)).
Configured where you prefer
Set five options in pytest.ini or setup.cfg, or pass them as command-line options.
From pip install to results in the test run
Step through the flow. The screens are schematic, drawn from the snippets and labels in the plugin guide.
Your project terminal
Install pytest-qatouch
The plugin comes from PyPI and installs with pip.
Your project test file
Mark each test with its case number
Import qatouch from pytest_qatouch and decorate the test with TR and the QA Touch test case number.
Your project parameterized tests
Mark parameter sets individually
Use pytest.param with a TR mark. A parameter set without a marker isn't mapped to a test case.
"guest" has no marker, so it isn't mapped to a test case.
Your project pytest.ini or setup.cfg
Set the five QA Touch options
Enable the plugin and give it your subdomain, API token, project key and test run key.
Your project run pytest → QA Touch test run
Run pytest, then check the test run
Run your tests as usual. The plugin uploads the results to the test run you specified. Check the test run in QA Touch.
Illustrative sample data. Test names, case numbers and values are examples.
What changes for your QA team
Tests stay in your repository. Outcomes show up in the test run.
No copying results
Results go from pytest to QA Touch through the plugin, so nobody retypes pass and fail.
Case numbers in the code
The marker on each test shows, right where the test is written, which QA Touch case it reports to.
One place to report from
Automated results sit in the same test run as the rest of your testing, ready for the team to review.
Configuration stays with the project
Put the options in pytest.ini or setup.cfg, so everyone who runs the suite uses the same setup.
Who uses it, and for what
Choose a role to see a scenario the integration supports.
A Python suite needs a run to report to
The team tests in pytest and wants its results in QA Touch.
What they do
- Set up the QA Touch project, test run and test cases.
- Gather the subdomain, API token, project key and test run key.
- Hand them to the automation engineer.
Result: the engineer has the five values the plugin needs.
Existing tests need to report
You maintain a pytest suite and want it to feed QA Touch.
What they do
- Install pytest-qatouch.
- Add the TR marker to each test, and to each parameter set that needs one.
- Set the options in pytest.ini or setup.cfg.
Result: each run uploads results to the test run.
Reviewing an automated run
You need to know how many cases passed before sign-off.
What they do
- Open the test run in QA Touch after the pytest run.
- Check the case results.
- Follow up on the failures.
Result: the run shows the latest pytest outcome without manual entry.
You fixed something and want to re-check
You changed code and want to confirm the affected tests pass.
What they do
- Re-run the affected pytest tests.
- Open the QA Touch test run.
- Confirm the case result changed.
Result: the fix is confirmed in the same run the QA team reports from.
Set it up in three parts
These steps follow QA Touch’s pytest plugin guide.
Before you start
- A Python project that uses pytest, with pip.
- A QA Touch project with a test run and test cases.
- Your QA Touch subdomain, API token, project key and test run key.
The guide lists the five settings but doesn’t say where to find the token and keys, which Python or pytest versions it supports, or what happens to tests without a marker. It also doesn’t show a run command, so run pytest as you normally do.
- Run
pip install pytest-qatouch. - The package comes from PyPI.
- Import the marker:
from pytest_qatouch import qatouch. - Decorate each test with
@qatouch.TR(10), using its QA Touch test case number. - For parameterized tests, use
pytest.param(..., marks=qatouch.TR(11))on each parameter set that needs a case. - Parameter sets without a marker aren't mapped to a test case.
- Add a
[pytest]section topytest.iniorsetup.cfg, or use command-line options. - Set
qatouchtoTrueto enable the plugin. - Set
qatouch-subdomain,qatouch-api-token,qatouch-project-keyandqatouch-testrun-key. - Run pytest, then check the QA Touch test run.
Tests marked? See how results reach the run.
Questions about the pytest integration
Answers are based on QA Touch’s pytest plugin guide.
What does the QA Touch pytest plugin do?
It uploads pytest test results to the test run you specify in your QA Touch portal. It doesn’t do anything else, according to the guide.
How do I install it?
Run pip install pytest-qatouch. The package is available from PyPI.
How do I link a test to a QA Touch test case?
Import qatouch from pytest_qatouch and decorate the test with @qatouch.TR(number), where number is the QA Touch test case number.
Does it work with parameterized tests?
Yes. Attach the marker to a parameter set with pytest.param(…, marks=qatouch.TR(number)). A parameter set without a marker isn’t mapped to a test case.
Which settings does it need?
Five: qatouch (set to True), qatouch-subdomain, qatouch-api-token, qatouch-project-key and qatouch-testrun-key. Set them in a [pytest] section of pytest.ini or setup.cfg, or as command-line options.
Where do I find the API token and keys?
The pytest guide doesn’t say. Check QA Touch’s help documentation for the automation configuration and API keys, or ask QA Touch support.
Which versions are supported, and does anything sync back?
The guide doesn’t list supported Python or pytest versions, and doesn’t describe status mapping. Results go from pytest to QA Touch, and no sync back is described.
Connect pytest to QA Touch
Install the plugin, mark your tests, and let the next pytest run upload to your test run.