Coverage Configuration

Index of All Documentation » Wing Pro Reference Manual » Unit Testing » Code Coverage »

There are several options that control code coverage behavior on the Testing tab of Project Properties, accessed from the Project menu:

  • Use Code Coverage enables or disables the collection of code coverage data and display of code coverage markup in Wing's editor. This is also available as a menu item in the Testing menu.
  • Measure Coverage Only in Project Files restricts the measurement of code coverage statistics to only files that are in directories that have been added to the Project tool.
  • Extra Coverage Args allows passing additional arguments to the coverage run command that Wing invokes when running unit tests with code coverage enabled.
  • Clear Data on Project Close selects whether Wing will clear all code coverage data when the project is closed. The options are to never clear, always clear, or prompt whether to clear. By default, code coverage statistics and support data are retained even when Wing exits. This allows Wing to track data and determine which tests were invalidated even for changes made while Wing is not running, such as update of many files as a result of pulling revisions from a repository. Note, however, that the data stored by Wing may become quite large. See Coverage Data Files for details.
  • Combine Data from Multiple Python Environments causes Wing to merge all the code coverage data collected from unit tests, even if some of those tests are using different Python environments. See Multiple Python Environments in Code Coverage Environments for details.