Open interesaaat opened 1 year ago
I encountered the same problem. The output file generates correctly, but PyTest-AzurePipelines cannot recognise it.
Docker container command: pip install pytest pytest-azurepipelines && pytest xyz/ --junitxml=test-output.xml
+1
my current dirty workaround, in the job:
container:
image: devops-image:latest
endpoint: "sc-docker"
options: "-v /agent/_work/1/:/agent/_work/1/"
in the test step:
- bash: |
# https://github.com/Azure/pytest-azurepipelines/issues/84
ln -s "/__w/1/s/" "/agent/_work/1/s/" || true
python3 -m pytest -vv --cov --cov-config=.coveragerc --cov-report=xml --cov-report html tests
name: run_tests
We recently moved our pipeline from running on a VM to running on a docker container. After the move we started to have the below error.
Needless to say, the files are there but it looks they are generate afterwards? We were able to solve this by adding the flag
--no-docker-discovery
but now no coverage is uploaded (for some reason) and this is the output we are getting.Any idea on what is going on and how we can fix it?