Forum Discussion

Vec84's avatar
Vec84
Contributor
9 years ago

Datadriven test with different outcomes

I have a test to run with multiple combobox selections on the form and everytime the form is completed it triggers a warning box with different text in each time. The text shown in the warning box is dependent on the options selected in the comboboxes on the form.

 

I have data driven the selections on the form to cover every possible scenario(Few Hundred) however i am now stuck with adding the expected results in the warning box. I need the expected result to change each run of the test. I thought of parameterising the test however this would mean having a few hundred parameters for each run.

 

Is it possible to point the parameters to a location in a database like it does in a datadriven test, so that it would check the location (In the Database) matches the warning box text. Once it has checked the first one then it would move on to the next result in the database.

 

Or could someone suggest a better solution to this test?

 

My coding experience is basic so if it could be done without that need then great if not could someone give an example.

 

Many Thanks

 

 

 

2 Replies

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    I'm assuming that the data that you're feeding in for your loop consists of all the conditions, each one a separate field in the data record, correct?  So, you have hundreds of scenarios, hence hundreds of data records in your loop.

    All you need to do is add your warning text as another field in your data record and then, in your loop, include your check on the warning message, passing that field from your data record into your checkpoint.

    I mean, that seems to be the easiest solution but perhaps I'm not understanding how your data driven test is constructed.

  • Vec84's avatar
    Vec84
    Contributor
    Many thanks for the reply..

    Yes I later found when recording that the property checkpoint could be data driven also. Thanks again