I placed the python project in bitbucket repository and prepared the pipeline for python project with default options.But when i run the pipeline getting below error.Please help me out how to solve this error.
pytest -v tests/* --junitxml=test-reports/report.xml
============================= test session starts =======
platform linux -- Python 3.8.12, pytest-7.0.1, pluggy-1.0.0 -- /usr/local/bin/python
cachedir: .pytest_cache
rootdir: /opt/atlassian/pipelines/agent/build
collecting ... collected 0 items
- generated xml file: /opt/atlassian/pipelines/agent/build/test-reports/report.xml -
============================ no tests ran in 0.00s =============================
ERROR: file or directory not found: tests/*
Hello @venkatanareshimi ,
Thank you for reaching out to Atlassian Community.
The error you have reported indicates that the tests folder does not exist in the repository. When you execute pytest command, it expects to find files with tests in that directory.
In case you have your test files in a different directory in your repository, you will have to replace tests/* in the command in your yml file with the path of the directory where the tests exist, like below :
pytest -v <path to the the folder containing the tests> --junitxml=test-reports/report.xml
Hope that helps. Let us know if you have further questions.
Thanks @venkatanareshimi .
King regards,
Patrik S
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.