Forum Discussion

koen_able's avatar
koen_able
Occasional Contributor
5 years ago
Solved

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?

 

  • 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

  • bktientu's avatar
    bktientu
    New Contributor

    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.

    • koen_able's avatar
      koen_able
      Occasional Contributor

      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