Actually, I’ve developed a python project using behave framework to automate a solution and pushed it to a repo so that it can be executed using pipeline in agent machine, the paths are getting different for local and pipeline so I want to handle it more generically.
So in order to make the paths generic, in a file config.py I have mentioned the path like this
cwd = os.getcwd()
runsetting_filepath = cwd + r"resourcesUserConfig.runsettings"
Actual path
C:ProgramDataTFS_GITpython_AutomationsuiteDETransitAutoresources
So when the pipeline is executed the gets downloaded in the agent machine and place in
C:Agentr110apython_AutomationsuiteDETransitAutoresources
the issue is here whenthe code is executed in the local getcwd() returns until DETransitAuto, but when executed in pipeline it returns only until a this causes file not found error in the program, So i need to solution to make these path generic as such it can be handled everywhere