0

My team is new to automation and plan to automate the cross browsers testing. Thing that we not sure, how to make sure the test data is unique for each browser’s testing? The test data need to be unique due to some business rules.

I have few options in mind:

  1. Run the tests in sequential order. Restore database after each test completed. The testing report for each test will be kept individually. If any error occurs, we have to reproduce the error ourselves (data has been reset).

  2. Run the tests concurrently/sequentially. Add a prefix to each test data to uniquely identify the test data for different browser testing. E.g, FF_User1, IE_User1

  3. Run the tests concurrently/sequentially. Several test nodes will be setup and connect to different database. Each test node will run the test using different browser and the test data will be stored in different database.

Anyone can enlighten me which one is the best approach to use? or any other suggestion?

tshepang
  • 12,111
  • 21
  • 91
  • 136
qa_enq
  • 61
  • 1
  • 1
  • 3

1 Answers1

0

Do you need to run every test in all browsers? Otherwise, mix and match - pick which tests you want to run in which browser. You can organize your test data like in option 2 above.

Depending on which automation tool you're using, the data used during execution can be organized as iterations:

Browser  |  Username  |  VerifyText(example)    #headers
FF       |  FF_User1  |  User FF_User1 successfully logged in
IE       |  IE_User1  |  User IE_User1 successfully logged in

If you want to randomly pick any data that works for a test and only want to ensure that the browsers use their own data set, then separate the tables/data sources by browser type. The automation tool should have an if clause you can use to then select which data set gets picked for that test.

aneroid
  • 12,983
  • 3
  • 36
  • 66
  • Thanks for the reply :) Yes. My ideal testing is to run every test in all supported browsers. We will be using Java + Selenium WebDriver. If second option is the choice, we will most probably maintain one set of test data only but the prefix 'FF' and 'IE' will be appended to the test data when executing the 'if' clause. But not so sure whether the 1st option is the better choice? As I found people tend to reset the database before every 'test' run. But the 'test' might be different functional test instead of different browsers testing. – qa_enq Aug 07 '12 at 08:22
  • When you say that the "test data need to be unique", is that only for login or also for other data that is accessible. If your tests are in java, you could have the logins as an array login = ['FF_User1', 'IE_User1'] and browser = ['FF', 'IE'] so combo of login[0] is for browser[0] and login[1] is for browser[1]. Additionally, keep the test data in a csv or tab-delimited file with the name as xyz_FF.txt and xyz_IE.txt to easily separate out the unique data. You could also just assume that row1=FF, row2=IE OR better...have the data have the "browser|login|password|test data...". – aneroid Aug 07 '12 at 10:34
  • I assume that the test data only needs to be reset after completing the test for both browsers - since it's unique anyway, the above solution is convenient. Otherwise, pass a parameter to the runner like `--browser FF` or `--browser IE` so you can: step1: reset data, step2: run for FF, step3: reset data, step4: run for IE. – aneroid Aug 07 '12 at 10:38