I have some test date in files setup for my test cases. I have these as embedded resource setup which are copied when newer in visual studio. however, when I run my tests through bitbucket pipeline I get the following error:
Could not find a part of the path '/opt/atlassian/pipelines/agent/build/Athene/Micro Services/Excel Services/ExcelServiceTests/bin/Release/net8.0/Test Data/test.xlsx'.
How can i fix this?
Hello @sschroders ,
thank you for reaching out to the community.
When running tests in a CI/CD pipeline like Bitbucket Pipelines, you need to ensure that any required files are available at the expected path during the test execution.
My understanding is that you have some static test files that are used during the tests executed on your pipeline. In this case, you need to make sure that your test data files are included in your repository.
Files needed for testing should be committed to the repository so they can be checked out during pipeline execution.
Thank you, @sschroders !
Patrik S
@Patrik S Thanks for reaching out, the files are committed to the repository and to be sure i downloaded the build in an artifact and checked that the files are where there where expected. what I am not sure though is if this part of the path is correct: "/opt/atlassian/pipelines/agent/build'
any help would be greatly appreciated as we still don't have a resolution
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey @sschroders ,
The path "/opt/atlassian/pipelines/agent/build" is the default build path of pipelines, and where pipeline will clone your repository during the build setup.
In order to confirm if the files are indeed there, could you add the following ls command in your pipeline step and check if the files are there ?
ls -LaR
This should print the directory structure and all the files inside it recursively.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Patrik S Thanks for the help this helped me find what was wrong :) the folder name, in the repo was with small letter Test data and in the test with capital Test Data
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Awesome! Glad to have been of some help @sschroders !
If you ever need help in the future, feel free to reach out :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.