Home » Support » Index of All Documentation » Wing IDE Reference Manual » Unit Testing »

Running Tests

Tests can be run and debugged from Wing in a variety of ways. The options are:

  • Run all tests in the testing tool. This is done with the Run All Tests item in the Testing menu or by selecting no tests (or all tests) in the list and pressing the Run Tests button.
  • Run only the tests in current file open in the source editor. This is done with the Run Tests in Current File item in the Testing menu.
  • Run a subset of test(s) by location of the cursor or selection in the source editor. This is done with the Run Tests at Cursor item in the Testing menu.
  • Run tests that failed the last time tests were run. This is done with the Run Failed Tests item in the Testing menu.
  • Run all tests that were run the last time tests were run. This is done with the Run Tests Again item in the Testing menu.

Test files and/or individual tests may also be selected in the Testing tool and run with the Run Tests button or using the items in the context menu (right click) on the Testing tool.

For each of these run options, there is an equivalent debug option that will run the tests in the debugger. These are in the Debug group of the Testing menu.

To stop running tests, use the Abort Running Tests item in the Testing menu or the Abort Tests item on the Testing tool.

To clear the previous test results from the Testing tool, use the Clear Results item in the right-click context menu.

Options

When multiple test files are run at once, they may either be each run in a seperate process (the default) or all of the test files in one directory may be run in a single process. This option is set via the Process Model in the Testing page of the Project Properties dialog.

Two or more test processes may be run in parallel by setting the Number of Processes to a value greater than one in the Testing page of the Project Properties dialog.

When running test files that are located in a package directory, they either may be loaded as package modules (equivalent to python -m unittest package.module) or as a top-level module (equivalent to python -m unittest module). This option is set via the Run as Package Module in the Testing page of the Project Properties dialog.

Running Tests