diff --git a/e2e-test/java/org/alfresco/rest/comments/DeleteCommentsSanityTests.java b/e2e-test/java/org/alfresco/rest/comments/DeleteCommentsSanityTests.java index 36750bc95..2ab4ae8d5 100644 --- a/e2e-test/java/org/alfresco/rest/comments/DeleteCommentsSanityTests.java +++ b/e2e-test/java/org/alfresco/rest/comments/DeleteCommentsSanityTests.java @@ -36,8 +36,8 @@ public class DeleteCommentsSanityTests extends RestTest private RestCommentModel comment; private ListUserWithRoles usersWithRoles; - @BeforeClass - public void initTest() throws Exception + @BeforeClass(alwaysRun=true) + public void dataPreparation() throws Exception { adminUserModel = dataUser.getAdminUser(); restClient.authenticateUser(adminUserModel); @@ -48,8 +48,8 @@ public class DeleteCommentsSanityTests extends RestTest usersWithRoles = dataUser.addUsersWithRolesToSite(siteModel,UserRole.SiteManager, UserRole.SiteCollaborator, UserRole.SiteConsumer, UserRole.SiteContributor); } - @BeforeMethod - public void initMethod() throws Exception + @BeforeMethod(alwaysRun=true) + public void addCommentToDocument() throws Exception { restClient.authenticateUser(adminUserModel); commentsAPI.useRestClient(restClient); diff --git a/e2e-test/java/org/alfresco/rest/demo/RestDemoTests.java b/e2e-test/java/org/alfresco/rest/demo/RestDemoTests.java index c68d578fc..abc93e8f2 100644 --- a/e2e-test/java/org/alfresco/rest/demo/RestDemoTests.java +++ b/e2e-test/java/org/alfresco/rest/demo/RestDemoTests.java @@ -78,18 +78,18 @@ public class RestDemoTests extends RestTest // add new comment RestCommentModel commentEntry = commentsAPI.addComment(fileModel, "This is a new comment"); commentsAPI.getNodeComments(fileModel) - .assertThatResponseIsNotEmpty() - .assertThatCommentWithIdExists(commentEntry) - .assertThatCommentWithContentExists("This is a new comment"); + .assertResponseIsNotEmpty() + .assertCommentWithIdExists(commentEntry); // update comment commentEntry = commentsAPI.updateComment(fileModel, commentEntry, "This is the updated comment"); + commentsAPI.getNodeComments(fileModel) - .assertThatResponseIsNotEmpty() - .assertThatCommentWithIdExists(commentEntry) - .assertThatCommentWithContentExists("This is the updated comment"); + .assertResponseIsNotEmpty() + .assertCommentWithIdExists(commentEntry) + .assertCommentWithContentExists("This is the updated comment"); } /** diff --git a/e2e-test/java/org/alfresco/rest/demo/SampleSitesTests.java b/e2e-test/java/org/alfresco/rest/demo/SampleSitesTests.java index ebf8a097e..e0210679a 100644 --- a/e2e-test/java/org/alfresco/rest/demo/SampleSitesTests.java +++ b/e2e-test/java/org/alfresco/rest/demo/SampleSitesTests.java @@ -55,7 +55,7 @@ public class SampleSitesTests extends RestTest public void adminShouldAccessSites() throws JsonToModelConversionException, Exception { siteAPI.getSites() - .assertThatResponseIsNotEmpty(); + .assertResponseIsNotEmpty(); } @TestRail(section={"demo", "sample-section"}, executionType= ExecutionType.SANITY, diff --git a/e2e-test/java/org/alfresco/rest/people/DeleteSiteMemberSanityTests.java b/e2e-test/java/org/alfresco/rest/people/DeleteSiteMemberSanityTests.java index dc6e25f8c..7d5a135ec 100644 --- a/e2e-test/java/org/alfresco/rest/people/DeleteSiteMemberSanityTests.java +++ b/e2e-test/java/org/alfresco/rest/people/DeleteSiteMemberSanityTests.java @@ -42,8 +42,8 @@ public class DeleteSiteMemberSanityTests extends RestTest private SiteMember siteMember; private ListUserWithRoles usersWithRoles; - @BeforeClass - public void initTest() throws DataPreparationException + @BeforeClass(alwaysRun=true) + public void dataPreparation() throws DataPreparationException { adminUser = dataUser.getAdminUser(); siteModel = dataSite.usingUser(adminUser).createPublicRandomSite(); diff --git a/e2e-test/java/org/alfresco/rest/people/GetPeopleTests.java b/e2e-test/java/org/alfresco/rest/people/GetPeopleTests.java index e0695b06a..36f342cd7 100644 --- a/e2e-test/java/org/alfresco/rest/people/GetPeopleTests.java +++ b/e2e-test/java/org/alfresco/rest/people/GetPeopleTests.java @@ -13,7 +13,7 @@ import org.springframework.http.HttpStatus; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; -@Test(groups = { "rest-api", "people" }) +@Test(groups = { "rest-api", "people", "sanity" }) public class GetPeopleTests extends RestTest { @Autowired @@ -23,7 +23,7 @@ public class GetPeopleTests extends RestTest SiteModel siteModel; UserModel searchedUser; - @BeforeClass + @BeforeClass(alwaysRun=true) public void dataPreparation() throws Exception { userModel = dataUser.createRandomTestUser(); @@ -33,7 +33,6 @@ public class GetPeopleTests extends RestTest peopleApi.useRestClient(restClient); } - @Test(groups = "sanity") @TestRail(section = { "rest-api", "people" }, executionType = ExecutionType.SANITY, description = "Verify manager user gets a person with Rest API and response is successful") public void managerUserChecksIfPersonIsPresent() throws Exception { @@ -45,7 +44,6 @@ public class GetPeopleTests extends RestTest peopleApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @Test(groups = "sanity") @TestRail(section = { "rest-api", "people" }, executionType = ExecutionType.SANITY, description = "Verify collaborator user gets a person with Rest API and response is successful") public void collaboratorUserChecksIfPersonIsPresent() throws Exception { @@ -68,8 +66,7 @@ public class GetPeopleTests extends RestTest peopleApi.getPerson(searchedUser); peopleApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - - @Test(groups = "sanity") + @TestRail(section = { "rest-api", "people" }, executionType = ExecutionType.SANITY, description = "Verify consumer user gets a person with Rest API and response is successful") public void consumerUserChecksIfPersonIsPresent() throws Exception { @@ -81,7 +78,6 @@ public class GetPeopleTests extends RestTest peopleApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @Test(groups = "sanity") @TestRail(section = { "rest-api", "people" }, executionType = ExecutionType.SANITY, description = "Verify admin user gets a person with Rest API and response is successful") public void adminUserChecksIfPersonIsPresent() throws Exception { @@ -91,8 +87,7 @@ public class GetPeopleTests extends RestTest peopleApi.getPerson(searchedUser); peopleApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - - @Test(groups = "sanity") + @TestRail(section = { "rest-api", "people" }, executionType = ExecutionType.SANITY, description = "Verify manager user gets a non existing person with Rest API and person is not found") public void managerUserChecksIfNonExistingPersonIsPresent() throws Exception { diff --git a/e2e-test/java/org/alfresco/rest/sites/AddSiteMembershipRequestSanityTests.java b/e2e-test/java/org/alfresco/rest/sites/AddSiteMembershipRequestSanityTests.java index 28722398e..6d9aaca6f 100644 --- a/e2e-test/java/org/alfresco/rest/sites/AddSiteMembershipRequestSanityTests.java +++ b/e2e-test/java/org/alfresco/rest/sites/AddSiteMembershipRequestSanityTests.java @@ -37,7 +37,7 @@ public class AddSiteMembershipRequestSanityTests extends RestTest private UserModel adminUser; @BeforeClass(alwaysRun=true) - public void initTest() throws DataPreparationException + public void dataPreparation() throws DataPreparationException { adminUser = dataUser.getAdminUser(); siteModel = dataSite.usingUser(adminUser).createPublicRandomSite(); diff --git a/e2e-test/java/org/alfresco/rest/sites/GetSiteContainersSanityTests.java b/e2e-test/java/org/alfresco/rest/sites/GetSiteContainersSanityTests.java index 81b2e5ed4..b1071dae5 100644 --- a/e2e-test/java/org/alfresco/rest/sites/GetSiteContainersSanityTests.java +++ b/e2e-test/java/org/alfresco/rest/sites/GetSiteContainersSanityTests.java @@ -36,7 +36,7 @@ public class GetSiteContainersSanityTests extends RestTest private ListUserWithRoles usersWithRoles; private UserModel userModel; - @BeforeClass + @BeforeClass(alwaysRun=true) public void dataPreparation() throws Exception { adminUserModel = dataUser.getAdminUser();