Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Python project getting failed when we run pipeline

venkatanareshimi February 22, 2022

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/*

1 answer

0 votes
Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 23, 2022

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

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events