Closed ntkathole closed 1 year ago
@ntkathole, Unfortunately I have to decline it. We have to create launch on pytest_sessionstart
hook which happens before we get know how many tests we run. That's because pytest
supports multi-processing through xdist
plugin: we don't really know how many (if any) tests each child process is going to run, but we need a master launch for child processes.
Is your feature request related to a problem? Please describe. We have different automation repositories for each component having parallel and sequential tests. Some components have only parallel test, some have only sequential tests while some components have both parallel and sequential tests. Thus, we have CI steps as follow:
The problem here is that it create empty launches in report portal for some components having only parallel or only sequential tests.
Describe the solution you'd like Launch should not be created if there are no tests collected.
Describe alternatives you've considered Right now, we are collecting tests first to check if there are any tests to run.
But problem with this approach is this adds additional time in each component execution for test collection, which we want to improve.
Another alternative considered was to use script to delete empty launches, which will run every hour, and it adds additional maintenance.