Forum Discussion

joe_2's avatar
joe_2
Contributor
11 years ago

How do you handle data driven tests with TestExecute

My project runs great when I'm using my primary workstation, but it crashes the first time it gets to a data driven loop when I try to run it with TestExecute on a networked machine.



It can't find the data storages.



I thought making persistent table variables instead of external storages might work... but TC can't seem to do that.  The table variable type is not available when creating a persistent variable. (at least in version 9.  I haven't updated to 10 yet)



So how do you all handle this?  What am I missing here?



  • Joesph,





    You can store the database files in the project stores 'files' (http://support.smartbear.com/viewarticle/55088/). Then the path is relative to the project, ie. you can use the same path regardless of the machine the test is running on. See the attached screenshot for how our project stores look.



    I am using spreadhseets to store my test data in this manner and it works great. My tests are scripted so I am not sure how to configure it for a keyword test but you can probably do this in an keyword test if you look in the documentation.
  • If you work from the networked machine, can you navigate to the data stores yourself?  Maybe some permissions are not set correctly.
  • chrisb's avatar
    chrisb
    Regular Contributor
    Take a look at the path to the file you are using as the datastore. Does the same file exist in the same location (path) on your machine running Test Execute?



    Also, are you getting an error in the logs when the test run fails? Can you post the error?
  • The error is just the standard critical error message you get when TC can't find a data storage.

    The path is the problem.  It is looking on the local hard drive for the data storages, but they exist on my workstation, not on the system under test.  



    It's looking like making the data storages into project variables of the type Table will be the route I'll be taking.



    Even though you can't make persistent tables, you can make temporary ones that will auto-fill with a default set of data when used... and that's essentially the same thing for my purposes.  



    It'll solve the problem, but it will also require a few days of going through tests to rework them to use a table variable instead of a data storage excel file.  Oh, well... job security I guess.



  • chrisb's avatar
    chrisb
    Regular Contributor
    Joesph,





    You can store the database files in the project stores 'files' (http://support.smartbear.com/viewarticle/55088/). Then the path is relative to the project, ie. you can use the same path regardless of the machine the test is running on. See the attached screenshot for how our project stores look.



    I am using spreadhseets to store my test data in this manner and it works great. My tests are scripted so I am not sure how to configure it for a keyword test but you can probably do this in an keyword test if you look in the documentation.