Diff for "Testing"

Not logged in - Log In / Register

Differences between revisions 4 and 5
Revision 4 as of 2010-01-18 12:59:54
Size: 689
Editor: adiroiban
Comment:
Revision 5 as of 2010-01-18 16:30:43
Size: 1549
Editor: adiroiban
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
= Writing tests =

For each part of an application there are 2 level of testing:
* unit testing - comprehensive testing, including cornerstone cases
* smoke testing - critical functionality

1. Model
 1. Unit testing
  * Files locate in lib/lp/<application>/scripts/tests
 1. Smoke testing
  * Files locate in lib/lp/<application>/doc
1. View
 1. Unit testing
  * Files locate in lib/lp/<application>/browser/tests
 1. Smoke testing
  * Files locate in lib/lp/<application>/stories
  * More details: PageTests
1. Javascript
 1. Unit testing
  * More details: TestingJavaScript
 1. Smoke testing
  * Files locate in lip/lp/<application>/windmill (if written in Python) and lib/canonical/launchpad/windmill/jstests
(if written in JS)
  * More details: [[Windmill]]
1. Scripts
  * Files locate in lib/lp/<application>/scripts/tests

Writing tests

For each part of an application there are 2 level of testing: * unit testing - comprehensive testing, including cornerstone cases * smoke testing - critical functionality

1. Model

  1. Unit testing
    • Files locate in lib/lp/<application>/scripts/tests

  2. Smoke testing
    • Files locate in lib/lp/<application>/doc

1. View

  1. Unit testing
    • Files locate in lib/lp/<application>/browser/tests

  2. Smoke testing
    • Files locate in lib/lp/<application>/stories

    • More details: PageTests

1. Javascript

  1. Unit testing
  2. Smoke testing
    • Files locate in lip/lp/<application>/windmill (if written in Python) and lib/canonical/launchpad/windmill/jstests

(if written in JS)

1. Scripts

  • Files locate in lib/lp/<application>/scripts/tests

Testing Your Launchpad Changes

This page is very much still in progress.

The normal pattern for testing your changes is to run the tests you think will be affected locally, and then (possibly just before submission) run all the tests in the cloud before landing your changes on trunk.

To run the tests, you run the ./bin/test script, which is produced by make build.

You can see all the options you have by running ./bin/test --help, but usually you will run ./bin/test -vvct $pattern where $pattern is a regular expression that is used to filter the tests that will be run.


CategoryTesting

Testing (last edited 2020-07-16 16:51:31 by doismellburning)