-
-
Notifications
You must be signed in to change notification settings - Fork 440
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Zero coverage of process spawned by dogtail #1786
Comments
@nedbat @marcgibbons Are you able to advise on this issue? |
This seems to indicate you have 100% coverage of |
That's a typo. I've just rerun the test and edited the OP with the correct stats. |
Problem solved. I was running the test with
As such the environment variable
Fixes the problem. |
Our team uses dogtail to GUI test our application but unfortunately we've never been able to get any coverage from these tests.
I've prepared a simple test demonstrating this scenario. (Create/download these files into the same directory.)
Other steps I took to run the above scripts on Ubuntu LTS 22.04:
COVERAGE_PROCESS_START
environment variable as followsexport COVERAGE_PROCESS_START="${PWD}"/.coveragerc
my_app.py
when automated by the dogtail script which is launched by pytest as follows:coverage run --rcfile=.coveragerc -m pytest test_my_app.py
. (The dogtail script automates UI actions.)coverage report
Outcome (no coverage on
my_app.py
:I don't know if I am doing something wrong, or this is a missing feature or a bug.
dogtail is based on subprocess so I've added
concurrency = multiprocessing
to the.coveragerc
file.Here are some packages/steps that may be needed in order to setup GTK, GTK Python and dogtail (extracted from our pipeline)
Caveat: Run on dogtail scripts on X-Windows. dogtail does not run well on Wayland.
(I posted a version of this question on stackflow just over a month ago but without a working example. Hopefully a reproducible example will help make the problem clearer.)
The text was updated successfully, but these errors were encountered: