Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

OSEE/Test

< OSEE
Revision as of 16:23, 12 February 2013 by Misinco.gmail.com (Talk | contribs) (New page: Tests accompany all new code created. Tests can either be integration tests (end-to-end) functional testing or pure unit tests. For unit tests, JUnit and mockito (http://code.google.com/...)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Tests accompany all new code created. Tests can either be integration tests (end-to-end) functional testing or pure unit tests. For unit tests, JUnit and mockito (http://code.google.com/p/mockito/) are used to quickly create test mock data types. Mockito mock types can be setup to return predetermined values which can be used in assert statements to test functionality. Tests are put into a fragment bundle where the host bundle contains the code being tested. The fragment will have the same name as the host bundle with “.test” appended to it. The package structure will mirror that of the host bundle (i.e. it will not contain “.test” in any package). The test class will have the same name as the unit under test with “Test” appended. Each test method in the test class will be named testMethodName() where methodName() is the method being tested in the unit under test. Each package will contain a package test suite file that lists which classes are run as a part of that test. Within Eclipse, the Emma code coverage tool can be used for unit tests. Unit tests should cover at least 80% of the new code.

Back to the top