Comments (20)
Thanks for the interest. Here's what I'd do:
- Repro
- Do the brief steps in CONTRIBUTING.md and make sure the existing tests were working.
- Write a failing test case similar to the one for
pytest-html
.pytest-allure
needs to be added to tox.ini. I might skip this if I was unfamiliar with testingpytest
plugins. - I'd start by trying @SizovIgor's suggestion. The suggestion was prior to a pretty substantial change, but could be adapted.
- If that didn't work, I'd investigate the
pytest-allure
repo to determine how the reports are generated. There's probably some data thatpytest-allure
depends on thatpytest-parallel
isn't sharing across threads. All ofpytest-parallel
is a few hundred lines in this file. - If I still couldn't figure it out, I'd open a PR with the test case (if I wrote one), so others could give it a shot.
If you try it, let me know if you run into any issues.
from pytest-parallel.
looks like this is the same issue as the --junit one
from pytest-parallel.
Hmm, I'd understand for --workers
, but I'm not sure why it's not working for --tests-per-worker
from pytest-parallel.
Let me rephrase that just to be clear. It is being generated, but its showing 0 tests executed.
from pytest-parallel.
Hi @kevlened I was just curious if there was any plan to address the reporting bugs in the near future?
from pytest-parallel.
Not in the near future (probably in months, not weeks or days). I'm not focusing on Browsertron much anymore and this library was a part of that work. I'll do my best to get to them when I can. I can provide guidance for any PRs though!
from pytest-parallel.
@kevlened Completely understand, I hope I didn't come off as rude. I appreciate the work you did to create this. If I knew python other than to write some Selenium tests Id love to help. :)
from pytest-parallel.
No worries (and thanks)!
from pytest-parallel.
@kevlened Can you tell me your idea about a time for fix this issue (Bug) ?
from pytest-parallel.
Please, look my changes, it is help me to work with allure-pytest in paralel.
I'm test with --workers 2
and with 3,6,8,auto
.
But it is have a trouble with --tests-per-worker
when it is greather than 1
. It is add N identical steps, where N = tests-per-worker
index 63d4175..8e71da4 100644
--- a/pytest_parallel/__init__.py
+++ b/pytest_parallel/__init__.py
@@ -8,6 +8,7 @@ import threading
import queue as Queue
from py._xmlgen import raw
from multiprocessing import Manager, Process
+from allure_pytest.plugin import pytest_configure as original_pytest_configure
__version__ = '0.0.9'
@@ -54,6 +55,7 @@ def run_test(session, item, nextitem):
def process_with_threads(queue, session, tests_per_worker):
+ original_pytest_configure(allur_conf)
threads = []
for _ in range(tests_per_worker):
thread = ThreadWorker(queue, session)
@@ -62,6 +64,9 @@ def process_with_threads(queue, session, tests_per_worker):
[t.join() for t in threads]
+allur_conf = None
+
+
class ThreadWorker(threading.Thread):
def __init__(self, queue, session):
threading.Thread.__init__(self)
@@ -69,6 +74,7 @@ class ThreadWorker(threading.Thread):
self.session = session
def run(self):
+ original_pytest_configure(allur_conf)
while True:
try:
index = self.queue.get_nowait()
@@ -87,6 +93,8 @@ class ThreadWorker(threading.Thread):
@pytest.mark.trylast
def pytest_configure(config):
+ global allur_conf
+ allur_conf = config
workers = parse_config(config, 'workers')
tests_per_worker = parse_config(config, 'tests_per_worker')
if not config.option.collectonly and (workers or tests_per_worker):
from pytest-parallel.
@SizovIgor did you get any further with getting tests-per-worker
to work?
from pytest-parallel.
The latest (0.1.0
) is quite a big change that should resolve most reporting issues. It may solve this issue as well.
from pytest-parallel.
is this issue resolved? i am still facing this issue with 0.1.0
from pytest-parallel.
Hi @kevlened
Thank you for your response.
I have same issue:
allure-pytest==2.8.6
pytest==6.0.1
pytest-parallel==0.1.0
Do you know when it can be resolve BTW, same with report portal.
Thanks!
from pytest-parallel.
I'm facing the same issue
Any solution/workaround for this problem?
from pytest-parallel.
Facing same issue.
@kevlened - If i were to try and change the current situation, do you have a recommendation for a starting point? where in the repo should i investigate?
from pytest-parallel.
Facing same issue.
from pytest-parallel.
Facing same issue.
from pytest-parallel.
Any solution for this issue?
from pytest-parallel.
Same issue still. Any progress on this?
from pytest-parallel.
Related Issues (20)
- Could you pls release master ASAP for support python3.9 HOT 6
- OSError: [WinError 87] 'pytest --tests-per-worker auto' in terminal (pycharm, windows) HOT 2
- Maintainers needed HOT 5
- Is it possible to have a separate log for each process? HOT 2
- Runs with dynamically predefined thread names are sticks
- If tests call code that `fork()`s, use of this plugin often leads to crashes on Mac OS High Sierra and onward, *even when number of workers is set to 1*
- Control auto worker count through environment variable
- The plugin does not fire any setup / tear down events for child threads make it extremely hard to implement extensions
- not compatible with django HOT 1
- Fatal Python error: _enter_buffered_busy: could not acquire lock for <_io.BufferedWriter name=5> at interpreter shutdown, possibly due to daemon threads
- Many tests fail
- Duplicated tests when running with allure-pytest
- Using pytest parallel to generate reports results in data corruption
- Latest pytest (7.2.0) breaks pytest-parallel. HOT 8
- Pytest-parallel is failing to run
- “generator raised StopIteration” on latest parallel version
- setUpClass method executed once per test with multiple workers
- Global state in parallel tests
- do not create thread if tests_per_worker==1
- Consider moving project to pytest-dev for maintenance HOT 17
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pytest-parallel.