Using PureCoverage power featuresPureCoverage collects a detailed set of coverage data for your program and every component it uses. With this data, you can have confidence that the program you're testing has been exercised -- every line, every function, procedure, or method -- before you release it to your customers. That's what makes PureCoverage an essential tool for your development and testing cycles. Right from the start, PureCoverage gives you the information -- accurate, complete, and immediately usable code-coverage information -- that you need to evaluate your tests and pinpoint the parts of your code that are not tested. PureCoverage also provides powerful features that help you make maximum use of the coverage data -- and of your time. For example, you can:
Integrating PureCoverage with your development desktop PureCoverage’s integration—for example with Microsoft Visual Studio, Microsoft Visual Basic, Rational Visual Test®, Rational Robot, and Rational ClearQuest™—puts powerful coverage data within easy reach while you develop and test your code using your favorite tools. During installation, a PureCoverage menu and toolbar are automatically
added to Visual Studio and Visual Basic so you can monitor your code
at any time during development, without leaving your development environment.
More information? Look up integrating in the PureCoverage online Help index. Using the PureCoverage PowerCov™ options, you can fine-tune the level
of code coverage reported for any module in your program at any stage of
development and testing. You can set default settings that apply to all
programs. You can also assign settings that apply only to the current program.
To concentrate on specific modules in your code, use PowerCov options to select Line as the coverage level for only those modules. You can improve instrumentation and runtime performance by selecting Function as the coverage level for the other modules. Or you can exclude modules from coverage. More information? Look up settings, overview and coverage levels, overview in the PureCoverage online Help index. Zeroing in on key program areas With PureCoverage, you can capture coverage data for your entire program or for any section of it. You can capture coverage information for specific sections using:
Using PureCoverage, you can take snapshots of coverage data for individual
routines as you exercise your program.
More information? Look up snapshots and run summary window in the PureCoverage online Help index. Using PureCoverage API functions PureCoverage includes a set of Application Programming Interface (API) functions that give you additional control over the collection of coverage data. You can use them to start and stop data collection or to save data at any time during a run, collecting only the coverage data you need to focus on a specific area of your program. You can call PureCoverage API functions from your program, from the QuickWatch dialog in Visual Studio, or from whatever debugger you're using. More information? Look up api functions, using in the PureCoverage online Help index. Integrating PureCoverage in your test environment Integrating PureCoverage with your test environment gives you a powerful tool for continuous coverage monitoring. For example, you can easily run PureCoverage from an existing test script by adding the command:
PureCoverage can also merge coverage data from multiple runs. Say you're running a series of automated tests on a program, each time using a different set of data. You can modify the script to merge the coverage data into a single file. Add the following line to the beginning of your test script:
Then, each time you run your program, substitute the following for the run command:
Java and Visual Basic programmers: For Java code and Visual Basic p-code programs (Visual Basic 6.0 only), PureCoverage uses Cstart.exe, a helper program installed with PureCoverage in its product directory, to directly monitor methods and procedures. You can add the following lines to have a test script monitor a Java applet or p-code program, respectively, and save the data to a .txt file: coverage /SaveTextData cstart jview /p /a example1.htmlMore information? For more details, and additional command-line options, look up command line and scripts in the PureCoverage online Help index. If you have Rational Visual Test or Rational Robot installed, you can run a test script for a program and monitor the program at the same time, without leaving Visual Test or Robot. More information? Look up visual test and robot in the PureCoverage online Help index.
Now you're ready to put PureCoverage to work. Remember that the online
Help contains detailed information to assist you.
|
Copyright © 1999, 2001 by Rational Software Corporation. All rights reserved. |