-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Use pytest hooks for test execution instead of "scraping" the JUnit XML results. #12973
Comments
Here you go #1132 |
@DonJayamanne This one is for execution, not discovery. We already do that for discovery. |
@karrtikr I believe we don't scrape out the output from execution, do we? |
We do scrape out the output from execution, which is something we probably shouldn't. |
Are you talking about what goes on in perhaps particularly relevant: vscode-python/src/client/testing/common/runner.ts Lines 75 to 103 in c37c79d
Regardless, it sounds like you have specific code in mind. Where is it? |
I had initially encountered a very particular place where I found the code was scraping the
And secondly, yes, I saw what goes in vscode-python/src/client/testing/common/xUnitParser.ts Lines 82 to 100 in 61b179b
We don't scrape terminal output so it's not as bad, but JUnit XML format can change as well, happened once to us here: #6990 and broke running tests for everybody. |
Is any one working on this? This also help to show test result when it ends and not wait for all tests to finish, right? |
If the pytest hooks provide that feature, then yes, but I'm not aware if they do. |
One can use the pytest_runtest_logreport hook to capture result of each stage ("setup", "teardown" ,"call") it includes a TestReport object that holds the outcome of the test and other data such as captured logs and test duration |
@eleanorjboyd Are we still scraping test outputs for execution? |
Yes still scraping output, this will be fixed in the rewrite. I will reference this in the meta issue I am tracking here. |
closing since this is fixed by the testing rewrite, thanks |
Couldn't find an open issue, if we have one feel free to close this one against it
Note we already use hooks for test discovery, this issue for test execution. The output on executing tests is not stable, so the assumptions we make when scraping output can break things. (For eg. #12403, pytest-dev/pytest#7463, #7265)
API details: pytest-dev/pytest#7463 (comment)
Similar issue for unittest framework: #10119
The text was updated successfully, but these errors were encountered: