What is Data driven:
Running the same piece code for multiple inputs.We need to verify that our system is taking all set of combinations which it expected to support.
To pass multiple data to the application at runtime, we need to parameterize our test scripts.
This concept which we achieve by parameterization is called Data Driven Testing .
1 . Create Test data in excel sheet.
* below test data is for Testing the webservice for Celsius to Farheit conversion
2. Once Test Step is created ( pls refer the previous sessions)
Right click on step -> Insert Step -> DataSource
3. Enter Source Name -> Click Ok button
4. Click on add property button shown below
5. Enter property name as Input shown below
6. Add similar property as Expresult
7. Select data source as Excel and provide the testdata input path shown below.
Data source drop down -> Select Excel (Or data source Used) -> Browse Source path(Saved location) -> Start at Cell’ = Enter B2 (Excel Cell name, where input data exists) -> Click on execute
8. On Click execute -> Enter number Of rows from source
9. Adding datasource loop
Right click on the test case -> Insert Step -> Data Source Loop
-> and select Target Step as shown below -> Click ok
upon clicking the OK button -> test case would look like below step
Open the CelesiusToFarenheit Test step - Place the cursor at input (?) (
12. Place cursor Input(?) in Request editor, Right Click -> Get Data ->TestSuite-> select TestCase (in which source is located).
No comments:
Post a Comment