cancel
Showing results for 
Search instead for 
Did you mean: 

Error occurs when running DataSource

SOLVED
Highlighted
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
Highlighted
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.

View solution in original post

2 REPLIES 2
Highlighted
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.

View solution in original post

Highlighted
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:
Announcements
TechCorner Leaderboard
Want a fun and easy way to learn ReadyAPI and show off your skills? Try solving weekly TechCorner challenges and get into the Leaderboard!


Challenge Status

Compare an expected JSON value and actual response in Events

Participate!

Fetch value/data from JSON response using Groovy Script

See replies!

Filtering data retrieved from a DataSource

See replies!

Get data from Petstore and add it to Excel sheets

Participate!
Top Kudoed Authors