Forum Discussion

bmgriner's avatar
bmgriner
Frequent Contributor
15 years ago

Running a whole suite multiple times with diff data

Is there a way to run a whole suite with one users credentials and then change those credentials and run it again? I don't want to have each test case have to log in, run the test, and then log out if I don't have to.

3 Replies

  • Hi!

    sure.. define properties for the username/password at the testsuite or project level and use those properties (via property-expansion) in your requests. Then change the values of the properties between each run, if you use project-level properties you can override them with the -Pname=value argument from the command-line..

    Hope this helps,

    regards,

    /Ole
    eviware.com
  • bmgriner's avatar
    bmgriner
    Frequent Contributor
    The question then is ... how do I run the test suite multiple times?

    I'm running these tests is an automated way.

    Let me try to describe the situation in more detail.

    I have a test suite with a login and logout test case and many other test cases in between. I want to call the login test case once, then run all the tests in between, then run the logout test case. After I am done with this, I want to change the credentials, either at the project or suite level and run the whole suite again.

    There are test steps that allow you to load from a csv, excel, or some other data source and then run test steps and then repeat the test steps using the data from a new row. This is basically what I want to do except at the suite level. I want to load some data, run the test suite, then load some new data and run the test suite again.

    I'm guessing what I would have to do is add a script that runs after the suite ends that changes the data and then goes back to the first step and after so many iterations the script says it is done and no longer goes back to the beginning, but proceeds on. Am I on the right track?

    Thanks for the quick response by the way.
  • Hi,

    this depends a bit on the kind of reports or output you want from your executions, and how you are automating the executions.. can you give some details on that?

    regards,

    /Ole
    eviware.com