Forum Discussion

KB1's avatar
KB1
Champion Level 2
2 years ago

Is it possible to run the same test multiple times with different variables

Hello all,

I am making a test for an account registration.

I got 3 variables with usernames, and I don't want to create multiple scripts for the same test.

is it possible to run the same script and just change the paramers?

because of how it now it, for me it is not possible to select a parameter.

 

If it is not possible how would you guys solve this?

 

 

2 Replies

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    See Data-Driven Testing. You could also have one function which creates the account, call this three times, by passing in the username as a parameter.

  • KB1's avatar
    KB1
    Champion Level 2

    I've putted the account information in an array. and the function in a for loop. and made it iterate 3 times