TestProject Forum
Powered by leading experts in the test automation community

As a user I'd like the ability to change which tests to run within data source csvs


I know data source csvs allow you to change values for application urls and parameters, but I am wondering if these csvs could also let you change ‘tests’ to run?

Some context
We have 2 methods of login for our website.

  1. We have a standard email/password form
  2. Then we have a 3rd party oauth method of sign-in (think similar to logging in through google)

I’ve got test scripts to check features after logging in, and the 1st step of these scripts is to run one of the login tests. If it was just checking different accounts but logging in the same way I’d be okay just updating parameters in csvs for jobs, but given there are different steps per login method I don’t think I can get away with that.

So for the moment I’ve duplicating tests to cover post-login testing but this could be a pain to update in future. Basically I think it’d be useful if there was a way to change which tests I’m running through data source csvs. Maybe tests themselves can be ‘parameters’?

Hi @Henry,

Thank you for your feedback!
I’ve gone ahead and passed this conversation along for our product team to consider, perhaps we’ll introduce this functionality in the future.

That said, I’d really like to know more about your use case here. You have two different methods for logging in to your application, but the rest of the steps in those tests are identical? If that’s the case, did you try to use the recovery test option?

Kind regards,

Hi Amit,

The login methods are different, but the steps after are the same.

I had not considered using the recovery test option; I’m guessing this is how I might utilize it?

  1. Add test to a job
  2. Attach a data source that changes the login to something that will fail
  3. Set a recovery test here so that it instead goes through a different login method (that works)
  4. Assuming the recovery test goes without a hitch, continue the current test as normal

Hi @Henry,

The recovery test is used from within the recorder. You can use of the login tests as a step in your bigger test. If the step will pass (means that this login method was correct), then you continue with the rest of the steps as usual. If the step will fail (means that you need to use the other login method), then define in this step to use a recovery test in case of failure. Choose the other login test as your recovery test. The recovery test will login to the application successfully and then, the test will continue with the rest of your steps.

You can watch this example GIF I made:

Hi Amit,

That makes sense and it lines up with my thoughts for making this work with my scenario.

I’ll give it a go and if I get stuck I’ll ask for help outside of this thread.

Cheers for the help

Sounds like a good plan :slight_smile:
I’m here to help if you will need it