Forum Discussion

thanvikunal's avatar
thanvikunal
Senior Member
4 years ago
Solved

How to set Data Source path to use on local as well as CI/CD in Azure DevOps

Hi Team,

 

I have a question related to setting data source path so that I can use the same input excel file in local as well as Azure DevOps pipeline.

 

I am moving my project and data source (Excel document) from local to Git repository manually. The aim is to run the project in Azure DevOps pipeline.

 

Consider my data source path mentioned in the project file is "C:/TestDocuments/Inputfile.xlsx". The moment I put my project in Git repo and try to access it through pipeline, I can provide path for project however I can't provide the path for input source file from Git repo. It means my project still tries to get source file path from my local machine. I tried reading the others posts but they do not provide information on how to update the source file path for CI CD.

 

This blocks me while executing data driven testing in Azure DevOps pipeline. Please share any solution you have.

  • Hi thanvikunal 

    Can you please use relative paths.

    Instead of using  "C:/TestDocuments/Inputfile.xlsx" use ${projectDir}/Inputfile.xlsx. Always keep the excel file along with project file(.xml) wherever you store, either in version control or local. Can also keep in a folder(ex: TestData) like ${projectDir}/TestData/Inputfile.xlsx. And Change like below at project level properties.

     

     

    https://support.smartbear.com/readyapi/docs/testing/best-practices/root.html

     

    Thanks!

2 Replies

  • PrathapR's avatar
    PrathapR
    Frequent Contributor

    Hi thanvikunal 

    Can you please use relative paths.

    Instead of using  "C:/TestDocuments/Inputfile.xlsx" use ${projectDir}/Inputfile.xlsx. Always keep the excel file along with project file(.xml) wherever you store, either in version control or local. Can also keep in a folder(ex: TestData) like ${projectDir}/TestData/Inputfile.xlsx. And Change like below at project level properties.

     

     

    https://support.smartbear.com/readyapi/docs/testing/best-practices/root.html

     

    Thanks!