Search here for all the info you want in this Blog

Filtering your reports in QTP



You can use the Report.Filter method to determine which steps or types of steps are included in the Test Results. 
You can completely disable or enable reporting of steps following the statement, or you can indicate that you only want subsequent failed or failed and warning steps to be included in the report. 
You can also use the Report.Filter method to retrieve the current report mode.


The following report modes are available:




Mode

Description

0 or rfEnableAll

All events are displayed in the Test Results.
Default.

1 or rfEnableErrorsAndWarnings

Only events with a warning or fail status are displayed in the Test Results.

2 or rfEnableErrorsOnly

Only events with a fail status are displayed in the Test Results.

3 or rfDisableAll

No events are displayed in the Test Results.



  • To disable reporting of subsequent steps, enter the following statement in your QTP script:
  • Reporter.Filter = rfDisableAll
  • To re-enable reporting of subsequent steps, use the below code:
  • Reporter.Filter = rfEnableAll
  • To instruct QuickTest to include only subsequent failed steps in the Test Results, use the below code:
  • Reporter.Filter = rfEnableErrorsOnly
  • To instruct QuickTest to include only subsequent failed or warning steps in the Test Results, use the below code:
  • Reporter.Filter = rfEnableErrorsAndWarnings
  • To retrieve the current report mode, use the below code:
  • MyVar=Reporter.Filter 

No comments:

Post a Comment