...
Here is an example of an existing test from GroupTest.java:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
@Test(sequential = true, groups = {"group","acceptance","ui"}) @SuppressWarnings("PMD.SignatureDeclareThrowsException") // one of the dependent methods throws Exception public void createGroupInPartialApplicationStateTest() throws Exception { initRemote.dataLoadAndCacheRefresh(dbUnitUtilities, "acceptance_small_001_dbunit.xml", dataSource, selenium); CreateGroupEntryPage groupEntryPage = loginAndNavigateToNewGroupPage(); CreateGroupSubmitParameters formParameters = getGenericGroupFormParameters(); CreateGroupConfirmationPage confirmationPage = groupEntryPage.submitNewGroupForPartialApplication(formParameters); confirmationPage.verifyPage(); GroupViewDetailsPage groupDetailsPage = confirmationPage.navigateToGroupDetailsPage(); groupDetailsPage.verifyPage(); groupDetailsPage.verifyStatus("Partial Application*"); } |
Might be written something like:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
\* \* Given Center exists, \* And there is a user with rights to create a group, \* When I login in as user "mifos" \* And I create a Group with generic parameters \* And I view Group Details \* Then Group status is "Partial Application" */ @Test(sequential = true, groups = {"group","acceptance","ui"}) // http://mifosforge.jira.com/browse/MIFOSTEST-300 @SuppressWarnings("PMD.SignatureDeclareThrowsException") // one of the dependent methods throws Exception public void createGroupInPartialApplicationStateTest() throws Exception { //Given initRemote.dataLoadAndCacheRefresh(dbUnitUtilities, "acceptance_standard_dbunit.xml", dataSource, selenium); Center center = createCenter(getGenericCenterFormParameters()); //When login("mifos"); Group group = createGroup(center, getGenericGroupFormParameters()); GroupDetails groupDetails = viewGroupDetails(group); //Then groupDetails.verifyStatus("Partial Application*"); } |
...