pytest-dev / pytest-dev/pytest
pytest 3.0 breaks Jenkins' "Publish JUnit test result report" for doctests
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 14.5k
- Forks
- 3.4k
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 35
Description
Upgrading from pytest 2.9.2 to 3.0.x breaks the build step "Publish JUnit test result report" in Jenkins if a doctest is involved in the tests.
Jenins Error message:
ERROR: Build step failed with exception
.../PYTHON/Python2.7/README.txt is not a directory.
at org.apache.tools.ant.types.AbstractFileSet.getDirectoryScanner(AbstractFileSet.java:488)
at hudson.util.DirScanner$Glob.scan(DirScanner.java:128)
at hudson.FilePath$42.invoke(FilePath.java:2162)
at hudson.FilePath$42.invoke(FilePath.java:2155)
at hudson.FilePath.act(FilePath.java:1018)
at hudson.FilePath.act(FilePath.java:996)
at hudson.FilePath.copyRecursiveTo(FilePath.java:2155)
at hudson.FilePath.copyRecursiveTo(FilePath.java:2141)
at hudson.FilePath.copyRecursiveTo(FilePath.java:2124)
at hudson.FilePath.copyRecursiveTo(FilePath.java:2109)
at hudson.plugins.junitattachments.GetTestDataMethodObject.attachFilesForReport(GetTestDataMethodObject.java:121)
at hudson.plugins.junitattachments.GetTestDataMethodObject.getAttachments(GetTestDataMethodObject.java:110)
at hudson.plugins.junitattachments.AttachmentPublisher.contributeTestData(AttachmentPublisher.java:54)
at hudson.plugins.junitattachments.AttachmentPublisher.contributeTestData(AttachmentPublisher.java:30)
at hudson.tasks.junit.JUnitResultArchiver.perform(JUnitResultArchiver.java:183)
at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:78)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779)
at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:720)
at hudson.model.Build$BuildExecution.post2(Build.java:185)
at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:665)
at hudson.model.Run.execute(Run.java:1745)
at hudson.matrix.MatrixRun.run(MatrixRun.java:146)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:410)
Build step 'Veröffentliche JUnit-Testergebnisse.' marked build as failure
Jenkins version: 2.11
JUnit Plugin version: 1.18
py: 1.4.31
pluggy: 0.3.1
plugins: flake8-0.6, cov-2.3.1, remove-stale-bytecode-2.1
Python versions: 2.7 up to 3.5 and PyPy
Contents of pytest.ini:
[pytest]
addopts = src README.txt --flake8
The generated junit.xml file differs in the following way:
pytest 2.9.2:
<testcase classname="" file="README.txt" name="README.txt" time="0.027095079422"></testcase>
pytest 3.0.x:
<testcase classname="README.txt" file="README.txt" name="README.txt" time="0.00580596923828"></testcase>
Aka the classname is no longer empty.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the pytest.ini configuration and the generated junit.xml for a doctest, reproducing the output difference between pytest 2.9.2 and 3.0.x. Investigate the JUnit reporting path and verify that the resulting XML works with Jenkins' Publish JUnit test result report while preserving the doctest result.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100