cancel
Showing results for 
Search instead for 
Did you mean: 

Error occurs when running DataSource

SOLVED
Occasional Contributor

Error occurs when running DataSource

When I try to run a DataSource I receive the following error: An error occured: C:\..\ep-test-automation\resources\test_data\banksparen-chain\qanda.banksparen-chain.xlsx (The system cannot find the path specified).

 

In the project settings I have the following settings:

File - C:\software-vm-3\ep-test-automation

Resource root - ${projectDir}/ep_test_automation/resources

When I run this in a Groovy script:

def projectPath = testRunner.testCase.testSuite.project.getPath()
log.info projectPath

the project path is this: C:\software-vm3\ep-test-automation.

The actual file is located here: C:\software-vm3\ep-test-automation\resources\test_data\banksparen-chain\qanda.banksparen-chain.xlsx

 

Does anybody have a suggestion?

 

1 ACCEPTED SOLUTION

Accepted Solutions
New Contributor

Re: Error occurs when running DataSource

Hi @koen_able,

 

In my opinion, perhaps you are using relative path and the path is incorrect.

 

There are 2 options:

1. Hard "your path file" by clicking browse in data source step and relocate your data file.

Full path like this: "C:\software-vm3\ep-test-automation\resources\test_data\banksparen-chain\qanda.banksparen-chain.xlsx"

 

2. Relative path like this: "${projectDir}\ep-test-automation\resources\test_data\banksparen-chain\qanda.banksparen-chain.xlsx"

 

Hope this help.

2 REPLIES 2
New Contributor

Re: Error occurs when running DataSource

Hi @koen_able,

 

In my opinion, perhaps you are using relative path and the path is incorrect.

 

There are 2 options:

1. Hard "your path file" by clicking browse in data source step and relocate your data file.

Full path like this: "C:\software-vm3\ep-test-automation\resources\test_data\banksparen-chain\qanda.banksparen-chain.xlsx"

 

2. Relative path like this: "${projectDir}\ep-test-automation\resources\test_data\banksparen-chain\qanda.banksparen-chain.xlsx"

 

Hope this help.

Occasional Contributor

Re: Error occurs when running DataSource

Hi bktientu,

 

Thanks. I had tried the first option of course, but it still said it couldnt find the file.

The second option worked. Unfortunately, I dont know what the problem was with the other options, but it works now

New Here?
Join us and watch the welcome video:
Watch the New Interview
APITestingMistake#2
Top Kudoed Authors