Monday, July 11, 2011

Data Driven Testing in QTP:

Data Driven Testing
                        Data driven testing is a concept introduced in the automation in order to implement re- testing.

Steps to be followed to perform data driven testing:
  • Collect the test data in to the data table
  • Generate the basic test
  • Parameterize the test
  • Execute the Test
  • Analyze the result

Parameterization:
                        Parameterization is a process of replacing the constant values with parameters or variables in order to increase the scope of the test. Parameterize can be done in three ways

  • Through data driver wizard
  • Through key word view
  • Manually

Navigation through Data Driver Wizard:

  • Activate the menu item tools
  • Select the option data driver
  • Click on parameterize
  • Click on next
  • Click on the parameter option button
  • Select the desired column name
  • Click on ok
  • Click on next
  • Click on finish
  • Finally click on ok

   Navigation Through Key word view:

  • Go to key word view
  • Select the desited constant value
  • Click on configure the value button
  • Select the option parameter
  • Select the desired column name
  • Click on ok





To avoid the above navigation one can directly type manually as follows:



A= datatable(“v1”,1)
Vbwindow(“form1”).vbedit(“val1”).set A
Vbwindow (“form1”).vbedit(“val2”).set datatable(“v2,1)
Vbwindow(“form1”).vbbutton(“Add”).Click
Vbwindow(“form1”).vbedit(“res”).check checkpoint(“RES”)
           
Navigation for parameterizing the check point:

  • Right click on the check point statement
  • Select the option check point properties
  • Select the option parameter
  • Click on the parameter options button
  • Select the desired column name
  • Click on ok
  • Once again click on ok
We can also parameter the test objects from object repository/object repository manager.

No comments:

Post a Comment