- Each test class should extend ReferenceApplicationTestBaseReferenceApplicationTestBase For only and only those classes that donot have parent super classes
- Tests should be added under https://github.com/openmrs/openmrs-distro-referenceapplication/tree/master/ui-tests/src/test/java/org/openmrs/reference
- 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.
- 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.
- The test method should not visit more than 10 pages and should have 3-15 steps.
- You must not access Driver in a test. It is only allowed to perform actions calling methods in classes extending Page.
- Each test class should start from homePage and extend ReferenceApplicationTestBase.
- 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();
- Each page should have a corresponding class, which extends Page and it should be added under https://github.com/openmrs/openmrs-distro-referenceapplication/tree/master/ui-tests/src/test/java/org/openmrs/reference/page
- The page class should be named after page's title and end with Page.
- It is not allowed to call Driver's methods in a page. You should be calling methods provided by the Page superclass.