Concurrency with pytest executor

180 views
Skip to first unread message

apoorva khandelwal

unread,
Jul 27, 2021, 1:20:10 PM7/27/21
to codename-taurus

Hi All,

I am trying to use concurrency with pytest executor, i have used 10 as the concurrency but when i run the yml, report shows concurrency as 1 only. i have tried concurrency parameter settings both using yaml and command line. Can anyone help how to use concurrency settings with pytest?

execution:
- executor: selenium
  runner: pytest
  concurrency: 10
  iterations: 3
  scenario: pytest-test
  env:
    DEVMODE: 1

scenarios:
  pytest-test:
    script: test_script.py

reporting:
- module: final-stats
  summary: true  # overall samples count and percent of failures
  percentiles: true  # display average times and percentiles
  summary-labels: false # provides list of sample labels, status, percentage of completed, avg time and errors
  failed-labels: false  # provides list of sample labels with failures
  test-duration: true  # provides test duration
  dump-xml: results.xml
 

Regards,
Apoorva Khandelwal

DT

unread,
Jul 28, 2021, 5:46:38 AM7/28/21
to codename-taurus
I don't think it's currently supported, as per Taurus documentation

Taurus will execute tests in a loop until desired number of iterations will complete or hold-for time will be exceeded. The default number of iterations is 1.

So you can only operate "iterations" and "hold-for" directives.

If you want to run your Python tests in parallel it makes sense to consider converting them to Locust and use Locust Executor where you can control the concurrency from YAML and/or command line
Reply all
Reply to author
Forward
0 new messages