Wiki Spaces


Get Help from Others

Q&A: Ask OpenMRS
Discussion: OpenMRS Talk
Real-Time: IRC Chat | Slack


Page tree

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


  1. Each test class should extend ReferenceApplicationTestBaseReferenceApplicationTestBase  For only and only those classes that donot have parent super classes
  2. Tests should be added under
  3. Each test class should be named starting with a verb, which best describes an action that is being tested, e.g. SearchActiveVisitsTest. By convention all test class names must end with Test.
  4. In general each class should contain one test method (annotated with @Test) and the test method should start with a verb and can provide a more detailed description of what is being tested than the class, e.g. searchActiveVisitsByPatientNameOrIdOrLastSeenTest.
  5. The test method should not visit more than 10 pages and should have 3-15 steps.
  6. You must not access Driver in a test. It is only allowed to perform actions calling methods in classes extending Page.
  7. Each test class should start from homePage and extend ReferenceApplicationTestBase.
  8. It is not allowed to instantiate classes extending Page in test classes. They must be returned from Page's actions e.g. ActiveVisitsPage activeVisitsPage = homePage.goToActiveVisitsSearch();
  9. Each page should have a corresponding class, which extends Page and it should be added under
  10. The page class should be named after page's title and end with Page.
  11. It is not allowed to call Driver's methods in a page. You should be calling methods provided by the Page superclass.