diff --git a/e2e-test/java/org/alfresco/rest/comments/AddCommentSanityTests.java b/e2e-test/java/org/alfresco/rest/comments/AddCommentSanityTests.java index ec1483ff3..a7e0d9621 100644 --- a/e2e-test/java/org/alfresco/rest/comments/AddCommentSanityTests.java +++ b/e2e-test/java/org/alfresco/rest/comments/AddCommentSanityTests.java @@ -9,6 +9,7 @@ import org.alfresco.utility.data.DataUser; import org.alfresco.utility.data.DataUser.ListUserWithRoles; import org.alfresco.utility.model.FileModel; import org.alfresco.utility.model.SiteModel; +import org.alfresco.utility.model.TestGroup; import org.alfresco.utility.model.UserModel; import org.alfresco.utility.report.Bug; import org.alfresco.utility.testrail.ExecutionType; @@ -18,7 +19,7 @@ import org.springframework.http.HttpStatus; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; -@Test(groups = { "rest-api", "comments", "sanity" }) +@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.SANITY }) public class AddCommentSanityTests extends RestTest { @Autowired @@ -43,16 +44,16 @@ public class AddCommentSanityTests extends RestTest usersWithRoles = dataUser.addUsersWithRolesToSite(siteModel, UserRole.SiteManager, UserRole.SiteCollaborator, UserRole.SiteConsumer, UserRole.SiteContributor); } - @TestRail(section = { "rest-api", - "comments" }, executionType = ExecutionType.SANITY, description = "Verify admin user adds comments with Rest API and status code is 201") + @TestRail(section = { TestGroup.REST_API, + TestGroup.COMMENTS }, executionType = ExecutionType.SANITY, description = "Verify admin user adds comments with Rest API and status code is 201") public void adminIsAbleToAddComment() throws JsonToModelConversionException, Exception { commentsAPI.addComment(document, "This is a new comment added by " + adminUserModel.getUsername()); commentsAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.CREATED); } - @TestRail(section = { "rest-api", - "comments" }, executionType = ExecutionType.SANITY, description = "Verify Manager user adds comments with Rest API and status code is 201") + @TestRail(section = { TestGroup.REST_API, + TestGroup.COMMENTS }, executionType = ExecutionType.SANITY, description = "Verify Manager user adds comments with Rest API and status code is 201") public void managerIsAbleToAddComment() throws JsonToModelConversionException, Exception { restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteManager)); @@ -60,8 +61,8 @@ public class AddCommentSanityTests extends RestTest commentsAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.CREATED); } - @TestRail(section = { "rest-api", - "comments" }, executionType = ExecutionType.SANITY, description = "Verify Contributor user adds comments with Rest API and status code is 201") + @TestRail(section = { TestGroup.REST_API, + TestGroup.COMMENTS }, executionType = ExecutionType.SANITY, description = "Verify Contributor user adds comments with Rest API and status code is 201") public void contributorIsAbleToAddComment() throws JsonToModelConversionException, Exception { restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteContributor)); @@ -69,8 +70,8 @@ public class AddCommentSanityTests extends RestTest commentsAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.CREATED); } - @TestRail(section = { "rest-api", - "comments" }, executionType = ExecutionType.SANITY, description = "Verify Collaborator user adds comments with Rest API and status code is 201") + @TestRail(section = { TestGroup.REST_API, + TestGroup.COMMENTS }, executionType = ExecutionType.SANITY, description = "Verify Collaborator user adds comments with Rest API and status code is 201") public void collaboratorIsAbleToAddComment() throws JsonToModelConversionException, Exception { restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteCollaborator)); @@ -78,8 +79,8 @@ public class AddCommentSanityTests extends RestTest commentsAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.CREATED); } - @TestRail(section = { "rest-api", - "comments" }, executionType = ExecutionType.SANITY, description = "Verify Consumer user adds comments with Rest API and status code is 201") + @TestRail(section = { TestGroup.REST_API, + TestGroup.COMMENTS }, executionType = ExecutionType.SANITY, description = "Verify Consumer user adds comments with Rest API and status code is 201") public void consumerIsAbleToAddComment() throws JsonToModelConversionException, Exception { restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteConsumer)); @@ -87,8 +88,8 @@ public class AddCommentSanityTests extends RestTest commentsAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.FORBIDDEN); } - @TestRail(section = { "rest-api", - "comments" }, executionType = ExecutionType.SANITY, description = "Verify unauthenticated user gets status code 401 on post comments call") + @TestRail(section = { TestGroup.REST_API, + TestGroup.COMMENTS }, executionType = ExecutionType.SANITY, description = "Verify unauthenticated user gets status code 401 on post comments call") @Bug(id="MNT-16904") public void unauthenticatedUserIsNotAbleToAddComment() throws JsonToModelConversionException, Exception { diff --git a/e2e-test/java/org/alfresco/rest/comments/AddCommentsSanityTests.java b/e2e-test/java/org/alfresco/rest/comments/AddCommentsSanityTests.java index 2ff5857fd..9ee678cd5 100644 --- a/e2e-test/java/org/alfresco/rest/comments/AddCommentsSanityTests.java +++ b/e2e-test/java/org/alfresco/rest/comments/AddCommentsSanityTests.java @@ -9,6 +9,7 @@ import org.alfresco.utility.data.DataUser; import org.alfresco.utility.data.RandomData; import org.alfresco.utility.model.FileModel; import org.alfresco.utility.model.SiteModel; +import org.alfresco.utility.model.TestGroup; import org.alfresco.utility.model.UserModel; import org.alfresco.utility.report.Bug; import org.alfresco.utility.testrail.ExecutionType; @@ -22,7 +23,7 @@ import org.testng.annotations.Test; /** * Created by Claudia Agache on 10/10/2016. */ -@Test(groups = { "rest-api", "comments", "sanity" }) +@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.SANITY }) public class AddCommentsSanityTests extends RestTest { @Autowired RestCommentsApi commentsAPI; @@ -53,16 +54,16 @@ public class AddCommentsSanityTests extends RestTest comment2 = RandomData.getRandomName("comment2"); } - @TestRail(section = { "rest-api", - "comments" }, executionType = ExecutionType.SANITY, description = "Verify admin user adds multiple comments with Rest API and status code is 201") + @TestRail(section = { TestGroup.REST_API, + TestGroup.COMMENTS }, executionType = ExecutionType.SANITY, description = "Verify admin user adds multiple comments with Rest API and status code is 201") public void adminIsAbleToAddComments() throws JsonToModelConversionException, Exception { commentsAPI.addComments(document, comment1, comment2); commentsAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.CREATED); } - @TestRail(section = { "rest-api", - "comments" }, executionType = ExecutionType.SANITY, description = "Verify Manager user adds multiple comments with Rest API and status code is 201") + @TestRail(section = { TestGroup.REST_API, + TestGroup.COMMENTS }, executionType = ExecutionType.SANITY, description = "Verify Manager user adds multiple comments with Rest API and status code is 201") public void managerIsAbleToAddComments() throws JsonToModelConversionException, Exception { restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteManager)); @@ -70,8 +71,8 @@ public class AddCommentsSanityTests extends RestTest commentsAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.CREATED); } - @TestRail(section = { "rest-api", - "comments" }, executionType = ExecutionType.SANITY, description = "Verify Contributor user adds multiple comments with Rest API and status code is 201") + @TestRail(section = { TestGroup.REST_API, + TestGroup.COMMENTS }, executionType = ExecutionType.SANITY, description = "Verify Contributor user adds multiple comments with Rest API and status code is 201") public void contributorIsAbleToAddComments() throws JsonToModelConversionException, Exception { restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteContributor)); @@ -79,8 +80,8 @@ public class AddCommentsSanityTests extends RestTest commentsAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.CREATED); } - @TestRail(section = { "rest-api", - "comments" }, executionType = ExecutionType.SANITY, description = "Verify Collaborator user adds multiple comments with Rest API and status code is 201") + @TestRail(section = { TestGroup.REST_API, + TestGroup.COMMENTS }, executionType = ExecutionType.SANITY, description = "Verify Collaborator user adds multiple comments with Rest API and status code is 201") public void collaboratorIsAbleToAddComments() throws JsonToModelConversionException, Exception { restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteCollaborator)); @@ -88,8 +89,8 @@ public class AddCommentsSanityTests extends RestTest commentsAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.CREATED); } - @TestRail(section = { "rest-api", - "comments" }, executionType = ExecutionType.SANITY, description = "Verify Consumer user adds multiple comments with Rest API and status code is 201") + @TestRail(section = { TestGroup.REST_API, + TestGroup.COMMENTS }, executionType = ExecutionType.SANITY, description = "Verify Consumer user adds multiple comments with Rest API and status code is 201") public void consumerIsAbleToAddComments() throws JsonToModelConversionException, Exception { restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteConsumer)); @@ -97,8 +98,8 @@ public class AddCommentsSanityTests extends RestTest commentsAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.FORBIDDEN); } - @TestRail(section = { "rest-api", - "comments" }, executionType = ExecutionType.SANITY, description = "Verify unauthenticated user gets status code 401 on post multiple comments call") + @TestRail(section = { TestGroup.REST_API, + TestGroup.COMMENTS }, executionType = ExecutionType.SANITY, description = "Verify unauthenticated user gets status code 401 on post multiple comments call") @Bug(id="MNT-16904") public void unauthenticatedUserIsNotAbleToAddComments() throws JsonToModelConversionException, Exception { diff --git a/e2e-test/java/org/alfresco/rest/comments/DeleteCommentsSanityTests.java b/e2e-test/java/org/alfresco/rest/comments/DeleteCommentsSanityTests.java index 2ab4ae8d5..96e4183db 100644 --- a/e2e-test/java/org/alfresco/rest/comments/DeleteCommentsSanityTests.java +++ b/e2e-test/java/org/alfresco/rest/comments/DeleteCommentsSanityTests.java @@ -10,6 +10,7 @@ import org.alfresco.utility.data.DataUser; import org.alfresco.utility.data.DataUser.ListUserWithRoles; import org.alfresco.utility.model.FileModel; import org.alfresco.utility.model.SiteModel; +import org.alfresco.utility.model.TestGroup; import org.alfresco.utility.model.UserModel; import org.alfresco.utility.testrail.ExecutionType; import org.alfresco.utility.testrail.annotation.TestRail; @@ -19,7 +20,7 @@ import org.testng.annotations.BeforeClass; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; -@Test(groups = { "rest-api", "comments", "sanity" }) +@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.SANITY }) public class DeleteCommentsSanityTests extends RestTest { @@ -56,16 +57,16 @@ public class DeleteCommentsSanityTests extends RestTest comment = commentsAPI.addComment(document, "This is a new comment"); } - @TestRail(section = { "rest-api", - "comments" }, executionType = ExecutionType.SANITY, description = "Verify Admin user delete comments with Rest API and status code is 204") + @TestRail(section = { TestGroup.REST_API, + TestGroup.COMMENTS }, executionType = ExecutionType.SANITY, description = "Verify Admin user delete comments with Rest API and status code is 204") public void adminIsAbleToDeleteComments() throws JsonToModelConversionException, Exception { commentsAPI.deleteComment(document, comment); commentsAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.NO_CONTENT); } - @TestRail(section = { "rest-api", - "comments" }, executionType = ExecutionType.SANITY, description = "Verify Manager user delete comments created by admin user with Rest API and status code is 204") + @TestRail(section = { TestGroup.REST_API, + TestGroup.COMMENTS }, executionType = ExecutionType.SANITY, description = "Verify Manager user delete comments created by admin user with Rest API and status code is 204") public void managerIsAbleToDeleteComments() throws JsonToModelConversionException, Exception { restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteManager)); @@ -73,8 +74,8 @@ public class DeleteCommentsSanityTests extends RestTest commentsAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.NO_CONTENT); } - @TestRail(section = { "rest-api", - "comments" }, executionType = ExecutionType.SANITY, description = "Verify Collaborator user can't delete comments created by admin user with Rest API and status code is 403") + @TestRail(section = { TestGroup.REST_API, + TestGroup.COMMENTS }, executionType = ExecutionType.SANITY, description = "Verify Collaborator user can't delete comments created by admin user with Rest API and status code is 403") public void collaboratorIsNotAbleToDeleteComments() throws JsonToModelConversionException, Exception { restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteCollaborator)); @@ -82,8 +83,8 @@ public class DeleteCommentsSanityTests extends RestTest commentsAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.FORBIDDEN); } - @TestRail(section = { "rest-api", - "comments" }, executionType = ExecutionType.SANITY, description = "Verify Contributor user can't delete comments created by admin user with Rest API and status code is 403") + @TestRail(section = { TestGroup.REST_API, + TestGroup.COMMENTS }, executionType = ExecutionType.SANITY, description = "Verify Contributor user can't delete comments created by admin user with Rest API and status code is 403") public void contributorIsNotAbleToDeleteComments() throws JsonToModelConversionException, Exception { restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteContributor)); @@ -91,8 +92,8 @@ public class DeleteCommentsSanityTests extends RestTest commentsAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.FORBIDDEN); } - @TestRail(section = { "rest-api", - "comments" }, executionType = ExecutionType.SANITY, description = "Verify Consumer user can't delete comments created by admin user with Rest API and status code is 403") + @TestRail(section = { TestGroup.REST_API, + TestGroup.COMMENTS }, executionType = ExecutionType.SANITY, description = "Verify Consumer user can't delete comments created by admin user with Rest API and status code is 403") public void consumerIsNotAbleToDeleteComments() throws JsonToModelConversionException, Exception { restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteConsumer)); @@ -100,8 +101,8 @@ public class DeleteCommentsSanityTests extends RestTest commentsAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.FORBIDDEN); } - @TestRail(section = { "rest-api", - "comments" }, executionType = ExecutionType.SANITY, description = "Verify Manager user gets status code 401 if authentication call fails") + @TestRail(section = { TestGroup.REST_API, + TestGroup.COMMENTS }, executionType = ExecutionType.SANITY, description = "Verify Manager user gets status code 401 if authentication call fails") public void managerIsNotAbleToDeleteCommentIfAuthenticationFails() throws JsonToModelConversionException, Exception { UserModel nonexistentModel = new UserModel("nonexistentUser", "nonexistentPassword"); diff --git a/e2e-test/java/org/alfresco/rest/comments/GetCommentsSanityTests.java b/e2e-test/java/org/alfresco/rest/comments/GetCommentsSanityTests.java index 365684cdb..36af7a435 100644 --- a/e2e-test/java/org/alfresco/rest/comments/GetCommentsSanityTests.java +++ b/e2e-test/java/org/alfresco/rest/comments/GetCommentsSanityTests.java @@ -9,6 +9,7 @@ import org.alfresco.utility.data.DataUser; import org.alfresco.utility.data.DataUser.ListUserWithRoles; import org.alfresco.utility.model.FileModel; import org.alfresco.utility.model.SiteModel; +import org.alfresco.utility.model.TestGroup; import org.alfresco.utility.model.UserModel; import org.alfresco.utility.report.Bug; import org.alfresco.utility.testrail.ExecutionType; @@ -18,7 +19,7 @@ import org.springframework.http.HttpStatus; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; -@Test(groups = { "rest-api", "comments", "sanity" }) +@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.SANITY }) public class GetCommentsSanityTests extends RestTest { @Autowired @@ -47,7 +48,7 @@ public class GetCommentsSanityTests extends RestTest usersWithRoles = dataUser.addUsersWithRolesToSite(siteModel, UserRole.SiteManager, UserRole.SiteCollaborator, UserRole.SiteConsumer, UserRole.SiteContributor); } - @TestRail(section={"rest-api", "comments"}, executionType= ExecutionType.SANITY, + @TestRail(section={TestGroup.REST_API, TestGroup.COMMENTS}, executionType= ExecutionType.SANITY, description= "Verify Admin user gets comments with Rest API and status code is 200") public void adminIsAbleToRetrieveComments() throws JsonToModelConversionException, Exception { @@ -55,7 +56,7 @@ public class GetCommentsSanityTests extends RestTest commentsAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section={"rest-api", "comments"}, executionType= ExecutionType.SANITY, + @TestRail(section={TestGroup.REST_API, TestGroup.COMMENTS}, executionType= ExecutionType.SANITY, description= "Verify Manager user gets comments created by admin user with Rest API and status code is 200") public void managerIsAbleToRetrieveComments() throws JsonToModelConversionException, Exception { @@ -64,7 +65,7 @@ public class GetCommentsSanityTests extends RestTest commentsAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section={"rest-api", "comments"}, executionType= ExecutionType.SANITY, + @TestRail(section={TestGroup.REST_API, TestGroup.COMMENTS}, executionType= ExecutionType.SANITY, description= "Verify Contributor user gets comments created by admin user with Rest API and status code is 200") public void contributorIsAbleToRetrieveComments() throws JsonToModelConversionException, Exception { @@ -73,7 +74,7 @@ public class GetCommentsSanityTests extends RestTest commentsAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section={"rest-api", "comments"}, executionType= ExecutionType.SANITY, + @TestRail(section={TestGroup.REST_API, TestGroup.COMMENTS}, executionType= ExecutionType.SANITY, description= "Verify Collaborator user gets comments created by admin user with Rest API and status code is 200") public void collaboratorIsAbleToRetrieveComments() throws JsonToModelConversionException, Exception { @@ -82,7 +83,7 @@ public class GetCommentsSanityTests extends RestTest commentsAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section={"rest-api", "comments"}, executionType= ExecutionType.SANITY, + @TestRail(section={TestGroup.REST_API, TestGroup.COMMENTS}, executionType= ExecutionType.SANITY, description= "Verify Consumer user gets comments created by admin user with Rest API and status code is 200") public void consumerIsAbleToRetrieveComments() throws JsonToModelConversionException, Exception { @@ -91,7 +92,7 @@ public class GetCommentsSanityTests extends RestTest commentsAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section={"rest-api", "comments"}, executionType= ExecutionType.SANITY, + @TestRail(section={TestGroup.REST_API, TestGroup.COMMENTS}, executionType= ExecutionType.SANITY, description= "Verify Manager user gets status code 401 if authentication call fails") @Bug(id="MNT-16904") public void managerIsNotAbleToRetrieveCommentIfAuthenticationFails() throws JsonToModelConversionException, Exception @@ -102,7 +103,7 @@ public class GetCommentsSanityTests extends RestTest commentsAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.UNAUTHORIZED); } - @TestRail(section={"rest-api", "comments"}, executionType= ExecutionType.SANITY, + @TestRail(section={TestGroup.REST_API, TestGroup.COMMENTS}, executionType= ExecutionType.SANITY, description= "Verify Manager user gets comments created by another user and status code is 200") public void managerIsAbleToRetrieveCommentsCreatedByAnotherUser() throws JsonToModelConversionException, Exception { @@ -115,7 +116,7 @@ public class GetCommentsSanityTests extends RestTest commentsAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section={"rest-api", "comments"}, executionType= ExecutionType.SANITY, + @TestRail(section={TestGroup.REST_API, TestGroup.COMMENTS}, executionType= ExecutionType.SANITY, description= "Verify admin user gets comments created by another user and status code is 200") public void adminIsAbleToRetrieveCommentsCreatedByAnotherUser() throws JsonToModelConversionException, Exception { diff --git a/e2e-test/java/org/alfresco/rest/comments/UpdateCommentsSanityTests.java b/e2e-test/java/org/alfresco/rest/comments/UpdateCommentsSanityTests.java index 4d1b6355a..be47e11e2 100644 --- a/e2e-test/java/org/alfresco/rest/comments/UpdateCommentsSanityTests.java +++ b/e2e-test/java/org/alfresco/rest/comments/UpdateCommentsSanityTests.java @@ -11,6 +11,7 @@ import org.alfresco.utility.data.DataUser.ListUserWithRoles; import org.alfresco.utility.model.FileModel; import org.alfresco.utility.model.FolderModel; import org.alfresco.utility.model.SiteModel; +import org.alfresco.utility.model.TestGroup; import org.alfresco.utility.model.UserModel; import org.alfresco.utility.report.Bug; import org.alfresco.utility.testrail.ExecutionType; @@ -20,7 +21,7 @@ import org.springframework.http.HttpStatus; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; -@Test(groups = { "rest-api", "comments", "sanity" }) +@Test(groups = { TestGroup.REST_API, TestGroup.COMMENTS, TestGroup.SANITY }) public class UpdateCommentsSanityTests extends RestTest { @Autowired @@ -48,16 +49,16 @@ public class UpdateCommentsSanityTests extends RestTest usersWithRoles = dataUser.addUsersWithRolesToSite(siteModel,UserRole.SiteManager, UserRole.SiteCollaborator, UserRole.SiteConsumer, UserRole.SiteContributor); } - @TestRail(section = { "rest-api", - "comments" }, executionType = ExecutionType.SANITY, description = "Verify Admin user updates comments and status code is 200") + @TestRail(section = { TestGroup.REST_API, + TestGroup.COMMENTS }, executionType = ExecutionType.SANITY, description = "Verify Admin user updates comments and status code is 200") public void adminIsAbleToUpdateComments() throws JsonToModelConversionException, Exception { commentsAPI.updateComment(document, commentModel, "This is the updated comment with admin user"); commentsAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", - "comments" }, executionType = ExecutionType.SANITY, description = "Verify Manager user updates comments created by admin user and status code is 200") + @TestRail(section = { TestGroup.REST_API, + TestGroup.COMMENTS }, executionType = ExecutionType.SANITY, description = "Verify Manager user updates comments created by admin user and status code is 200") public void managerIsAbleToUpdateComment() throws JsonToModelConversionException, Exception { restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteManager)); @@ -65,8 +66,8 @@ public class UpdateCommentsSanityTests extends RestTest commentsAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", - "comments" }, executionType = ExecutionType.SANITY, description = "Verify Contributor user can not update comments created by admin user and status code is 403") + @TestRail(section = { TestGroup.REST_API, + TestGroup.COMMENTS }, executionType = ExecutionType.SANITY, description = "Verify Contributor user can not update comments created by admin user and status code is 403") public void contributorIsNotAbleToUpdateComment() throws JsonToModelConversionException, Exception { restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteContributor)); @@ -74,8 +75,8 @@ public class UpdateCommentsSanityTests extends RestTest commentsAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.FORBIDDEN); } - @TestRail(section = { "rest-api", - "comments" }, executionType = ExecutionType.SANITY, description = "Verify Consumer user can not update comments created by admin user and status code is 403") + @TestRail(section = { TestGroup.REST_API, + TestGroup.COMMENTS }, executionType = ExecutionType.SANITY, description = "Verify Consumer user can not update comments created by admin user and status code is 403") public void consumerIsNotAbleToUpdateComment() throws JsonToModelConversionException, Exception { restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteConsumer)); @@ -83,8 +84,8 @@ public class UpdateCommentsSanityTests extends RestTest commentsAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.FORBIDDEN); } - @TestRail(section = { "rest-api", - "comments" }, executionType = ExecutionType.SANITY, description = "Verify Collaborator user can not update comment created by admin user and status code is 403") + @TestRail(section = { TestGroup.REST_API, + TestGroup.COMMENTS }, executionType = ExecutionType.SANITY, description = "Verify Collaborator user can not update comment created by admin user and status code is 403") @Bug(id="REPO-1011") public void collaboratorIsNotAbleToUpdateComment() throws JsonToModelConversionException, Exception { @@ -94,8 +95,8 @@ public class UpdateCommentsSanityTests extends RestTest commentEntry.assertCommentContentIs("This is the updated comment with Collaborator user"); } - @TestRail(section = { "rest-api", - "comments" }, executionType = ExecutionType.SANITY, description = "Verify unauthenticated user gets status code 401 on update comment call") + @TestRail(section = { TestGroup.REST_API, + TestGroup.COMMENTS }, executionType = ExecutionType.SANITY, description = "Verify unauthenticated user gets status code 401 on update comment call") @Bug(id="MNT-16904") public void unauthenticatedUserIsNotAbleToUpdateComment() throws JsonToModelConversionException, Exception { @@ -105,7 +106,7 @@ public class UpdateCommentsSanityTests extends RestTest commentsAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.UNAUTHORIZED); } - @TestRail(section = { "rest-api", "comments" }, executionType = ExecutionType.SANITY, description = "Verify update comment with inexistent nodeId returns status code 404") + @TestRail(section = { TestGroup.REST_API, TestGroup.COMMENTS }, executionType = ExecutionType.SANITY, description = "Verify update comment with inexistent nodeId returns status code 404") public void canNotUpdateCommentIfNodeIdIsNotSet() throws JsonToModelConversionException, Exception { restClient.authenticateUser(adminUserModel); @@ -116,7 +117,7 @@ public class UpdateCommentsSanityTests extends RestTest commentsAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.NOT_FOUND); } - @TestRail(section = { "rest-api", "comments" }, executionType = ExecutionType.SANITY, description = "Verify if commentId is not set the status code is 404") + @TestRail(section = { TestGroup.REST_API, TestGroup.COMMENTS }, executionType = ExecutionType.SANITY, description = "Verify if commentId is not set the status code is 404") public void canNotUpdateCommentIfCommentIdIsNotSet() throws JsonToModelConversionException, Exception { restClient.authenticateUser(adminUserModel); diff --git a/e2e-test/java/org/alfresco/rest/favorites/DeleteFavoritesSanityTests.java b/e2e-test/java/org/alfresco/rest/favorites/DeleteFavoritesSanityTests.java index 4630342b2..caf712229 100644 --- a/e2e-test/java/org/alfresco/rest/favorites/DeleteFavoritesSanityTests.java +++ b/e2e-test/java/org/alfresco/rest/favorites/DeleteFavoritesSanityTests.java @@ -7,6 +7,7 @@ import org.alfresco.rest.requests.RestSitesApi; import org.alfresco.utility.constants.UserRole; import org.alfresco.utility.data.DataUser.ListUserWithRoles; import org.alfresco.utility.model.SiteModel; +import org.alfresco.utility.model.TestGroup; import org.alfresco.utility.model.UserModel; import org.alfresco.utility.report.Bug; import org.alfresco.utility.testrail.ExecutionType; @@ -16,7 +17,7 @@ import org.springframework.http.HttpStatus; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; -@Test(groups = { "rest-api", "favorites", "sanity" }) +@Test(groups = { TestGroup.REST_API, TestGroup.FAVORITES, TestGroup.COMMENTS }) public class DeleteFavoritesSanityTests extends RestTest { @Autowired @@ -44,8 +45,8 @@ public class DeleteFavoritesSanityTests extends RestTest UserRole.SiteContributor); } - @TestRail(section = { "rest-api", - "favorites" }, executionType = ExecutionType.SANITY, description = "Verify Admin user delets site from favorites with Rest API and status code is 204") + @TestRail(section = { TestGroup.REST_API, + TestGroup.FAVORITES }, executionType = ExecutionType.SANITY, description = "Verify Admin user delets site from favorites with Rest API and status code is 204") public void adminIsAbleToDeleteFavorites() throws JsonToModelConversionException, Exception { favoritesAPI.addSiteToFavorites(adminUserModel, siteModel); @@ -53,8 +54,8 @@ public class DeleteFavoritesSanityTests extends RestTest favoritesAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.NO_CONTENT); } - @TestRail(section = { "rest-api", - "favorites" }, executionType = ExecutionType.SANITY, description = "Verify Manager user delets site from favorites with Rest API and status code is 204") + @TestRail(section = { TestGroup.REST_API, + TestGroup.FAVORITES }, executionType = ExecutionType.SANITY, description = "Verify Manager user delets site from favorites with Rest API and status code is 204") public void managerIsAbleToDeleteFavorites() throws JsonToModelConversionException, Exception { restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteManager)); @@ -63,8 +64,8 @@ public class DeleteFavoritesSanityTests extends RestTest favoritesAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.NO_CONTENT); } - @TestRail(section = { "rest-api", - "favorites" }, executionType = ExecutionType.SANITY, description = "Verify Collaborator user delets site from favorites with Rest API and status code is 204") + @TestRail(section = { TestGroup.REST_API, + TestGroup.FAVORITES }, executionType = ExecutionType.SANITY, description = "Verify Collaborator user delets site from favorites with Rest API and status code is 204") public void collaboratorIsAbleToDeleteFavorites() throws JsonToModelConversionException, Exception { restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteCollaborator)); @@ -73,8 +74,8 @@ public class DeleteFavoritesSanityTests extends RestTest favoritesAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.NO_CONTENT); } - @TestRail(section = { "rest-api", - "favorites" }, executionType = ExecutionType.SANITY, description = "Verify Contributor user delets site from favorites with Rest API and status code is 204") + @TestRail(section = { TestGroup.REST_API, + TestGroup.FAVORITES }, executionType = ExecutionType.SANITY, description = "Verify Contributor user delets site from favorites with Rest API and status code is 204") public void contributorIsAbleToDeleteFavorites() throws JsonToModelConversionException, Exception { restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteContributor)); @@ -83,8 +84,8 @@ public class DeleteFavoritesSanityTests extends RestTest favoritesAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.NO_CONTENT); } - @TestRail(section = { "rest-api", - "favorites" }, executionType = ExecutionType.SANITY, description = "Verify Consumer user delets site from favorites with Rest API and status code is 204") + @TestRail(section = { TestGroup.REST_API, + TestGroup.FAVORITES }, executionType = ExecutionType.SANITY, description = "Verify Consumer user delets site from favorites with Rest API and status code is 204") public void consumerIsAbleToDeleteFavorites() throws JsonToModelConversionException, Exception { restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteConsumer)); @@ -93,8 +94,8 @@ public class DeleteFavoritesSanityTests extends RestTest favoritesAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.NO_CONTENT); } - @TestRail(section = { "rest-api", - "favorites" }, executionType = ExecutionType.SANITY, description = "Verify user doesn't have permission to delete favorites of another user with Rest API and status code is 404") + @TestRail(section = { TestGroup.REST_API, + TestGroup.FAVORITES }, executionType = ExecutionType.SANITY, description = "Verify user doesn't have permission to delete favorites of another user with Rest API and status code is 404") @Bug(id="MNT-16557") public void userIsNotAbleToDeleteFavoritesOfAnotherUser() throws JsonToModelConversionException, Exception { @@ -105,8 +106,7 @@ public class DeleteFavoritesSanityTests extends RestTest favoritesAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.FORBIDDEN); } - @TestRail(section = { "rest-api", - "favorites" }, executionType = ExecutionType.SANITY, description = "Verify user doesn't have permission to delete favorites of admin user with Rest API and status code is 404") + @TestRail(section = { TestGroup.REST_API,TestGroup.FAVORITES }, executionType = ExecutionType.SANITY, description = "Verify user doesn't have permission to delete favorites of admin user with Rest API and status code is 404") @Bug(id="MNT-16557") public void userIsNotAbleToDeleteFavoritesOfAdminUser() throws JsonToModelConversionException, Exception { @@ -117,8 +117,7 @@ public class DeleteFavoritesSanityTests extends RestTest favoritesAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.FORBIDDEN); } - @TestRail(section = { "rest-api", - "favorites" }, executionType = ExecutionType.SANITY, description = "Verify admin user doesn't have permission to delete favorites of another user with Rest API and status code is 404") + @TestRail(section = { TestGroup.REST_API,TestGroup.FAVORITES }, executionType = ExecutionType.SANITY, description = "Verify admin user doesn't have permission to delete favorites of another user with Rest API and status code is 404") @Bug(id="MNT-16557") public void adminIsNotAbleToDeleteFavoritesOfAnotherUser() throws JsonToModelConversionException, Exception { @@ -129,8 +128,7 @@ public class DeleteFavoritesSanityTests extends RestTest favoritesAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.FORBIDDEN); } - @TestRail(section = { "rest-api", - "favorites" }, executionType = ExecutionType.SANITY, description = "Verify user gets status code 401 if authentication call fails") + @TestRail(section = { TestGroup.REST_API, TestGroup.FAVORITES }, executionType = ExecutionType.SANITY, description = "Verify user gets status code 401 if authentication call fails") @Bug(id = "MNT-16904") public void userIsNotAbleToDeleteFavoritesIfAuthenticationFails() throws JsonToModelConversionException, Exception { diff --git a/e2e-test/java/org/alfresco/rest/favorites/GetFavoriteSanityTests.java b/e2e-test/java/org/alfresco/rest/favorites/GetFavoriteSanityTests.java index fac32e580..98a56704e 100644 --- a/e2e-test/java/org/alfresco/rest/favorites/GetFavoriteSanityTests.java +++ b/e2e-test/java/org/alfresco/rest/favorites/GetFavoriteSanityTests.java @@ -10,6 +10,7 @@ import org.alfresco.utility.data.DataUser.ListUserWithRoles; import org.alfresco.utility.model.FileModel; import org.alfresco.utility.model.FolderModel; import org.alfresco.utility.model.SiteModel; +import org.alfresco.utility.model.TestGroup; import org.alfresco.utility.model.UserModel; import org.alfresco.utility.report.Bug; import org.alfresco.utility.testrail.ExecutionType; @@ -19,7 +20,7 @@ import org.springframework.http.HttpStatus; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; -@Test(groups = { "rest-api", "favorites", "sanity" }) +@Test(groups = { TestGroup.REST_API, "favorites", TestGroup.COMMENTS }) public class GetFavoriteSanityTests extends RestTest { @Autowired @@ -51,7 +52,7 @@ public class GetFavoriteSanityTests extends RestTest UserRole.SiteContributor); } - @TestRail(section = { "rest-api", + @TestRail(section = { TestGroup.REST_API, "favorites" }, executionType = ExecutionType.SANITY, description = "Verify Admin user gets favorite site with Rest API and status code is 200") public void adminIsAbleToRetrieveFavoritesSite() throws JsonToModelConversionException, Exception { @@ -60,7 +61,7 @@ public class GetFavoriteSanityTests extends RestTest favoritesAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", + @TestRail(section = { TestGroup.REST_API, "favorites" }, executionType = ExecutionType.SANITY, description = "Verify Admin user gets favorite folder with Rest API and status code is 200") public void adminIsAbleToRetrieveFavoritesFolder() throws JsonToModelConversionException, Exception { @@ -69,7 +70,7 @@ public class GetFavoriteSanityTests extends RestTest favoritesAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", + @TestRail(section = { TestGroup.REST_API, "favorites" }, executionType = ExecutionType.SANITY, description = "Verify Admin user gets favorite file with Rest API and status code is 200") public void adminIsAbleToRetrieveFavoritesFile() throws JsonToModelConversionException, Exception { @@ -78,7 +79,7 @@ public class GetFavoriteSanityTests extends RestTest favoritesAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", + @TestRail(section = { TestGroup.REST_API, "favorites" }, executionType = ExecutionType.SANITY, description = "Verify Manager user gets favorite site with Rest API and status code is 200") public void managerIsAbleToRetrieveFavorite() throws JsonToModelConversionException, Exception { @@ -88,7 +89,7 @@ public class GetFavoriteSanityTests extends RestTest favoritesAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", + @TestRail(section = { TestGroup.REST_API, "favorites" }, executionType = ExecutionType.SANITY, description = "Verify Collaborator user gets favorite site with Rest API and status code is 200") public void collaboratorIsAbleToRetrieveFavorites() throws JsonToModelConversionException, Exception { @@ -98,7 +99,7 @@ public class GetFavoriteSanityTests extends RestTest favoritesAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", + @TestRail(section = { TestGroup.REST_API, "favorites" }, executionType = ExecutionType.SANITY, description = "Verify Contributor user gets favorite site with Rest API and status code is 200") public void contributorIsAbleToRetrieveFavorite() throws JsonToModelConversionException, Exception { @@ -108,7 +109,7 @@ public class GetFavoriteSanityTests extends RestTest favoritesAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", + @TestRail(section = { TestGroup.REST_API, "favorites" }, executionType = ExecutionType.SANITY, description = "Verify Consumer user gets favorite site with Rest API and status code is 200") public void consumerIsAbleToRetrieveFavorites() throws JsonToModelConversionException, Exception { @@ -118,7 +119,7 @@ public class GetFavoriteSanityTests extends RestTest favoritesAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", + @TestRail(section = { TestGroup.REST_API, "favorites" }, executionType = ExecutionType.SANITY, description = "Verify user doesn't get favorite site of another user with Rest API and status code is 404") public void userIsNotAbleToRetrieveFavoriteSiteOfAnotherUser() throws JsonToModelConversionException, Exception { @@ -127,7 +128,7 @@ public class GetFavoriteSanityTests extends RestTest favoritesAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.NOT_FOUND); } - @TestRail(section = { "rest-api", + @TestRail(section = { TestGroup.REST_API, "favorites" }, executionType = ExecutionType.SANITY, description = "Verify user doesn't get favorite site of admin user with Rest API and status code is 404") public void userIsNotAbleToRetrieveFavoritesOfAdminUser() throws JsonToModelConversionException, Exception { @@ -136,7 +137,7 @@ public class GetFavoriteSanityTests extends RestTest favoritesAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.NOT_FOUND); } - @TestRail(section = { "rest-api", + @TestRail(section = { TestGroup.REST_API, "favorites" }, executionType = ExecutionType.SANITY, description = "Verify admin user doesn't get favorite site of another user with Rest API and status code is 404") public void adminIsNotAbleToRetrieveFavoritesOfAnotherUser() throws JsonToModelConversionException, Exception { @@ -145,7 +146,7 @@ public class GetFavoriteSanityTests extends RestTest favoritesAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.NOT_FOUND); } - @TestRail(section = { "rest-api", + @TestRail(section = { TestGroup.REST_API, "favorites" }, executionType = ExecutionType.SANITY, description = "Verify user gets status code 401 if authentication call fails") @Bug(id="MNT-16904") public void userIsNotAbleToRetrieveFavoritesIfAuthenticationFails() throws JsonToModelConversionException, Exception diff --git a/e2e-test/java/org/alfresco/rest/favorites/GetFavoritesSanityTests.java b/e2e-test/java/org/alfresco/rest/favorites/GetFavoritesSanityTests.java index 9507f2644..a17a14471 100644 --- a/e2e-test/java/org/alfresco/rest/favorites/GetFavoritesSanityTests.java +++ b/e2e-test/java/org/alfresco/rest/favorites/GetFavoritesSanityTests.java @@ -10,6 +10,7 @@ import org.alfresco.utility.data.DataUser.ListUserWithRoles; import org.alfresco.utility.model.FileModel; import org.alfresco.utility.model.FolderModel; import org.alfresco.utility.model.SiteModel; +import org.alfresco.utility.model.TestGroup; import org.alfresco.utility.model.UserModel; import org.alfresco.utility.report.Bug; import org.alfresco.utility.testrail.ExecutionType; @@ -19,7 +20,7 @@ import org.springframework.http.HttpStatus; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; -@Test(groups = { "rest-api", "favorites", "sanity" }) +@Test(groups = { TestGroup.REST_API, "favorites", TestGroup.COMMENTS }) public class GetFavoritesSanityTests extends RestTest { @@ -59,7 +60,7 @@ public class GetFavoritesSanityTests extends RestTest UserRole.SiteContributor); } - @TestRail(section = { "rest-api", + @TestRail(section = { TestGroup.REST_API, "favorites" }, executionType = ExecutionType.SANITY, description = "Verify Admin user gets favorites sites with Rest API and status code is 200") public void adminIsAbleToRetrieveFavoritesSites() throws JsonToModelConversionException, Exception { @@ -69,7 +70,7 @@ public class GetFavoritesSanityTests extends RestTest favoritesAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", + @TestRail(section = { TestGroup.REST_API, "favorites" }, executionType = ExecutionType.SANITY, description = "Verify Admin user gets favorites folders with Rest API and status code is 200") public void adminIsAbleToRetrieveFavoritesFolders() throws JsonToModelConversionException, Exception { @@ -79,7 +80,7 @@ public class GetFavoritesSanityTests extends RestTest favoritesAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", + @TestRail(section = { TestGroup.REST_API, "favorites" }, executionType = ExecutionType.SANITY, description = "Verify Admin user gets favorites files with Rest API and status code is 200") public void adminIsAbleToRetrieveFavoritesFiles() throws JsonToModelConversionException, Exception { @@ -89,7 +90,7 @@ public class GetFavoritesSanityTests extends RestTest favoritesAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", + @TestRail(section = { TestGroup.REST_API, "favorites" }, executionType = ExecutionType.SANITY, description = "Verify Manager user gets favorites with Rest API and status code is 200") public void managerIsAbleToRetrieveFavorites() throws JsonToModelConversionException, Exception { @@ -100,7 +101,7 @@ public class GetFavoritesSanityTests extends RestTest favoritesAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", + @TestRail(section = { TestGroup.REST_API, "favorites" }, executionType = ExecutionType.SANITY, description = "Verify Collaborator user gets favorites with Rest API and status code is 200") public void collaboratorIsAbleToRetrieveFavorites() throws JsonToModelConversionException, Exception { @@ -111,7 +112,7 @@ public class GetFavoritesSanityTests extends RestTest favoritesAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", + @TestRail(section = { TestGroup.REST_API, "favorites" }, executionType = ExecutionType.SANITY, description = "Verify Contributor user gets favorites with Rest API and status code is 200") public void contributorIsAbleToRetrieveFavorites() throws JsonToModelConversionException, Exception { @@ -122,7 +123,7 @@ public class GetFavoritesSanityTests extends RestTest favoritesAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", + @TestRail(section = { TestGroup.REST_API, "favorites" }, executionType = ExecutionType.SANITY, description = "Verify Consumer user gets favorites with Rest API and status code is 200") public void consumerIsAbleToRetrieveFavorites() throws JsonToModelConversionException, Exception { @@ -133,7 +134,7 @@ public class GetFavoritesSanityTests extends RestTest favoritesAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", + @TestRail(section = { TestGroup.REST_API, "favorites" }, executionType = ExecutionType.SANITY, description = "Verify user doesn't have permission to get favorites of another user with Rest API and status code is 404") public void userIsNotAbleToRetrieveFavoritesOfAnotherUser() throws JsonToModelConversionException, Exception { @@ -142,7 +143,7 @@ public class GetFavoritesSanityTests extends RestTest favoritesAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.NOT_FOUND); } - @TestRail(section = { "rest-api", + @TestRail(section = { TestGroup.REST_API, "favorites" }, executionType = ExecutionType.SANITY, description = "Verify user doesn't have permission to get favorites of admin user with Rest API and status code is 200") public void userIsNotAbleToRetrieveFavoritesOfAdminUser() throws JsonToModelConversionException, Exception { @@ -151,7 +152,7 @@ public class GetFavoritesSanityTests extends RestTest favoritesAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.NOT_FOUND); } - @TestRail(section = { "rest-api", + @TestRail(section = { TestGroup.REST_API, "favorites" }, executionType = ExecutionType.SANITY, description = "Verify admin user doesn't have permission to get favorites of another user with Rest API and status code is 200") public void adminIsNotAbleToRetrieveFavoritesOfAnotherUser() throws JsonToModelConversionException, Exception { @@ -160,7 +161,7 @@ public class GetFavoritesSanityTests extends RestTest favoritesAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.NOT_FOUND); } - @TestRail(section = { "rest-api", + @TestRail(section = { TestGroup.REST_API, "favorites" }, executionType = ExecutionType.SANITY, description = "Verify user gets status code 401 if authentication call fails") @Bug(id="MNT-16904") public void userIsNotAbleToRetrieveFavoritesIfAuthenticationFails() throws JsonToModelConversionException, Exception diff --git a/e2e-test/java/org/alfresco/rest/favorites/PostFavoritesSanityTests.java b/e2e-test/java/org/alfresco/rest/favorites/PostFavoritesSanityTests.java index 09d3c126c..0e0b69bd5 100644 --- a/e2e-test/java/org/alfresco/rest/favorites/PostFavoritesSanityTests.java +++ b/e2e-test/java/org/alfresco/rest/favorites/PostFavoritesSanityTests.java @@ -8,6 +8,7 @@ import org.alfresco.utility.constants.UserRole; import org.alfresco.utility.data.DataUser; import org.alfresco.utility.data.DataUser.ListUserWithRoles; import org.alfresco.utility.model.SiteModel; +import org.alfresco.utility.model.TestGroup; import org.alfresco.utility.model.UserModel; import org.alfresco.utility.report.Bug; import org.alfresco.utility.testrail.ExecutionType; @@ -17,7 +18,7 @@ import org.springframework.http.HttpStatus; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; -@Test(groups = { "rest-api", "favorites", "sanity" }) +@Test(groups = { TestGroup.REST_API, "favorites", TestGroup.COMMENTS }) public class PostFavoritesSanityTests extends RestTest { @Autowired @@ -47,7 +48,7 @@ public class PostFavoritesSanityTests extends RestTest UserRole.SiteContributor); } - @TestRail(section = { "rest-api", + @TestRail(section = { TestGroup.REST_API, "favorites" }, executionType = ExecutionType.SANITY, description = "Verify Admin user add site to favorites with Rest API and status code is 201") public void adminIsAbleToAddToFavorites() throws Exception { @@ -55,7 +56,7 @@ public class PostFavoritesSanityTests extends RestTest favoritesAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.CREATED); } - @TestRail(section = { "rest-api", + @TestRail(section = { TestGroup.REST_API, "favorites" }, executionType = ExecutionType.SANITY, description = "Verify Manager user add site to favorites with Rest API and status code is 201") public void managerIsAbleToAddToFavorites() throws Exception { @@ -64,7 +65,7 @@ public class PostFavoritesSanityTests extends RestTest favoritesAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.CREATED); } - @TestRail(section = { "rest-api", + @TestRail(section = { TestGroup.REST_API, "favorites" }, executionType = ExecutionType.SANITY, description = "Verify Collaborator user add site to favorites with Rest API and status code is 201") public void collaboratorIsAbleToAddToFavorites() throws Exception { @@ -73,7 +74,7 @@ public class PostFavoritesSanityTests extends RestTest favoritesAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.CREATED); } - @TestRail(section = { "rest-api", + @TestRail(section = { TestGroup.REST_API, "favorites" }, executionType = ExecutionType.SANITY, description = "Verify Contributor user add site to favorites with Rest API and status code is 201") public void contributorIsAbleToAddToFavorites() throws JsonToModelConversionException, Exception { @@ -82,7 +83,7 @@ public class PostFavoritesSanityTests extends RestTest favoritesAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.CREATED); } - @TestRail(section = { "rest-api", + @TestRail(section = { TestGroup.REST_API, "favorites" }, executionType = ExecutionType.SANITY, description = "Verify Consumer user add site to favorites with Rest API and status code is 201") public void consumerIsAbleToAddToFavorites() throws Exception { @@ -91,7 +92,7 @@ public class PostFavoritesSanityTests extends RestTest favoritesAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.CREATED); } - @TestRail(section = { "rest-api", + @TestRail(section = { TestGroup.REST_API, "favorites" }, executionType = ExecutionType.SANITY, description = "Verify Manager user gets status code 401 if authentication call fails") @Bug(id="MNT-16904") public void managerIsNotAbleToAddCommentIfAuthenticationFails() throws Exception diff --git a/e2e-test/java/org/alfresco/rest/networks/RestGetNetworkForPersonSanityTests.java b/e2e-test/java/org/alfresco/rest/networks/RestGetNetworkForPersonSanityTests.java index 7c0fb2ad8..8de10da4c 100644 --- a/e2e-test/java/org/alfresco/rest/networks/RestGetNetworkForPersonSanityTests.java +++ b/e2e-test/java/org/alfresco/rest/networks/RestGetNetworkForPersonSanityTests.java @@ -3,6 +3,7 @@ package org.alfresco.rest.networks; import org.alfresco.rest.RestTest; import org.alfresco.rest.requests.RestNetworksApi; import org.alfresco.rest.requests.RestTenantApi; +import org.alfresco.utility.model.TestGroup; import org.alfresco.utility.model.UserModel; import org.alfresco.utility.report.Bug; import org.alfresco.utility.testrail.ExecutionType; @@ -12,7 +13,7 @@ import org.springframework.http.HttpStatus; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; -@Test(groups = { "rest-api", "networks", "sanity" }) +@Test(groups = { TestGroup.REST_API, TestGroup.NETWORKS, TestGroup.COMMENTS }) public class RestGetNetworkForPersonSanityTests extends RestTest { @@ -40,9 +41,9 @@ public class RestGetNetworkForPersonSanityTests extends RestTest } @Bug(id = "MNT-16904") - @Test(groups = "sanity") - @TestRail(section = { "rest-api", - "networks" }, executionType = ExecutionType.SANITY, description = "Verify non existing user gets another exisiting network with Rest API and checks the forbidden status") + @Test(groups = TestGroup.COMMENTS) + @TestRail(section = { TestGroup.REST_API, + TestGroup.NETWORKS }, executionType = ExecutionType.SANITY, description = "Verify non existing user gets another exisiting network with Rest API and checks the forbidden status") public void nonExistingTenantUserIsNotAuthorizedToRequest() throws Exception { UserModel tenantUser = new UserModel("nonexisting", "password"); @@ -52,9 +53,9 @@ public class RestGetNetworkForPersonSanityTests extends RestTest networkApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.UNAUTHORIZED); } - @Test(groups = "sanity") - @TestRail(section = { "rest-api", - "networks" }, executionType = ExecutionType.SANITY, description = "Verify tenant admin user gets specific network with Rest API and response is not empty") + @Test(groups = TestGroup.COMMENTS) + @TestRail(section = { TestGroup.REST_API, + TestGroup.NETWORKS }, executionType = ExecutionType.SANITY, description = "Verify tenant admin user gets specific network with Rest API and response is not empty") public void adminTenantChecksIfNetworkIsPresent() throws Exception { restClient.authenticateUser(adminTenantUser); @@ -62,9 +63,9 @@ public class RestGetNetworkForPersonSanityTests extends RestTest networkApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @Test(groups = "sanity") - @TestRail(section = { "rest-api", - "networks" }, executionType = ExecutionType.SANITY, description = "Verify tenant user is not authorized to check network of admin user with Rest API and checks the forbidden status") + @Test(groups = TestGroup.COMMENTS) + @TestRail(section = { TestGroup.REST_API, + TestGroup.NETWORKS }, executionType = ExecutionType.SANITY, description = "Verify tenant user is not authorized to check network of admin user with Rest API and checks the forbidden status") public void tenantUserIsNotAuthorizedToCheckNetworkOfAdminUser() throws Exception { restClient.authenticateUser(tenantUser); @@ -72,9 +73,9 @@ public class RestGetNetworkForPersonSanityTests extends RestTest networkApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.NOT_FOUND); } - @Test(groups = "sanity") - @TestRail(section = { "rest-api", - "networks" }, executionType = ExecutionType.SANITY, description = "Verify admin tenant user is not authorized to check network of another user with Rest API and checks the forbidden status") + @Test(groups = TestGroup.COMMENTS) + @TestRail(section = { TestGroup.REST_API, + TestGroup.NETWORKS }, executionType = ExecutionType.SANITY, description = "Verify admin tenant user is not authorized to check network of another user with Rest API and checks the forbidden status") public void adminTenantUserIsNotAuthorizedToCheckNetworkOfAnotherUser() throws Exception { UserModel secondAdminTenantUser = UserModel.getAdminTenantUser(); diff --git a/e2e-test/java/org/alfresco/rest/networks/RestGetNetworkTest.java b/e2e-test/java/org/alfresco/rest/networks/RestGetNetworkTest.java index 977056fde..c750f68d1 100644 --- a/e2e-test/java/org/alfresco/rest/networks/RestGetNetworkTest.java +++ b/e2e-test/java/org/alfresco/rest/networks/RestGetNetworkTest.java @@ -5,6 +5,7 @@ import org.alfresco.rest.requests.RestNetworksApi; import org.alfresco.rest.requests.RestTenantApi; import org.alfresco.utility.constants.UserRole; import org.alfresco.utility.model.SiteModel; +import org.alfresco.utility.model.TestGroup; import org.alfresco.utility.model.UserModel; import org.alfresco.utility.report.Bug; import org.alfresco.utility.testrail.ExecutionType; @@ -17,7 +18,7 @@ import org.testng.annotations.Test; /** * Created by Cristina Axinte on 9/26/2016. */ -@Test(groups = { "rest-api", "networks" }) +@Test(groups = { TestGroup.REST_API, TestGroup.NETWORKS }) public class RestGetNetworkTest extends RestTest { @Autowired @@ -49,9 +50,9 @@ public class RestGetNetworkTest extends RestTest } @Bug(id = "MNT-16904") - @Test(groups = "sanity") - @TestRail(section = { "rest-api", - "networks" }, executionType = ExecutionType.SANITY, description = "Verify non existing user gets another exisiting network with Rest API and checks the forbidden status") + @Test(groups = TestGroup.COMMENTS) + @TestRail(section = { TestGroup.REST_API, + TestGroup.NETWORKS }, executionType = ExecutionType.SANITY, description = "Verify non existing user gets another exisiting network with Rest API and checks the forbidden status") public void nonExistingTenantUserIsNotAuthorizedToRequest() throws Exception { UserModel tenantUser = new UserModel("nonexisting", "password"); @@ -61,9 +62,9 @@ public class RestGetNetworkTest extends RestTest networkApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.UNAUTHORIZED); } - @Test(groups = "sanity") - @TestRail(section = { "rest-api", - "networks" }, executionType = ExecutionType.SANITY, description = "Verify tenant admin user gets specific network with Rest API and response is not empty") + @Test(groups = TestGroup.COMMENTS) + @TestRail(section = { TestGroup.REST_API, + TestGroup.NETWORKS }, executionType = ExecutionType.SANITY, description = "Verify tenant admin user gets specific network with Rest API and response is not empty") public void adminTenantChecksIfNetworkIsPresent() throws Exception { restClient.authenticateUser(adminTenantUser); @@ -71,16 +72,16 @@ public class RestGetNetworkTest extends RestTest networkApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", - "networks" }, description = "Verify tenant admin user gets specific network with Rest API and checks response parameters are correct") + @TestRail(section = { TestGroup.REST_API, + TestGroup.NETWORKS }, description = "Verify tenant admin user gets specific network with Rest API and checks response parameters are correct") public void adminTenantChecksNetworkParamsAreCorrect() throws Exception { restClient.authenticateUser(adminTenantUser); networkApi.getNetwork(adminTenantUser).assertNetworkHasName(adminTenantUser).assertNetworkIsEnabled(); } - @TestRail(section = { "rest-api", - "networks" }, description = "Verify tenant admin user gets non exisiting network with Rest API and checks the not found status") + @TestRail(section = { TestGroup.REST_API, + TestGroup.NETWORKS }, description = "Verify tenant admin user gets non exisiting network with Rest API and checks the not found status") public void adminTenantChecksIfNonExistingNetworkIsNotFound() throws Exception { restClient.authenticateUser(adminTenantUser); @@ -88,8 +89,8 @@ public class RestGetNetworkTest extends RestTest networkApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.NOT_FOUND); } - @TestRail(section = { "rest-api", - "networks" }, description = "Verify tenant admin user gets another exisiting network with Rest API and checks the forbidden status") + @TestRail(section = { TestGroup.REST_API, + TestGroup.NETWORKS }, description = "Verify tenant admin user gets another exisiting network with Rest API and checks the forbidden status") public void adminTenantChecksIfAnotherExistingNetworkIsForbidden() throws Exception { restClient.authenticateUser(adminTenantUser); @@ -97,7 +98,7 @@ public class RestGetNetworkTest extends RestTest networkApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.FORBIDDEN); } - @TestRail(section = { "rest-api", "networks" }, description = "Verify any tenant user gets its network with Rest API and response is not empty") + @TestRail(section = { TestGroup.REST_API, TestGroup.NETWORKS }, description = "Verify any tenant user gets its network with Rest API and response is not empty") public void userTenantChecksIfNetworkIsPresent() throws Exception { restClient.authenticateUser(tenantUser); @@ -105,16 +106,16 @@ public class RestGetNetworkTest extends RestTest networkApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", - "networks" }, description = "Verify any tenant user gets specific network with Rest API and checks response parameters are correct") + @TestRail(section = { TestGroup.REST_API, + TestGroup.NETWORKS }, description = "Verify any tenant user gets specific network with Rest API and checks response parameters are correct") public void userTenantChecksNetworkParamsAreCorrect() throws Exception { restClient.authenticateUser(tenantUser); networkApi.getNetwork(adminTenantUser).assertNetworkHasName(adminTenantUser).assertNetworkIsEnabled(); } - @TestRail(section = { "rest-api", - "networks" }, description = "Verify any tenant user gets non exisiting network with Rest API and checks the not found status") + @TestRail(section = { TestGroup.REST_API, + TestGroup.NETWORKS }, description = "Verify any tenant user gets non exisiting network with Rest API and checks the not found status") public void userTenantChecksIfNonExistingNetworkIsNotFound() throws Exception { restClient.authenticateUser(tenantUser); @@ -122,9 +123,9 @@ public class RestGetNetworkTest extends RestTest networkApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.NOT_FOUND); } - @Test(groups = "sanity") - @TestRail(section = { "rest-api", - "networks" }, description = "Verify any tenant user gets another exisiting network with Rest API and checks the forbidden status") + @Test(groups = TestGroup.COMMENTS) + @TestRail(section = { TestGroup.REST_API, + TestGroup.NETWORKS }, description = "Verify any tenant user gets another exisiting network with Rest API and checks the forbidden status") public void userTenantChecksIfAnotherExistingNetworkIsForbidden() throws Exception { restClient.authenticateUser(tenantUser); @@ -132,9 +133,9 @@ public class RestGetNetworkTest extends RestTest networkApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.FORBIDDEN); } - @Test(groups = "sanity") - @TestRail(section = { "rest-api", - "networks" }, executionType = ExecutionType.SANITY, description = "Verify manager tenant user gets its network with Rest API and response is not empty") + @Test(groups = TestGroup.COMMENTS) + @TestRail(section = { TestGroup.REST_API, + TestGroup.NETWORKS }, executionType = ExecutionType.SANITY, description = "Verify manager tenant user gets its network with Rest API and response is not empty") public void tenantManagerUserChecksIfNetworkIsPresent() throws Exception { UserModel managerTenantUser = dataUser.usingUser(adminTenantUser).createUserWithTenant("manTenant"); @@ -145,9 +146,9 @@ public class RestGetNetworkTest extends RestTest networkApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @Test(groups = "sanity") - @TestRail(section = { "rest-api", - "networks" }, executionType = ExecutionType.SANITY, description = "Verify collaborator tenant user gets its network with Rest API and response is not empty") + @Test(groups = TestGroup.COMMENTS) + @TestRail(section = { TestGroup.REST_API, + TestGroup.NETWORKS }, executionType = ExecutionType.SANITY, description = "Verify collaborator tenant user gets its network with Rest API and response is not empty") public void tenantCollaboratorUserChecksIfNetworkIsPresent() throws Exception { UserModel collaboratorTenantUser = dataUser.usingUser(adminTenantUser).createUserWithTenant("colTenant"); @@ -158,9 +159,9 @@ public class RestGetNetworkTest extends RestTest networkApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @Test(groups = "sanity") - @TestRail(section = { "rest-api", - "networks" }, executionType = ExecutionType.SANITY, description = "Verify consumer tenant user gets its network with Rest API and response is not empty") + @Test(groups = TestGroup.COMMENTS) + @TestRail(section = { TestGroup.REST_API, + TestGroup.NETWORKS }, executionType = ExecutionType.SANITY, description = "Verify consumer tenant user gets its network with Rest API and response is not empty") public void tenantConsumerUserChecksIfNetworkIsPresent() throws Exception { UserModel consumerTenantUser = dataUser.usingUser(adminTenantUser).createUserWithTenant("consTenant"); @@ -171,9 +172,9 @@ public class RestGetNetworkTest extends RestTest networkApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @Test(groups = "sanity") - @TestRail(section = { "rest-api", - "networks" }, executionType = ExecutionType.SANITY, description = "Verify contributor tenant user gets its network with Rest API and response is not empty") + @Test(groups = TestGroup.COMMENTS) + @TestRail(section = { TestGroup.REST_API, + TestGroup.NETWORKS }, executionType = ExecutionType.SANITY, description = "Verify contributor tenant user gets its network with Rest API and response is not empty") public void tenantContributorUserChecksIfItsNetworkIsPresent() throws Exception { UserModel contributorTenantUser = dataUser.usingUser(adminTenantUser).createUserWithTenant("contTenant"); diff --git a/e2e-test/java/org/alfresco/rest/networks/RestGetNetworksForPersonSanityTests.java b/e2e-test/java/org/alfresco/rest/networks/RestGetNetworksForPersonSanityTests.java index 91c153b08..306836a22 100644 --- a/e2e-test/java/org/alfresco/rest/networks/RestGetNetworksForPersonSanityTests.java +++ b/e2e-test/java/org/alfresco/rest/networks/RestGetNetworksForPersonSanityTests.java @@ -3,6 +3,7 @@ package org.alfresco.rest.networks; import org.alfresco.rest.RestTest; import org.alfresco.rest.requests.RestNetworksApi; import org.alfresco.rest.requests.RestTenantApi; +import org.alfresco.utility.model.TestGroup; import org.alfresco.utility.model.UserModel; import org.alfresco.utility.report.Bug; import org.alfresco.utility.testrail.ExecutionType; @@ -12,7 +13,7 @@ import org.springframework.http.HttpStatus; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; -@Test(groups = { "rest-api", "networks", "sanity" }) +@Test(groups = { TestGroup.REST_API, TestGroup.NETWORKS, TestGroup.COMMENTS }) public class RestGetNetworksForPersonSanityTests extends RestTest { @Autowired @@ -39,9 +40,9 @@ public class RestGetNetworksForPersonSanityTests extends RestTest } @Bug(id = "MNT-16904") - @Test(groups = "sanity") - @TestRail(section = { "rest-api", - "networks" }, executionType = ExecutionType.SANITY, description = "Verify non existing user gets another exisiting network with Rest API and checks the forbidden status") + @Test(groups = TestGroup.COMMENTS) + @TestRail(section = { TestGroup.REST_API, + TestGroup.NETWORKS }, executionType = ExecutionType.SANITY, description = "Verify non existing user gets another exisiting network with Rest API and checks the forbidden status") public void nonExistingTenantUserIsNotAuthorizedToRequest() throws Exception { UserModel tenantUser = new UserModel("nonexisting", "password"); @@ -51,9 +52,9 @@ public class RestGetNetworksForPersonSanityTests extends RestTest networkApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.UNAUTHORIZED); } - @Test(groups = "sanity") - @TestRail(section = { "rest-api", - "networks" }, executionType = ExecutionType.SANITY, description = "Verify tenant admin user gets specific network with Rest API and response is not empty") + @Test(groups = TestGroup.COMMENTS) + @TestRail(section = { TestGroup.REST_API, + TestGroup.NETWORKS }, executionType = ExecutionType.SANITY, description = "Verify tenant admin user gets specific network with Rest API and response is not empty") public void adminTenantChecksIfNetworkIsPresent() throws Exception { restClient.authenticateUser(adminTenantUser); @@ -61,9 +62,9 @@ public class RestGetNetworksForPersonSanityTests extends RestTest networkApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @Test(groups = "sanity") - @TestRail(section = { "rest-api", - "networks" }, executionType = ExecutionType.SANITY, description = "Verify tenant user is not authorized to check network of admin user with Rest API and checks the forbidden status") + @Test(groups = TestGroup.COMMENTS) + @TestRail(section = { TestGroup.REST_API, + TestGroup.NETWORKS }, executionType = ExecutionType.SANITY, description = "Verify tenant user is not authorized to check network of admin user with Rest API and checks the forbidden status") public void tenantUserIsNotAuthorizedToCheckNetworkOfAdminUser() throws Exception { restClient.authenticateUser(tenantUser); @@ -71,9 +72,9 @@ public class RestGetNetworksForPersonSanityTests extends RestTest networkApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.NOT_FOUND); } - @Test(groups = "sanity") - @TestRail(section = { "rest-api", - "networks" }, executionType = ExecutionType.SANITY, description = "Verify admin tenant user is not authorized to check network of another user with Rest API and checks the forbidden status") + @Test(groups = TestGroup.COMMENTS) + @TestRail(section = { TestGroup.REST_API, + TestGroup.NETWORKS }, executionType = ExecutionType.SANITY, description = "Verify admin tenant user is not authorized to check network of another user with Rest API and checks the forbidden status") public void adminTenantUserIsNotAuthorizedToCheckNetworkOfAnotherUser() throws Exception { UserModel secondAdminTenantUser = UserModel.getAdminTenantUser(); diff --git a/e2e-test/java/org/alfresco/rest/people/AddFavoriteSiteSanityTests.java b/e2e-test/java/org/alfresco/rest/people/AddFavoriteSiteSanityTests.java index d4895a72a..194077c6b 100644 --- a/e2e-test/java/org/alfresco/rest/people/AddFavoriteSiteSanityTests.java +++ b/e2e-test/java/org/alfresco/rest/people/AddFavoriteSiteSanityTests.java @@ -4,6 +4,7 @@ import org.alfresco.rest.RestTest; import org.alfresco.rest.requests.RestPeopleApi; import org.alfresco.utility.constants.UserRole; import org.alfresco.utility.model.SiteModel; +import org.alfresco.utility.model.TestGroup; import org.alfresco.utility.model.UserModel; import org.alfresco.utility.report.Bug; import org.alfresco.utility.testrail.ExecutionType; @@ -13,7 +14,7 @@ import org.springframework.http.HttpStatus; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; -@Test(groups = { "rest-api", "people", "sanity" }) +@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.COMMENTS }) public class AddFavoriteSiteSanityTests extends RestTest { @Autowired @@ -32,7 +33,7 @@ public class AddFavoriteSiteSanityTests extends RestTest peopleApi.useRestClient(restClient); } - @TestRail(section = { "rest-api", "people" }, executionType = ExecutionType.SANITY, description = "Verify manager user add a favorite site with Rest API and response is successful (201)") + @TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.SANITY, description = "Verify manager user add a favorite site with Rest API and response is successful (201)") public void managerUserAddFavoriteSiteWithSuccess() throws Exception { UserModel managerUser = dataUser.usingAdmin().createRandomTestUser(); @@ -43,7 +44,7 @@ public class AddFavoriteSiteSanityTests extends RestTest peopleApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.CREATED); } - @TestRail(section = { "rest-api", "people" }, executionType = ExecutionType.SANITY, description = "Verify collaborator user add a favorite site with Rest API and response is successful (201)") + @TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.SANITY, description = "Verify collaborator user add a favorite site with Rest API and response is successful (201)") public void collaboratorUserAddFavoriteSiteWithSuccess() throws Exception { UserModel collaboratorUser = dataUser.usingAdmin().createRandomTestUser(); @@ -54,7 +55,7 @@ public class AddFavoriteSiteSanityTests extends RestTest peopleApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.CREATED); } - @TestRail(section = { "rest-api", "people" }, executionType = ExecutionType.SANITY, description = "Verify contributor user add a favorite site with Rest API and response is successful (201)") + @TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.SANITY, description = "Verify contributor user add a favorite site with Rest API and response is successful (201)") public void contributorUserAddFavoriteSiteWithSuccess() throws Exception { UserModel contributorUser = dataUser.usingAdmin().createRandomTestUser(); @@ -65,7 +66,7 @@ public class AddFavoriteSiteSanityTests extends RestTest peopleApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.CREATED); } - @TestRail(section = { "rest-api", "people" }, executionType = ExecutionType.SANITY, description = "Verify consumer user add a favorite site with Rest API and response is successful (201)") + @TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.SANITY, description = "Verify consumer user add a favorite site with Rest API and response is successful (201)") public void consumerUserAddFavoriteSiteWithSuccess() throws Exception { UserModel consumerUser = dataUser.usingAdmin().createRandomTestUser(); @@ -76,7 +77,7 @@ public class AddFavoriteSiteSanityTests extends RestTest peopleApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.CREATED); } - @TestRail(section = { "rest-api", "people" }, executionType = ExecutionType.SANITY, description = "Verify admin user add a favorite site with Rest API and response is successful (201)") + @TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.SANITY, description = "Verify admin user add a favorite site with Rest API and response is successful (201)") public void adminUserAddFavoriteSiteWithSuccess() throws Exception { UserModel adminUser = dataUser.getAdminUser(); @@ -87,7 +88,7 @@ public class AddFavoriteSiteSanityTests extends RestTest } @Bug(id = "MNT-16904") - @TestRail(section = { "rest-api", "people" }, executionType = ExecutionType.SANITY, description = "Verify a manager user is NOT Authorized to add a favorite site with Rest API when authentication fails (401)") + @TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.SANITY, description = "Verify a manager user is NOT Authorized to add a favorite site with Rest API when authentication fails (401)") public void managerUserNotAuthorizedFailsToAddFavoriteSite() throws Exception { UserModel managerUser = dataUser.usingAdmin().createRandomTestUser(); diff --git a/e2e-test/java/org/alfresco/rest/people/AddSiteMembershipRequestSanityTests.java b/e2e-test/java/org/alfresco/rest/people/AddSiteMembershipRequestSanityTests.java index 3011d99c2..92d666594 100644 --- a/e2e-test/java/org/alfresco/rest/people/AddSiteMembershipRequestSanityTests.java +++ b/e2e-test/java/org/alfresco/rest/people/AddSiteMembershipRequestSanityTests.java @@ -9,6 +9,7 @@ import org.alfresco.utility.data.DataUser; import org.alfresco.utility.data.DataUser.ListUserWithRoles; import org.alfresco.utility.exception.DataPreparationException; import org.alfresco.utility.model.SiteModel; +import org.alfresco.utility.model.TestGroup; import org.alfresco.utility.model.UserModel; import org.alfresco.utility.report.Bug; import org.alfresco.utility.testrail.ExecutionType; @@ -18,7 +19,7 @@ import org.springframework.http.HttpStatus; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; -@Test(groups = { "rest-api", "people", "sanity" }) +@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.COMMENTS }) public class AddSiteMembershipRequestSanityTests extends RestTest { @Autowired @@ -46,7 +47,7 @@ public class AddSiteMembershipRequestSanityTests extends RestTest peopleApi.useRestClient(restClient); } - @TestRail(section = { "rest-api", "people" }, + @TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.SANITY, description = "Verify site manager is able to create new site membership request") @Bug(id="MNT-16557") public void siteManagerIsAbleToCreateSiteMembershipRequest() throws JsonToModelConversionException, Exception @@ -58,7 +59,7 @@ public class AddSiteMembershipRequestSanityTests extends RestTest .assertStatusCodeIs(HttpStatus.CREATED); } - @TestRail(section = { "rest-api", "people" }, + @TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.SANITY, description = "Verify site collaborator is able to create new site membership request") @Bug(id = "MNT-16557") public void siteCollaboatorIsAbleToCreateSiteMembershipRequest() throws JsonToModelConversionException, Exception @@ -70,7 +71,7 @@ public class AddSiteMembershipRequestSanityTests extends RestTest .assertStatusCodeIs(HttpStatus.CREATED); } - @TestRail(section = { "rest-api", "people" }, + @TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.SANITY, description = "Verify site contributor is able to create new site membership request") @Bug(id = "MNT-16557") public void siteContributorIsAbleToCreateSiteMembershipRequest() throws JsonToModelConversionException, Exception @@ -82,7 +83,7 @@ public class AddSiteMembershipRequestSanityTests extends RestTest .assertStatusCodeIs(HttpStatus.CREATED); } - @TestRail(section = { "rest-api", "people" }, + @TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.SANITY, description = "Verify site consumer is able to create new site membership request") @Bug(id = "MNT-16557") public void siteConsumerIsAbleToCreateSiteMembershipRequest() throws JsonToModelConversionException, Exception @@ -94,7 +95,7 @@ public class AddSiteMembershipRequestSanityTests extends RestTest .assertStatusCodeIs(HttpStatus.CREATED); } - @TestRail(section = { "rest-api", "people" }, executionType = ExecutionType.SANITY, + @TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.SANITY, description = "Verify admin user is able to create new site membership request") @Bug(id = "MNT-16557") public void adminUserIsAbleToCreateSiteMembershipRequest() throws JsonToModelConversionException, Exception @@ -105,7 +106,7 @@ public class AddSiteMembershipRequestSanityTests extends RestTest peopleApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.CREATED); } - @TestRail(section = { "rest-api", "people" }, + @TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.SANITY, description = "Verify unauthenticated user is not able to create new site membership request") @Bug(id = "MNT-16557") public void unauthenticatedUserIsNotAbleToCreateSiteMembershipRequest() throws JsonToModelConversionException, Exception diff --git a/e2e-test/java/org/alfresco/rest/people/DeleteFavoriteSiteSanityTests.java b/e2e-test/java/org/alfresco/rest/people/DeleteFavoriteSiteSanityTests.java index a707f4e3b..267b75cab 100644 --- a/e2e-test/java/org/alfresco/rest/people/DeleteFavoriteSiteSanityTests.java +++ b/e2e-test/java/org/alfresco/rest/people/DeleteFavoriteSiteSanityTests.java @@ -4,6 +4,7 @@ import org.alfresco.rest.RestTest; import org.alfresco.rest.requests.RestPeopleApi; import org.alfresco.utility.constants.UserRole; import org.alfresco.utility.model.SiteModel; +import org.alfresco.utility.model.TestGroup; import org.alfresco.utility.model.UserModel; import org.alfresco.utility.testrail.ExecutionType; import org.alfresco.utility.testrail.annotation.TestRail; @@ -15,7 +16,7 @@ import org.testng.annotations.Test; /** * @author Cristina Axinte */ -@Test(groups = { "rest-api", "people", "sanity" }) +@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.COMMENTS }) public class DeleteFavoriteSiteSanityTests extends RestTest { @Autowired @@ -36,7 +37,7 @@ public class DeleteFavoriteSiteSanityTests extends RestTest peopleApi.useRestClient(restClient); } - @TestRail(section = { "rest-api", "people" }, executionType = ExecutionType.SANITY, description = "Verify manager user removes a site from its favorite sites list with Rest API and response is successful (204)") + @TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.SANITY, description = "Verify manager user removes a site from its favorite sites list with Rest API and response is successful (204)") public void managerUserRemovesFavoriteSiteWithSuccess() throws Exception { UserModel managerUser = dataUser.usingAdmin().createRandomTestUser(); @@ -49,7 +50,7 @@ public class DeleteFavoriteSiteSanityTests extends RestTest peopleApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.NO_CONTENT); } - @TestRail(section = { "rest-api", "people" }, executionType = ExecutionType.SANITY, description = "Verify collaborator user removes a site from its favorite sites list with Rest API and response is successful (204)") + @TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.SANITY, description = "Verify collaborator user removes a site from its favorite sites list with Rest API and response is successful (204)") public void collaboratorUserRemovesFavoriteSiteWithSuccess() throws Exception { UserModel collaboratorUser = dataUser.usingAdmin().createRandomTestUser(); @@ -62,7 +63,7 @@ public class DeleteFavoriteSiteSanityTests extends RestTest peopleApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.NO_CONTENT); } - @TestRail(section = { "rest-api", "people" }, executionType = ExecutionType.SANITY, description = "Verify contributor user removes a site from its favorite sites list with Rest API and response is successful (204)") + @TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.SANITY, description = "Verify contributor user removes a site from its favorite sites list with Rest API and response is successful (204)") public void contributorUserRemovesFavoriteSiteWithSuccess() throws Exception { UserModel contributorUser = dataUser.usingAdmin().createRandomTestUser(); @@ -75,7 +76,7 @@ public class DeleteFavoriteSiteSanityTests extends RestTest peopleApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.NO_CONTENT); } - @TestRail(section = { "rest-api", "people" }, executionType = ExecutionType.SANITY, description = "Verify consumer user removes a site from its favorite sites list with Rest API and response is successful (204)") + @TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.SANITY, description = "Verify consumer user removes a site from its favorite sites list with Rest API and response is successful (204)") public void consumerUserRemovesFavoriteSiteWithSuccess() throws Exception { UserModel consumerUser = dataUser.usingAdmin().createRandomTestUser(); @@ -88,7 +89,7 @@ public class DeleteFavoriteSiteSanityTests extends RestTest peopleApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.NO_CONTENT); } - @TestRail(section = { "rest-api", "people" }, executionType = ExecutionType.SANITY, description = "Verify admin user removes a site from any user's favorite sites list with Rest API and response is successful (204)") + @TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.SANITY, description = "Verify admin user removes a site from any user's favorite sites list with Rest API and response is successful (204)") public void adminUserRemovesAnyFavoriteSiteWithSuccess() throws Exception { UserModel adminUser = dataUser.getAdminUser(); @@ -101,7 +102,7 @@ public class DeleteFavoriteSiteSanityTests extends RestTest peopleApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.NO_CONTENT); } - @TestRail(section = { "rest-api", "people" }, executionType = ExecutionType.SANITY, description = "Verify a user removes a site from another user's favorite sites list with Rest API and response is permission denied (403)") + @TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.SANITY, description = "Verify a user removes a site from another user's favorite sites list with Rest API and response is permission denied (403)") public void userUserRemovesAnotherUserFavoriteSiteWithSuccess() throws Exception { UserModel userAuth = dataUser.usingAdmin().createRandomTestUser(); @@ -114,7 +115,7 @@ public class DeleteFavoriteSiteSanityTests extends RestTest peopleApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.FORBIDDEN); } - @TestRail(section = { "rest-api", "people" }, executionType = ExecutionType.SANITY, description = "Verify manager user is NOT Authorized to remove a site from its favorite sites list with Rest API when authentication fails (401)") + @TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.SANITY, description = "Verify manager user is NOT Authorized to remove a site from its favorite sites list with Rest API when authentication fails (401)") public void managerUserNotAuthorizedFailsToRemoveFavoriteSite() throws Exception { UserModel managerUser = dataUser.usingAdmin().createRandomTestUser(); diff --git a/e2e-test/java/org/alfresco/rest/people/DeleteSiteMemberSanityTests.java b/e2e-test/java/org/alfresco/rest/people/DeleteSiteMemberSanityTests.java index 1da61496b..fbab60db0 100644 --- a/e2e-test/java/org/alfresco/rest/people/DeleteSiteMemberSanityTests.java +++ b/e2e-test/java/org/alfresco/rest/people/DeleteSiteMemberSanityTests.java @@ -10,6 +10,7 @@ import org.alfresco.utility.data.DataUser; import org.alfresco.utility.data.DataUser.ListUserWithRoles; import org.alfresco.utility.exception.DataPreparationException; import org.alfresco.utility.model.SiteModel; +import org.alfresco.utility.model.TestGroup; import org.alfresco.utility.model.UserModel; import org.alfresco.utility.report.Bug; import org.alfresco.utility.testrail.ExecutionType; @@ -19,7 +20,7 @@ import org.springframework.http.HttpStatus; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; -@Test(groups = { "rest-api", "people", "sanity" }) +@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.COMMENTS }) public class DeleteSiteMemberSanityTests extends RestTest { @Autowired @@ -51,7 +52,7 @@ public class DeleteSiteMemberSanityTests extends RestTest sitesApi.useRestClient(restClient); } - @TestRail(section = { "rest-api", "people" }, + @TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.SANITY, description = "Verify site manager is able to delete another member of the site") public void siteManagerCanDeleteSiteMember() throws JsonToModelConversionException, DataPreparationException, Exception @@ -66,7 +67,7 @@ public class DeleteSiteMemberSanityTests extends RestTest .assertStatusCodeIs(HttpStatus.NO_CONTENT); } - @TestRail(section = { "rest-api", "people" }, + @TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.SANITY, description = "Verify admin user is able to delete another member of the site") public void adminIsAbleToDeleteSiteMember() throws JsonToModelConversionException, DataPreparationException, Exception @@ -81,7 +82,7 @@ public class DeleteSiteMemberSanityTests extends RestTest .assertStatusCodeIs(HttpStatus.NO_CONTENT); } - @TestRail(section = { "rest-api", "people" }, + @TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.SANITY, description = "Verify site collaborator does not have permission to delete another member of the site") @Bug(id="ACE-5444") @@ -97,7 +98,7 @@ public class DeleteSiteMemberSanityTests extends RestTest sitesApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.FORBIDDEN); } - @TestRail(section = { "rest-api", "people" }, + @TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.SANITY, description = "Verify site contributor does not have permission to delete another member of the site") @Bug(id="ACE-5444") @@ -113,7 +114,7 @@ public class DeleteSiteMemberSanityTests extends RestTest sitesApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.FORBIDDEN); } - @TestRail(section = { "rest-api", "people" }, + @TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.SANITY, description = "Verify site consumer does not have permission to delete another member of the site") @Bug(id="ACE-5444") @@ -129,7 +130,7 @@ public class DeleteSiteMemberSanityTests extends RestTest sitesApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.FORBIDDEN); } - @TestRail(section = { "rest-api", "people" }, + @TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.SANITY, description = "Verify unauthenticated user is not able to delete another member of the site") public void unauthenticatedUserIsNotAbleToDeleteSiteMember() throws JsonToModelConversionException, DataPreparationException, Exception diff --git a/e2e-test/java/org/alfresco/rest/people/DeleteSiteMembershipRequestSanityTests.java b/e2e-test/java/org/alfresco/rest/people/DeleteSiteMembershipRequestSanityTests.java index 2c3d2a991..f8f32266b 100644 --- a/e2e-test/java/org/alfresco/rest/people/DeleteSiteMembershipRequestSanityTests.java +++ b/e2e-test/java/org/alfresco/rest/people/DeleteSiteMembershipRequestSanityTests.java @@ -8,6 +8,7 @@ import org.alfresco.utility.data.DataUser.ListUserWithRoles; import org.alfresco.utility.data.RandomData; import org.alfresco.utility.exception.DataPreparationException; import org.alfresco.utility.model.SiteModel; +import org.alfresco.utility.model.TestGroup; import org.alfresco.utility.model.UserModel; import org.alfresco.utility.report.Bug; import org.alfresco.utility.testrail.ExecutionType; @@ -21,7 +22,7 @@ import org.testng.annotations.Test; /** * @author iulia.cojocea */ -@Test(groups = {"rest-api", "people", "sanity" }) +@Test(groups = {TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.COMMENTS }) public class DeleteSiteMembershipRequestSanityTests extends RestTest { @Autowired @@ -42,7 +43,7 @@ public class DeleteSiteMembershipRequestSanityTests extends RestTest peopleApi.useRestClient(restClient); } - @TestRail(section = {"rest-api", "people" }, executionType = ExecutionType.SANITY, + @TestRail(section = {TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.SANITY, description = "Verify one user is able to delete his one site memebership request") public void userCanDeleteHisOwnSiteMembershipRequest() throws JsonToModelConversionException, DataPreparationException, Exception { @@ -56,7 +57,7 @@ public class DeleteSiteMembershipRequestSanityTests extends RestTest } @Bug(id="MNT-16916") - @TestRail(section = {"rest-api", "people" }, executionType = ExecutionType.SANITY, + @TestRail(section = {TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.SANITY, description = "Verify site manager is able to delete site membership request") public void siteManagerCanDeleteSiteMembershipRequest() throws JsonToModelConversionException, DataPreparationException, Exception { @@ -69,7 +70,7 @@ public class DeleteSiteMembershipRequestSanityTests extends RestTest } @Bug(id="MNT-16916") - @TestRail(section = {"rest-api", "people" }, executionType = ExecutionType.SANITY, + @TestRail(section = {TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.SANITY, description = "Verify admin user is able to delete site memebership request") public void adminUserCanDeleteSiteMembershipRequest() throws JsonToModelConversionException, DataPreparationException, Exception { @@ -84,7 +85,7 @@ public class DeleteSiteMembershipRequestSanityTests extends RestTest } @Bug(id="MNT-16916") - @TestRail(section = {"rest-api", "people" }, executionType = ExecutionType.SANITY, + @TestRail(section = {TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.SANITY, description = "Verify collaborator user is not able to delete site memebership request") public void collaboratorCannotDeleteSiteMembershipRequest() throws JsonToModelConversionException, DataPreparationException, Exception { @@ -97,7 +98,7 @@ public class DeleteSiteMembershipRequestSanityTests extends RestTest } @Bug(id="MNT-16916") - @TestRail(section = {"rest-api", "people" }, executionType = ExecutionType.SANITY, + @TestRail(section = {TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.SANITY, description = "Verify contributor user is not able to delete site memebership request") public void contributorCannotDeleteSiteMembershipRequest() throws JsonToModelConversionException, DataPreparationException, Exception { @@ -110,7 +111,7 @@ public class DeleteSiteMembershipRequestSanityTests extends RestTest } @Bug(id="MNT-16916") - @TestRail(section = {"rest-api", "people" }, executionType = ExecutionType.SANITY, + @TestRail(section = {TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.SANITY, description = "Verify consumer user is not able to delete site memebership request") public void consumerCannotDeleteSiteMembershipRequest() throws JsonToModelConversionException, DataPreparationException, Exception { @@ -123,7 +124,7 @@ public class DeleteSiteMembershipRequestSanityTests extends RestTest } @Bug(id="MNT-16916") - @TestRail(section = {"rest-api", "people" }, executionType = ExecutionType.SANITY, + @TestRail(section = {TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.SANITY, description = "Verify random user is not able to delete site memebership request") public void randomUserCanDeleteSiteMembershipRequest() throws JsonToModelConversionException, DataPreparationException, Exception { @@ -136,7 +137,7 @@ public class DeleteSiteMembershipRequestSanityTests extends RestTest peopleApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.FORBIDDEN); } - @TestRail(section = { "rest-api", "sites" }, executionType = ExecutionType.SANITY, + @TestRail(section = { TestGroup.REST_API, TestGroup.SITES }, executionType = ExecutionType.SANITY, description = "Failed authentication get site member call returns status code 401") public void unauthenticatedUserIsNotAuthorizedToDeleteSiteMmebershipRequest() throws JsonToModelConversionException, Exception { diff --git a/e2e-test/java/org/alfresco/rest/people/GetFavoriteSiteSanityTests.java b/e2e-test/java/org/alfresco/rest/people/GetFavoriteSiteSanityTests.java index 90ab0b2cc..d6b38605f 100644 --- a/e2e-test/java/org/alfresco/rest/people/GetFavoriteSiteSanityTests.java +++ b/e2e-test/java/org/alfresco/rest/people/GetFavoriteSiteSanityTests.java @@ -4,6 +4,7 @@ import org.alfresco.rest.RestTest; import org.alfresco.rest.requests.RestPeopleApi; import org.alfresco.utility.constants.UserRole; import org.alfresco.utility.model.SiteModel; +import org.alfresco.utility.model.TestGroup; import org.alfresco.utility.model.UserModel; import org.alfresco.utility.report.Bug; import org.alfresco.utility.testrail.ExecutionType; @@ -19,7 +20,7 @@ import org.testng.annotations.Test; * @author Cristina Axinte * */ -@Test(groups = { "rest-api", "people", "sanity" }) +@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.COMMENTS }) public class GetFavoriteSiteSanityTests extends RestTest { @Autowired @@ -40,7 +41,7 @@ public class GetFavoriteSiteSanityTests extends RestTest peopleApi.useRestClient(restClient); } - @TestRail(section = { "rest-api", "people" }, executionType = ExecutionType.SANITY, description = "Verify manager user gets its specific favorite site with Rest API and response is successful (200)") + @TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.SANITY, description = "Verify manager user gets its specific favorite site with Rest API and response is successful (200)") public void managerUserGetsFavoriteSiteWithSuccess() throws Exception { UserModel managerUser = dataUser.usingAdmin().createRandomTestUser(); @@ -53,7 +54,7 @@ public class GetFavoriteSiteSanityTests extends RestTest peopleApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", "people" }, executionType = ExecutionType.SANITY, description = "Verify collaborator user gets its specific favorite site with Rest API and response is successful (200)") + @TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.SANITY, description = "Verify collaborator user gets its specific favorite site with Rest API and response is successful (200)") public void collaboratorUserGetsFavoriteSiteWithSuccess() throws Exception { UserModel collaboratorUser = dataUser.usingAdmin().createRandomTestUser(); @@ -66,7 +67,7 @@ public class GetFavoriteSiteSanityTests extends RestTest peopleApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", "people" }, executionType = ExecutionType.SANITY, description = "Verify contributor user gets its specific favorite site with Rest API and response is successful (200)") + @TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.SANITY, description = "Verify contributor user gets its specific favorite site with Rest API and response is successful (200)") public void contributorUserGetsFavoriteSiteWithSuccess() throws Exception { UserModel contributorUser = dataUser.usingAdmin().createRandomTestUser(); @@ -79,7 +80,7 @@ public class GetFavoriteSiteSanityTests extends RestTest peopleApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", "people" }, executionType = ExecutionType.SANITY, description = "Verify consumer user gets its specific favorite site with Rest API and response is successful (200)") + @TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.SANITY, description = "Verify consumer user gets its specific favorite site with Rest API and response is successful (200)") public void consumerUserGetsFavoriteSiteWithSuccess() throws Exception { UserModel consumerUser = dataUser.usingAdmin().createRandomTestUser(); @@ -92,7 +93,7 @@ public class GetFavoriteSiteSanityTests extends RestTest peopleApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", "people" }, executionType = ExecutionType.SANITY, description = "Verify admin user gets specific favorite site of any user with Rest API and response is successful (200)") + @TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.SANITY, description = "Verify admin user gets specific favorite site of any user with Rest API and response is successful (200)") public void adminUserGetsAnyFavoriteSiteWithSuccess() throws Exception { UserModel adminUset = dataUser.getAdminUser(); @@ -105,7 +106,7 @@ public class GetFavoriteSiteSanityTests extends RestTest peopleApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", "people" }, executionType = ExecutionType.SANITY, description = "Verify manager user fails to get specific favorite site of another user with Rest API and response is successful (403)") + @TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.SANITY, description = "Verify manager user fails to get specific favorite site of another user with Rest API and response is successful (403)") public void managerUserFailsToGetFavoriteSiteOfAnotherUser() throws Exception { UserModel managerUser = dataUser.usingAdmin().createRandomTestUser(); @@ -119,7 +120,7 @@ public class GetFavoriteSiteSanityTests extends RestTest } @Bug(id = "MNT-16904") - @TestRail(section = { "rest-api", "people" }, executionType = ExecutionType.SANITY, description = "Verify manager user is NOT Authorized gets its specific favorite site with Rest API when authentication fails (401)") + @TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.SANITY, description = "Verify manager user is NOT Authorized gets its specific favorite site with Rest API when authentication fails (401)") public void managerUserNotAuthorizedFailsToGetFavoriteSite() throws Exception { UserModel managerUser = dataUser.usingAdmin().createRandomTestUser(); diff --git a/e2e-test/java/org/alfresco/rest/people/GetFavoriteSitesSanityTests.java b/e2e-test/java/org/alfresco/rest/people/GetFavoriteSitesSanityTests.java index 7e2716413..b04ca65cc 100644 --- a/e2e-test/java/org/alfresco/rest/people/GetFavoriteSitesSanityTests.java +++ b/e2e-test/java/org/alfresco/rest/people/GetFavoriteSitesSanityTests.java @@ -4,6 +4,7 @@ import org.alfresco.rest.RestTest; import org.alfresco.rest.requests.RestPeopleApi; import org.alfresco.utility.constants.UserRole; import org.alfresco.utility.model.SiteModel; +import org.alfresco.utility.model.TestGroup; import org.alfresco.utility.model.UserModel; import org.alfresco.utility.report.Bug; import org.alfresco.utility.testrail.ExecutionType; @@ -13,7 +14,7 @@ import org.springframework.http.HttpStatus; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; -@Test(groups = { "rest-api", "people", "sanity" }) +@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.COMMENTS }) public class GetFavoriteSitesSanityTests extends RestTest { @Autowired @@ -32,7 +33,7 @@ public class GetFavoriteSitesSanityTests extends RestTest peopleApi.useRestClient(restClient); } - @TestRail(section = { "rest-api", "people" }, executionType = ExecutionType.SANITY, description = "Verify manager user fails to get an user favorite sites with Rest API (403)") + @TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.SANITY, description = "Verify manager user fails to get an user favorite sites with Rest API (403)") public void managerUserFailsToGetAnUserFavoriteSites() throws Exception { UserModel managerUser = dataUser.usingAdmin().createRandomTestUser(); @@ -45,7 +46,7 @@ public class GetFavoriteSitesSanityTests extends RestTest peopleApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.FORBIDDEN); } - @TestRail(section = { "rest-api", "people" }, executionType = ExecutionType.SANITY, description = "Verify collaborator user fails to get an user favorite sites with Rest API (403)") + @TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.SANITY, description = "Verify collaborator user fails to get an user favorite sites with Rest API (403)") public void collaboratorUserFailsToGetAnUserFavoriteSites() throws Exception { UserModel collaboratorUser = dataUser.usingAdmin().createRandomTestUser(); @@ -59,7 +60,7 @@ public class GetFavoriteSitesSanityTests extends RestTest peopleApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.FORBIDDEN); } - @TestRail(section = { "rest-api", "people" }, executionType = ExecutionType.SANITY, description = "Verify contributor user fails to get an user favorite sites with Rest API (403)") + @TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.SANITY, description = "Verify contributor user fails to get an user favorite sites with Rest API (403)") public void contributorUserFailsToGetAnUserFavoriteSites() throws Exception { UserModel contributorUser = dataUser.usingAdmin().createRandomTestUser(); @@ -73,7 +74,7 @@ public class GetFavoriteSitesSanityTests extends RestTest peopleApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.FORBIDDEN); } - @TestRail(section = { "rest-api", "people" }, executionType = ExecutionType.SANITY, description = "Verify consumer user fails to get an user favorite sites with Rest API (403)") + @TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.SANITY, description = "Verify consumer user fails to get an user favorite sites with Rest API (403)") public void consumerUserFailsToGetAnUserFavoriteSites() throws Exception { UserModel consumerUser = dataUser.usingAdmin().createRandomTestUser(); @@ -87,7 +88,7 @@ public class GetFavoriteSitesSanityTests extends RestTest peopleApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.FORBIDDEN); } - @TestRail(section = { "rest-api", "people" }, executionType = ExecutionType.SANITY, description = "Verify admin user gets its favorite sites with Rest API and response is successful (200)") + @TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.SANITY, description = "Verify admin user gets its favorite sites with Rest API and response is successful (200)") public void adminUserGetsFavoriteSitesWithSuccess() throws Exception { UserModel adminUser = dataUser.getAdminUser(); @@ -99,7 +100,7 @@ public class GetFavoriteSitesSanityTests extends RestTest peopleApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", "people" }, executionType = ExecutionType.SANITY, description = "Verify any user gets its own user favorite sites with Rest API and response is successful (200)") + @TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.SANITY, description = "Verify any user gets its own user favorite sites with Rest API and response is successful (200)") public void anyUserGetsItsUserFavoriteSites() throws Exception { UserModel anyUser = dataUser.usingAdmin().createRandomTestUser(); @@ -111,7 +112,7 @@ public class GetFavoriteSitesSanityTests extends RestTest } @Bug(id = "MNT-16904") - @TestRail(section = { "rest-api", "people" }, executionType = ExecutionType.SANITY, description = "Verify any user is NOT Authorized to get its favorite sites with Rest API when authentication fails (401)") + @TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.SANITY, description = "Verify any user is NOT Authorized to get its favorite sites with Rest API when authentication fails (401)") public void anyUserNotAuthenticatedIsNotAuthorizedToGetFavoriteSites() throws Exception { UserModel anyUser = dataUser.usingAdmin().createRandomTestUser(); diff --git a/e2e-test/java/org/alfresco/rest/people/GetPeopleActivitiesSanityTests.java b/e2e-test/java/org/alfresco/rest/people/GetPeopleActivitiesSanityTests.java index fd6a0c34c..22565c701 100644 --- a/e2e-test/java/org/alfresco/rest/people/GetPeopleActivitiesSanityTests.java +++ b/e2e-test/java/org/alfresco/rest/people/GetPeopleActivitiesSanityTests.java @@ -5,6 +5,7 @@ import org.alfresco.rest.RestTest; import org.alfresco.rest.requests.RestPeopleApi; import org.alfresco.utility.constants.UserRole; import org.alfresco.utility.model.SiteModel; +import org.alfresco.utility.model.TestGroup; import org.alfresco.utility.model.UserModel; import org.alfresco.utility.report.Bug; import org.alfresco.utility.testrail.ExecutionType; @@ -20,7 +21,7 @@ import org.testng.annotations.Test; * Tests for getActivities (/people/{personId}/activities) RestAPI call * */ -@Test(groups = { "rest-api", "people", "activities", "sanity" }) +@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, "activities", TestGroup.COMMENTS }) public class GetPeopleActivitiesSanityTests extends RestTest { @Autowired @@ -40,7 +41,7 @@ public class GetPeopleActivitiesSanityTests extends RestTest peopleApi.useRestClient(restClient); } - @TestRail(section = { "rest-api", "people", "activities" }, executionType = ExecutionType.SANITY, description = "Verify manager user gets its activities with Rest API and response is successful") + @TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE, "activities" }, executionType = ExecutionType.SANITY, description = "Verify manager user gets its activities with Rest API and response is successful") public void managerUserShouldGetPeopleActivitiesList() throws Exception { UserModel managerUser = dataUser.usingAdmin().createRandomTestUser(); @@ -52,7 +53,7 @@ public class GetPeopleActivitiesSanityTests extends RestTest peopleApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", "people", "activities" }, executionType = ExecutionType.SANITY, description = "Verify collaborator user gets its activities with Rest API and response is successful") + @TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE, "activities" }, executionType = ExecutionType.SANITY, description = "Verify collaborator user gets its activities with Rest API and response is successful") public void collaboratorUserShouldGetPeopleActivitiesList() throws Exception { UserModel collaboratorUser = dataUser.usingAdmin().createRandomTestUser(); @@ -64,7 +65,7 @@ public class GetPeopleActivitiesSanityTests extends RestTest peopleApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", "people", "activities" }, executionType = ExecutionType.SANITY, description = "Verify contributor user gets its activities with Rest API and response is successful") + @TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE, "activities" }, executionType = ExecutionType.SANITY, description = "Verify contributor user gets its activities with Rest API and response is successful") public void contributorUserShouldGetPeopleActivitiesList() throws Exception { UserModel contributorUser = dataUser.usingAdmin().createRandomTestUser(); @@ -76,7 +77,7 @@ public class GetPeopleActivitiesSanityTests extends RestTest peopleApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", "people", "activities" }, executionType = ExecutionType.SANITY, description = "Verify consumer user gets its activities with Rest API and response is successful") + @TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE, "activities" }, executionType = ExecutionType.SANITY, description = "Verify consumer user gets its activities with Rest API and response is successful") public void consumerUserShouldGetPeopleActivitiesList() throws Exception { UserModel consumerUser = dataUser.usingAdmin().createRandomTestUser(); @@ -87,7 +88,7 @@ public class GetPeopleActivitiesSanityTests extends RestTest peopleApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", "people", "activities" }, executionType = ExecutionType.SANITY, description = "Verify admin user gets another user activities with Rest API and response is successful") + @TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE, "activities" }, executionType = ExecutionType.SANITY, description = "Verify admin user gets another user activities with Rest API and response is successful") public void adminUserShouldGetPeopleActivitiesList() throws Exception { restClient.authenticateUser(dataUser.getAdminUser()); @@ -96,7 +97,7 @@ public class GetPeopleActivitiesSanityTests extends RestTest } @Bug(id = "MNT-16904") - @TestRail(section = { "rest-api", "people", "activities" }, executionType = ExecutionType.SANITY, description = "Verify manager user is NOT Authorized to gets another user activities with Rest API") + @TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE, "activities" }, executionType = ExecutionType.SANITY, description = "Verify manager user is NOT Authorized to gets another user activities with Rest API") public void managerUserShouldGetPeopleActivitiesListIsNotAuthorized() throws Exception { UserModel managerUser = dataUser.usingAdmin().createRandomTestUser(); diff --git a/e2e-test/java/org/alfresco/rest/people/GetPeoplePreferenceSanityTests.java b/e2e-test/java/org/alfresco/rest/people/GetPeoplePreferenceSanityTests.java index 80bb706af..c156ca29b 100644 --- a/e2e-test/java/org/alfresco/rest/people/GetPeoplePreferenceSanityTests.java +++ b/e2e-test/java/org/alfresco/rest/people/GetPeoplePreferenceSanityTests.java @@ -5,6 +5,7 @@ import org.alfresco.rest.requests.RestPeopleApi; import org.alfresco.utility.constants.PreferenceName; import org.alfresco.utility.constants.UserRole; import org.alfresco.utility.model.SiteModel; +import org.alfresco.utility.model.TestGroup; import org.alfresco.utility.model.UserModel; import org.alfresco.utility.report.Bug; import org.alfresco.utility.testrail.ExecutionType; @@ -20,7 +21,7 @@ import org.testng.annotations.Test; * @author Cristina Axinte * */ -@Test(groups = { "rest-api", "people", "preferences", "sanity" }) +@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, "preferences", TestGroup.COMMENTS }) public class GetPeoplePreferenceSanityTests extends RestTest { @Autowired @@ -38,7 +39,7 @@ public class GetPeoplePreferenceSanityTests extends RestTest peopleApi.useRestClient(restClient); } - @TestRail(section = { "rest-api", "people", "preferences" }, executionType = ExecutionType.SANITY, description = "Verify manager user gets a specific preference with Rest API and response is successful (200)") + @TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE, "preferences" }, executionType = ExecutionType.SANITY, description = "Verify manager user gets a specific preference with Rest API and response is successful (200)") public void managerUserGetsAPreferenceWithSuccess() throws Exception { UserModel managerUser = dataUser.usingAdmin().createRandomTestUser(); @@ -50,7 +51,7 @@ public class GetPeoplePreferenceSanityTests extends RestTest peopleApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", "people", "preferences" }, executionType = ExecutionType.SANITY, description = "Verify collaborator user gets a specific preference with Rest API and response is successful (200)") + @TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE, "preferences" }, executionType = ExecutionType.SANITY, description = "Verify collaborator user gets a specific preference with Rest API and response is successful (200)") public void collaboratorUserGetsAPreferenceWithSuccess() throws Exception { UserModel collaboratorUser = dataUser.usingAdmin().createRandomTestUser(); @@ -62,7 +63,7 @@ public class GetPeoplePreferenceSanityTests extends RestTest peopleApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", "people", "preferences" }, executionType = ExecutionType.SANITY, description = "Verify contributor user gets a specific preference with Rest API and response is successful (200)") + @TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE, "preferences" }, executionType = ExecutionType.SANITY, description = "Verify contributor user gets a specific preference with Rest API and response is successful (200)") public void contributorUserGetsAPreferenceWithSuccess() throws Exception { UserModel contributorUser = dataUser.usingAdmin().createRandomTestUser(); @@ -74,7 +75,7 @@ public class GetPeoplePreferenceSanityTests extends RestTest peopleApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", "people", "preferences" }, executionType = ExecutionType.SANITY, description = "Verify consumer user gets a specific preference with Rest API and response is successful (200)") + @TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE, "preferences" }, executionType = ExecutionType.SANITY, description = "Verify consumer user gets a specific preference with Rest API and response is successful (200)") public void consumerUserGetsAPreferenceWithSuccess() throws Exception { UserModel consumerUser = dataUser.usingAdmin().createRandomTestUser(); @@ -86,7 +87,7 @@ public class GetPeoplePreferenceSanityTests extends RestTest peopleApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", "people", "preferences" }, executionType = ExecutionType.SANITY, description = "Verify admin user gets a specific preference with Rest API and response is successful (200)") + @TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE, "preferences" }, executionType = ExecutionType.SANITY, description = "Verify admin user gets a specific preference with Rest API and response is successful (200)") public void adminUserGetsAPreferenceWithSuccess() throws Exception { UserModel adminUser = dataUser.getAdminUser(); @@ -98,7 +99,7 @@ public class GetPeoplePreferenceSanityTests extends RestTest } @Bug(id = "MNT-16904") - @TestRail(section = { "rest-api", "people", "preferences" }, executionType = ExecutionType.SANITY, description = "Verify manager user is NOT Authorized to get a specific preference with Rest API when authentication fails (401)") + @TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE, "preferences" }, executionType = ExecutionType.SANITY, description = "Verify manager user is NOT Authorized to get a specific preference with Rest API when authentication fails (401)") public void managerUserNotAuthorizedFailsToGetsAPreference() throws Exception { UserModel managerUser = dataUser.usingAdmin().createRandomTestUser(); diff --git a/e2e-test/java/org/alfresco/rest/people/GetPeoplePreferencesSanityTests.java b/e2e-test/java/org/alfresco/rest/people/GetPeoplePreferencesSanityTests.java index a59284ea5..33eb8d4c4 100644 --- a/e2e-test/java/org/alfresco/rest/people/GetPeoplePreferencesSanityTests.java +++ b/e2e-test/java/org/alfresco/rest/people/GetPeoplePreferencesSanityTests.java @@ -4,6 +4,7 @@ import org.alfresco.rest.RestTest; import org.alfresco.rest.requests.RestPeopleApi; import org.alfresco.utility.constants.UserRole; import org.alfresco.utility.model.SiteModel; +import org.alfresco.utility.model.TestGroup; import org.alfresco.utility.model.UserModel; import org.alfresco.utility.report.Bug; import org.alfresco.utility.testrail.ExecutionType; @@ -19,7 +20,7 @@ import org.testng.annotations.Test; * @author Cristina Axinte * */ -@Test(groups = { "rest-api", "people", "preferences", "sanity" }) +@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, "preferences", TestGroup.COMMENTS }) public class GetPeoplePreferencesSanityTests extends RestTest { @Autowired @@ -37,7 +38,7 @@ public class GetPeoplePreferencesSanityTests extends RestTest peopleApi.useRestClient(restClient); } - @TestRail(section = { "rest-api", "people", "preferences" }, executionType = ExecutionType.SANITY, description = "Verify manager user gets its preferences with Rest API and response is successful (200)") + @TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE, "preferences" }, executionType = ExecutionType.SANITY, description = "Verify manager user gets its preferences with Rest API and response is successful (200)") public void managerUserGetsPeoplePreferencesWithSuccess() throws Exception { UserModel managerUser = dataUser.usingAdmin().createRandomTestUser(); @@ -49,7 +50,7 @@ public class GetPeoplePreferencesSanityTests extends RestTest peopleApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", "people", "preferences" }, executionType = ExecutionType.SANITY, description = "Verify collaborator user gets its preferences with Rest API and response is successful (200)") + @TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE, "preferences" }, executionType = ExecutionType.SANITY, description = "Verify collaborator user gets its preferences with Rest API and response is successful (200)") public void collaboratorUserGetsPeoplePreferencesWithSuccess() throws Exception { UserModel collaboratorUser = dataUser.usingAdmin().createRandomTestUser(); @@ -61,7 +62,7 @@ public class GetPeoplePreferencesSanityTests extends RestTest peopleApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", "people", "preferences" }, executionType = ExecutionType.SANITY, description = "Verify contributor user gets its preferences with Rest API and response is successful (200)") + @TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE, "preferences" }, executionType = ExecutionType.SANITY, description = "Verify contributor user gets its preferences with Rest API and response is successful (200)") public void contributorUserGetsPeoplePreferencesWithSuccess() throws Exception { UserModel contributorUser = dataUser.usingAdmin().createRandomTestUser(); @@ -73,7 +74,7 @@ public class GetPeoplePreferencesSanityTests extends RestTest peopleApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", "people", "preferences" }, executionType = ExecutionType.SANITY, description = "Verify consumer user gets its preferences with Rest API and response is successful (200)") + @TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE, "preferences" }, executionType = ExecutionType.SANITY, description = "Verify consumer user gets its preferences with Rest API and response is successful (200)") public void consumerUserGetsPeoplePreferencesWithSuccess() throws Exception { UserModel consumerUser = dataUser.usingAdmin().createRandomTestUser(); @@ -85,7 +86,7 @@ public class GetPeoplePreferencesSanityTests extends RestTest peopleApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", "people", "preferences" }, executionType = ExecutionType.SANITY, description = "Verify admin user gets another user preferences with Rest API and response is successful (200)") + @TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE, "preferences" }, executionType = ExecutionType.SANITY, description = "Verify admin user gets another user preferences with Rest API and response is successful (200)") public void adminUserGetsPeoplePreferencesWithSuccess() throws Exception { UserModel managerUser = dataUser.usingAdmin().createRandomTestUser(); @@ -99,7 +100,7 @@ public class GetPeoplePreferencesSanityTests extends RestTest } @Bug(id = "MNT-16904") - @TestRail(section = { "rest-api", "people", "preferences" }, executionType = ExecutionType.SANITY, description = "Verify manager user is NOT Authorized to gets its preferences with Rest API when authentication fails(401)") + @TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE, "preferences" }, executionType = ExecutionType.SANITY, description = "Verify manager user is NOT Authorized to gets its preferences with Rest API when authentication fails(401)") public void managerUserGetsPeoplePreferencesIsNotAUthorized() throws Exception { UserModel managerUser = dataUser.usingAdmin().createRandomTestUser(); diff --git a/e2e-test/java/org/alfresco/rest/people/GetPeopleSanityTests.java b/e2e-test/java/org/alfresco/rest/people/GetPeopleSanityTests.java index 416e5d2b9..f5f6d7f1b 100644 --- a/e2e-test/java/org/alfresco/rest/people/GetPeopleSanityTests.java +++ b/e2e-test/java/org/alfresco/rest/people/GetPeopleSanityTests.java @@ -5,6 +5,7 @@ import org.alfresco.rest.requests.RestPeopleApi; import org.alfresco.utility.constants.UserRole; import org.alfresco.utility.data.DataUser; import org.alfresco.utility.model.SiteModel; +import org.alfresco.utility.model.TestGroup; import org.alfresco.utility.model.UserModel; import org.alfresco.utility.testrail.ExecutionType; import org.alfresco.utility.testrail.annotation.TestRail; @@ -13,7 +14,7 @@ import org.springframework.http.HttpStatus; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; -@Test(groups = { "rest-api", "people", "sanity" }) +@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.COMMENTS }) public class GetPeopleSanityTests extends RestTest { @Autowired @@ -33,7 +34,7 @@ public class GetPeopleSanityTests extends RestTest peopleApi.useRestClient(restClient); } - @TestRail(section = { "rest-api", "people" }, executionType = ExecutionType.SANITY, description = "Verify manager user gets a person with Rest API and response is successful") + @TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.SANITY, description = "Verify manager user gets a person with Rest API and response is successful") public void managerUserChecksIfPersonIsPresent() throws Exception { UserModel managerUser = dataUser.usingAdmin().createRandomTestUser(); @@ -44,7 +45,7 @@ public class GetPeopleSanityTests extends RestTest peopleApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", "people" }, executionType = ExecutionType.SANITY, description = "Verify collaborator user gets a person with Rest API and response is successful") + @TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.SANITY, description = "Verify collaborator user gets a person with Rest API and response is successful") public void collaboratorUserChecksIfPersonIsPresent() throws Exception { UserModel collaboratorUser = dataUser.usingAdmin().createRandomTestUser(); @@ -55,8 +56,8 @@ public class GetPeopleSanityTests extends RestTest peopleApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @Test(groups = "sanity") - @TestRail(section = { "rest-api", "people" }, executionType = ExecutionType.SANITY, description = "Verify contributor user gets a person with Rest API and response is successful") + @Test(groups = TestGroup.COMMENTS) + @TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.SANITY, description = "Verify contributor user gets a person with Rest API and response is successful") public void contributorUserChecksIfPersonIsPresent() throws Exception { UserModel contributorUser = dataUser.usingAdmin().createRandomTestUser(); @@ -67,7 +68,7 @@ public class GetPeopleSanityTests extends RestTest peopleApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", "people" }, executionType = ExecutionType.SANITY, description = "Verify consumer user gets a person with Rest API and response is successful") + @TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.SANITY, description = "Verify consumer user gets a person with Rest API and response is successful") public void consumerUserChecksIfPersonIsPresent() throws Exception { UserModel consumerUser = dataUser.usingAdmin().createRandomTestUser(); @@ -78,7 +79,7 @@ public class GetPeopleSanityTests extends RestTest peopleApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", "people" }, executionType = ExecutionType.SANITY, description = "Verify admin user gets a person with Rest API and response is successful") + @TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.SANITY, description = "Verify admin user gets a person with Rest API and response is successful") public void adminUserChecksIfPersonIsPresent() throws Exception { UserModel adminUser = dataUser.getAdminUser(); @@ -88,7 +89,7 @@ public class GetPeopleSanityTests extends RestTest peopleApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @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") + @TestRail(section = { TestGroup.REST_API, TestGroup.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 { UserModel managerUser = dataUser.usingAdmin().createRandomTestUser(); diff --git a/e2e-test/java/org/alfresco/rest/people/GetSiteMembershipRequestSanityTests.java b/e2e-test/java/org/alfresco/rest/people/GetSiteMembershipRequestSanityTests.java index 3342c087a..1618b9622 100644 --- a/e2e-test/java/org/alfresco/rest/people/GetSiteMembershipRequestSanityTests.java +++ b/e2e-test/java/org/alfresco/rest/people/GetSiteMembershipRequestSanityTests.java @@ -9,6 +9,7 @@ import org.alfresco.utility.data.DataUser; import org.alfresco.utility.data.DataUser.ListUserWithRoles; import org.alfresco.utility.exception.DataPreparationException; import org.alfresco.utility.model.SiteModel; +import org.alfresco.utility.model.TestGroup; import org.alfresco.utility.model.UserModel; import org.alfresco.utility.report.Bug; import org.alfresco.utility.testrail.ExecutionType; @@ -18,7 +19,7 @@ import org.springframework.http.HttpStatus; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; -@Test(groups = { "rest-api", "people", "sanity" }) +@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.COMMENTS }) public class GetSiteMembershipRequestSanityTests extends RestTest { @Autowired @@ -46,7 +47,7 @@ public class GetSiteMembershipRequestSanityTests extends RestTest peopleApi.useRestClient(restClient); } - @TestRail(section = { "rest-api","people" }, + @TestRail(section = { TestGroup.REST_API,TestGroup.PEOPLE }, executionType = ExecutionType.SANITY, description = "Verify site manager is able to retrieve site membership request") @Bug(id="MNT-16557") public void siteManagerIsAbleToRetrieveSiteMembershipRequest() throws JsonToModelConversionException, Exception @@ -60,7 +61,7 @@ public class GetSiteMembershipRequestSanityTests extends RestTest .assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", "people" }, + @TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.SANITY, description = "Verify site collaborator is able to retrieve site membership request") @Bug(id = "MNT-16557") public void siteCollaboratorIsAbleToRetrieveSiteMembershipRequest() throws JsonToModelConversionException, Exception @@ -74,7 +75,7 @@ public class GetSiteMembershipRequestSanityTests extends RestTest .assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", "people" }, + @TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.SANITY, description = "Verify site contributor is able to retrieve site membership request") @Bug(id = "MNT-16557") public void siteContributorIsAbleToRetrieveSiteMembershipRequest() throws JsonToModelConversionException, Exception @@ -88,7 +89,7 @@ public class GetSiteMembershipRequestSanityTests extends RestTest .assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", "people" }, + @TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.SANITY, description = "Verify site consumer is able to retrieve site membership request") @Bug(id = "MNT-16557") public void siteConsumerIsAbleToRetrieveSiteMembershipRequest() throws JsonToModelConversionException, Exception @@ -102,7 +103,7 @@ public class GetSiteMembershipRequestSanityTests extends RestTest .assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", "people" }, + @TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.SANITY, description = "Verify admin user is able to retrieve site membership request") @Bug(id = "MNT-16557") public void adminIsAbleToRetrieveSiteMembershipRequest() throws JsonToModelConversionException, Exception @@ -116,7 +117,7 @@ public class GetSiteMembershipRequestSanityTests extends RestTest .assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", "people" }, + @TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.SANITY, description = "Verify unauthenticated user is not able to retrieve site membership request") @Bug(id = "MNT-16557") public void unauthenticatedUserIsNotAbleToRetrieveSiteMembershipRequest() throws JsonToModelConversionException, Exception diff --git a/e2e-test/java/org/alfresco/rest/people/GetSiteMembershipRequestsSanityTests.java b/e2e-test/java/org/alfresco/rest/people/GetSiteMembershipRequestsSanityTests.java index a9aa8968a..c5c051aa9 100644 --- a/e2e-test/java/org/alfresco/rest/people/GetSiteMembershipRequestsSanityTests.java +++ b/e2e-test/java/org/alfresco/rest/people/GetSiteMembershipRequestsSanityTests.java @@ -5,6 +5,7 @@ import org.alfresco.rest.requests.RestPeopleApi; import org.alfresco.utility.constants.UserRole; import org.alfresco.utility.data.RandomData; import org.alfresco.utility.model.SiteModel; +import org.alfresco.utility.model.TestGroup; import org.alfresco.utility.model.UserModel; import org.alfresco.utility.report.Bug; import org.alfresco.utility.testrail.ExecutionType; @@ -20,7 +21,7 @@ import org.testng.annotations.Test; * * @author Cristina Axinte */ -@Test(groups = { "rest-api", "people", "sanity" }) +@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.COMMENTS }) public class GetSiteMembershipRequestsSanityTests extends RestTest { @Autowired @@ -46,7 +47,7 @@ public class GetSiteMembershipRequestsSanityTests extends RestTest } @Bug(id = "MNT-16557") - @TestRail(section = { "rest-api", "people" }, executionType = ExecutionType.SANITY, description = "Verify manager user gets all site membership requests of a specific person with Rest API and response is successful (200)") + @TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.SANITY, description = "Verify manager user gets all site membership requests of a specific person with Rest API and response is successful (200)") public void managerUserGetsSiteMembershipRequestsWithSuccess() throws Exception { UserModel managerUser = dataUser.usingAdmin().createRandomTestUser(); @@ -58,7 +59,7 @@ public class GetSiteMembershipRequestsSanityTests extends RestTest } @Bug(id = "MNT-16557") - @TestRail(section = { "rest-api", "people" }, executionType = ExecutionType.SANITY, description = "Verify collaborator user fails to get all site membership requests of another user with Rest API (403)") + @TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.SANITY, description = "Verify collaborator user fails to get all site membership requests of another user with Rest API (403)") public void collaboratorUserFailsToGetSiteMembershipRequestsOfAnotherUser() throws Exception { UserModel collaboratorUser = dataUser.usingAdmin().createRandomTestUser(); @@ -70,7 +71,7 @@ public class GetSiteMembershipRequestsSanityTests extends RestTest } @Bug(id = "MNT-16557") - @TestRail(section = { "rest-api", "people" }, executionType = ExecutionType.SANITY, description = "Verify contributor user fails to get all site membership requests of another user with Rest API (403)") + @TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.SANITY, description = "Verify contributor user fails to get all site membership requests of another user with Rest API (403)") public void contributorUserFailsToGetSiteMembershipRequestsOfAnotherUser() throws Exception { UserModel contributorUser = dataUser.usingAdmin().createRandomTestUser(); @@ -82,7 +83,7 @@ public class GetSiteMembershipRequestsSanityTests extends RestTest } @Bug(id = "MNT-16557") - @TestRail(section = { "rest-api", "people" }, executionType = ExecutionType.SANITY, description = "Verify consumer user fails to get all site membership requests of another user with Rest API (403)") + @TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.SANITY, description = "Verify consumer user fails to get all site membership requests of another user with Rest API (403)") public void consumerUserFailsToGetSiteMembershipRequestsOfAnotherUser() throws Exception { UserModel consumerUser = dataUser.usingAdmin().createRandomTestUser(); @@ -94,7 +95,7 @@ public class GetSiteMembershipRequestsSanityTests extends RestTest } @Bug(id = "MNT-16557") - @TestRail(section = { "rest-api", "people" }, executionType = ExecutionType.SANITY, description = "Verify admin user gets all site membership requests of a specific person with Rest API and response is successful (200)") + @TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.SANITY, description = "Verify admin user gets all site membership requests of a specific person with Rest API and response is successful (200)") public void adminUserGetsSiteMembershipRequestsWithSuccess() throws Exception { UserModel adminUser = dataUser.getAdminUser(); @@ -105,7 +106,7 @@ public class GetSiteMembershipRequestsSanityTests extends RestTest } @Bug(id = "MNT-16904") - @TestRail(section = { "rest-api", "people" }, executionType = ExecutionType.SANITY, description = "Verify manager user fails to get all site membership requests of a specific person with Rest API when the authentication fails (401)") + @TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.SANITY, description = "Verify manager user fails to get all site membership requests of a specific person with Rest API when the authentication fails (401)") public void managerUserNotAuthorizedFailsToGetSiteMembershipRequests() throws Exception { UserModel managerUser = dataUser.usingAdmin().createRandomTestUser(); @@ -117,7 +118,7 @@ public class GetSiteMembershipRequestsSanityTests extends RestTest peopleApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", "people" }, executionType = ExecutionType.SANITY, description = "Verify a user gets all its own site membership requests with Rest API and response is successful (200)") + @TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.SANITY, description = "Verify a user gets all its own site membership requests with Rest API and response is successful (200)") public void oneUserGetsItsOwnSiteMembershipRequestsWithSuccess() throws Exception { restClient.authenticateUser(newMember); diff --git a/e2e-test/java/org/alfresco/rest/people/GetSiteMembershipSanityTests.java b/e2e-test/java/org/alfresco/rest/people/GetSiteMembershipSanityTests.java index a87e5e20b..930aae70e 100644 --- a/e2e-test/java/org/alfresco/rest/people/GetSiteMembershipSanityTests.java +++ b/e2e-test/java/org/alfresco/rest/people/GetSiteMembershipSanityTests.java @@ -9,6 +9,7 @@ import org.alfresco.utility.data.DataUser; import org.alfresco.utility.data.DataUser.ListUserWithRoles; import org.alfresco.utility.exception.DataPreparationException; import org.alfresco.utility.model.SiteModel; +import org.alfresco.utility.model.TestGroup; import org.alfresco.utility.model.UserModel; import org.alfresco.utility.report.Bug; import org.alfresco.utility.testrail.ExecutionType; @@ -18,7 +19,7 @@ import org.springframework.http.HttpStatus; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; -@Test(groups = { "rest-api", "people", "sanity" }) +@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.COMMENTS }) public class GetSiteMembershipSanityTests extends RestTest { @Autowired @@ -46,7 +47,7 @@ public class GetSiteMembershipSanityTests extends RestTest peopleApi.useRestClient(restClient); } - @TestRail(section = { "rest-api", "people" }, + @TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.SANITY, description = "Verify site manager is able to retrieve site membership information of another user") public void siteManagerCanRetrieveSiteMembershipInformation() throws JsonToModelConversionException, Exception @@ -57,8 +58,8 @@ public class GetSiteMembershipSanityTests extends RestTest .assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", - "people" }, executionType = ExecutionType.SANITY, description = "Verify site collaborator is able to retrieve site membership information of another user") + @TestRail(section = { TestGroup.REST_API, + TestGroup.PEOPLE }, executionType = ExecutionType.SANITY, description = "Verify site collaborator is able to retrieve site membership information of another user") public void siteCollaboratorCanRetrieveSiteMembershipInformation() throws JsonToModelConversionException, Exception { restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteCollaborator)); @@ -67,8 +68,8 @@ public class GetSiteMembershipSanityTests extends RestTest .assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", - "people" }, executionType = ExecutionType.SANITY, description = "Verify site contributor is able to retrieve site membership information of another user") + @TestRail(section = { TestGroup.REST_API, + TestGroup.PEOPLE }, executionType = ExecutionType.SANITY, description = "Verify site contributor is able to retrieve site membership information of another user") public void siteContributorCanRetrieveSiteMembershipInformation() throws JsonToModelConversionException, Exception { restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteContributor)); @@ -77,8 +78,8 @@ public class GetSiteMembershipSanityTests extends RestTest .assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", - "people" }, executionType = ExecutionType.SANITY, description = "Verify site consumer is able to retrieve site membership information of another user") + @TestRail(section = { TestGroup.REST_API, + TestGroup.PEOPLE }, executionType = ExecutionType.SANITY, description = "Verify site consumer is able to retrieve site membership information of another user") public void siteConsumerCanRetrieveSiteMembershipInformation() throws JsonToModelConversionException, Exception { restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteConsumer)); @@ -87,8 +88,8 @@ public class GetSiteMembershipSanityTests extends RestTest .assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", - "people" }, executionType = ExecutionType.SANITY, description = "Verify admin user is able to retrieve site membership information of another user") + @TestRail(section = { TestGroup.REST_API, + TestGroup.PEOPLE }, executionType = ExecutionType.SANITY, description = "Verify admin user is able to retrieve site membership information of another user") public void adminCanRetrieveSiteMembershipInformation() throws JsonToModelConversionException, Exception { restClient.authenticateUser(adminUser); @@ -97,8 +98,8 @@ public class GetSiteMembershipSanityTests extends RestTest .assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", - "people" }, executionType = ExecutionType.SANITY, description = "Verify unauthenticated user is not able to retrieve site membership information of another user") + @TestRail(section = { TestGroup.REST_API, + TestGroup.PEOPLE }, executionType = ExecutionType.SANITY, description = "Verify unauthenticated user is not able to retrieve site membership information of another user") @Bug(id = "MNT-16904") public void unauthenticatedUserCannotRetrieveSiteMembershipInformation() throws JsonToModelConversionException, Exception { diff --git a/e2e-test/java/org/alfresco/rest/people/GetSitesMembershipInformationSanityTests.java b/e2e-test/java/org/alfresco/rest/people/GetSitesMembershipInformationSanityTests.java index fe30fe3e3..f7624949a 100644 --- a/e2e-test/java/org/alfresco/rest/people/GetSitesMembershipInformationSanityTests.java +++ b/e2e-test/java/org/alfresco/rest/people/GetSitesMembershipInformationSanityTests.java @@ -7,6 +7,7 @@ import org.alfresco.utility.constants.UserRole; import org.alfresco.utility.data.DataUser.ListUserWithRoles; import org.alfresco.utility.exception.DataPreparationException; import org.alfresco.utility.model.SiteModel; +import org.alfresco.utility.model.TestGroup; import org.alfresco.utility.model.UserModel; import org.alfresco.utility.report.Bug; import org.alfresco.utility.testrail.ExecutionType; @@ -16,7 +17,7 @@ import org.springframework.http.HttpStatus; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; -@Test(groups = { "rest-api", "people", "sanity" }) +@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.COMMENTS }) public class GetSitesMembershipInformationSanityTests extends RestTest { @Autowired @@ -36,7 +37,7 @@ public class GetSitesMembershipInformationSanityTests extends RestTest peopleApi.useRestClient(restClient); } - @TestRail(section = { "rest-api", "people" }, + @TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.SANITY, description = "Verify site manager is able to retrieve sites membership information of another user") public void siteManagerIsAbleToRetrieveSitesMembershipInformation() throws JsonToModelConversionException, Exception @@ -47,7 +48,7 @@ public class GetSitesMembershipInformationSanityTests extends RestTest .assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", "people" }, + @TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.SANITY, description = "Verify site collaborator is able to retrieve sites membership information of another user") public void siteCollaboratorIsAbleToRetrieveSitesMembershipInformation() throws JsonToModelConversionException, Exception @@ -58,7 +59,7 @@ public class GetSitesMembershipInformationSanityTests extends RestTest .assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", "people" }, + @TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.SANITY, description = "Verify site contributor is able to retrieve sites membership information of another user") public void siteContributorIsAbleToRetrieveSitesMembershipInformation() throws JsonToModelConversionException, Exception @@ -69,7 +70,7 @@ public class GetSitesMembershipInformationSanityTests extends RestTest .assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", "people" }, + @TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.SANITY, description = "Verify site consumer is able to retrieve sites membership information of another user") public void siteConsumerIsAbleToRetrieveSitesMembershipInformation() throws JsonToModelConversionException, Exception @@ -80,7 +81,7 @@ public class GetSitesMembershipInformationSanityTests extends RestTest .assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", "people" }, + @TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.SANITY, description = "Verify admin is able to retrieve sites membership information of another user") public void siteAdminIsAbleToRetrieveSitesMembershipInformation() throws JsonToModelConversionException, Exception @@ -91,7 +92,7 @@ public class GetSitesMembershipInformationSanityTests extends RestTest .assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", "people" }, + @TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.SANITY, description = "Verify that unauthenticated user is not able to retrieve sites membership information") @Bug(id = "MNT-16904") diff --git a/e2e-test/java/org/alfresco/rest/people/UpdateSiteMembershipRequestSanityTests.java b/e2e-test/java/org/alfresco/rest/people/UpdateSiteMembershipRequestSanityTests.java index 7e947a007..d2ffc78fe 100644 --- a/e2e-test/java/org/alfresco/rest/people/UpdateSiteMembershipRequestSanityTests.java +++ b/e2e-test/java/org/alfresco/rest/people/UpdateSiteMembershipRequestSanityTests.java @@ -10,6 +10,7 @@ import org.alfresco.utility.data.DataUser.ListUserWithRoles; import org.alfresco.utility.data.RandomData; import org.alfresco.utility.exception.DataPreparationException; import org.alfresco.utility.model.SiteModel; +import org.alfresco.utility.model.TestGroup; import org.alfresco.utility.model.UserModel; import org.alfresco.utility.report.Bug; import org.alfresco.utility.testrail.ExecutionType; @@ -20,7 +21,7 @@ import org.springframework.social.alfresco.api.entities.Site.Visibility; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; -@Test(groups = { "rest-api", "people", "sanity" }) +@Test(groups = { TestGroup.REST_API, TestGroup.PEOPLE, TestGroup.COMMENTS }) public class UpdateSiteMembershipRequestSanityTests extends RestTest { @Autowired @@ -52,7 +53,7 @@ public class UpdateSiteMembershipRequestSanityTests extends RestTest } - @TestRail(section = { "rest-api", "people" }, + @TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.SANITY, description = "Verify user is able to update its own site membership request") public void userIsAbleToUpdateItsOwnSiteMembershipRequest() throws JsonToModelConversionException, Exception { @@ -67,7 +68,7 @@ public class UpdateSiteMembershipRequestSanityTests extends RestTest .assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", "people" }, + @TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.SANITY, description = "Verify site manager is not able to update membership request of another user") @Bug(id = "MNT-16919") public void siteManagerIsNotAbleToUpdateSiteMembershipRequestOfAnotherUser() throws JsonToModelConversionException, Exception @@ -84,7 +85,7 @@ public class UpdateSiteMembershipRequestSanityTests extends RestTest .assertStatusCodeIs(HttpStatus.FORBIDDEN); } - @TestRail(section = { "rest-api", "people" }, + @TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.SANITY, description = "Verify site collaborator is not able to update membership request of another user") @Bug(id = "MNT-16919") public void siteCollaboratorIsNotAbleToUpdateSiteMembershipRequestOfAnotherUser() throws JsonToModelConversionException, Exception @@ -101,7 +102,7 @@ public class UpdateSiteMembershipRequestSanityTests extends RestTest .assertStatusCodeIs(HttpStatus.FORBIDDEN); } - @TestRail(section = { "rest-api", "people" }, + @TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.SANITY, description = "Verify site contributor is not able to update membership request of another user") @Bug(id = "MNT-16919") public void siteContributorIsNotAbleToUpdateSiteMembershipRequestOfAnotherUser() throws JsonToModelConversionException, Exception @@ -118,7 +119,7 @@ public class UpdateSiteMembershipRequestSanityTests extends RestTest .assertStatusCodeIs(HttpStatus.FORBIDDEN); } - @TestRail(section = { "rest-api", "people" }, + @TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.SANITY, description = "Verify site consumer is not able to update membership request of another user") @Bug(id = "MNT-16919") public void siteConsumerIsNotAbleToUpdateSiteMembershipRequestOfAnotherUser() throws JsonToModelConversionException, Exception @@ -135,7 +136,7 @@ public class UpdateSiteMembershipRequestSanityTests extends RestTest .assertStatusCodeIs(HttpStatus.FORBIDDEN); } - @TestRail(section = { "rest-api", "people" }, + @TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.SANITY, description = "Verify one user is not able to update membership request of another user") @Bug(id = "MNT-16919") public void oneUserIsNotAbleToUpdateSiteMembershipRequestOfAnotherUser() throws JsonToModelConversionException, Exception @@ -153,7 +154,7 @@ public class UpdateSiteMembershipRequestSanityTests extends RestTest .assertStatusCodeIs(HttpStatus.FORBIDDEN); } - @TestRail(section = { "rest-api", "people" }, + @TestRail(section = { TestGroup.REST_API, TestGroup.PEOPLE }, executionType = ExecutionType.SANITY, description = "Verify admin is not able to update membership request of another user") @Bug(id = "MNT-16919") public void adminIsNotAbleToUpdateSiteMembershipRequestOfAnotherUser() throws JsonToModelConversionException, Exception diff --git a/e2e-test/java/org/alfresco/rest/ratings/AddRatingSanityTests.java b/e2e-test/java/org/alfresco/rest/ratings/AddRatingSanityTests.java index db14b1ff3..13c8fc2a6 100644 --- a/e2e-test/java/org/alfresco/rest/ratings/AddRatingSanityTests.java +++ b/e2e-test/java/org/alfresco/rest/ratings/AddRatingSanityTests.java @@ -9,6 +9,7 @@ import org.alfresco.utility.exception.DataPreparationException; import org.alfresco.utility.model.FileModel; import org.alfresco.utility.model.FolderModel; import org.alfresco.utility.model.SiteModel; +import org.alfresco.utility.model.TestGroup; import org.alfresco.utility.model.UserModel; import org.alfresco.utility.report.Bug; import org.alfresco.utility.testrail.ExecutionType; @@ -20,7 +21,7 @@ import org.testng.annotations.BeforeClass; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; -@Test(groups = { "rest-api", "ratings", "sanity" }) +@Test(groups = { TestGroup.REST_API, TestGroup.RATINGS, TestGroup.COMMENTS }) public class AddRatingSanityTests extends RestTest { @Autowired @@ -52,8 +53,8 @@ public class AddRatingSanityTests extends RestTest document = dataContent.usingUser(userModel).usingResource(folderModel).createContent(DocumentType.TEXT_PLAIN); } - @TestRail(section = { "rest-api", - "ratings" }, executionType = ExecutionType.SANITY, description = "Verify user with Manager role is able to post like rating to a document") + @TestRail(section = { TestGroup.REST_API, + TestGroup.RATINGS }, executionType = ExecutionType.SANITY, description = "Verify user with Manager role is able to post like rating to a document") public void managerIsAbleToLikeDocument() throws Exception { restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteManager)); @@ -61,8 +62,8 @@ public class AddRatingSanityTests extends RestTest ratingsApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.CREATED); } - @TestRail(section = { "rest-api", - "ratings" }, executionType = ExecutionType.SANITY, description = "Verify user with Collaborator role is able to post like rating to a document") + @TestRail(section = { TestGroup.REST_API, + TestGroup.RATINGS }, executionType = ExecutionType.SANITY, description = "Verify user with Collaborator role is able to post like rating to a document") public void collaboratorIsAbleToLikeDocument() throws Exception { restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteCollaborator)); @@ -70,8 +71,8 @@ public class AddRatingSanityTests extends RestTest ratingsApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.CREATED); } - @TestRail(section = { "rest-api", - "ratings" }, executionType = ExecutionType.SANITY, description = "Verify user with Contributor role is able to post like rating to a document") + @TestRail(section = { TestGroup.REST_API, + TestGroup.RATINGS }, executionType = ExecutionType.SANITY, description = "Verify user with Contributor role is able to post like rating to a document") public void contributorIsAbleToLikeDocument() throws Exception { restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteContributor)); @@ -79,8 +80,8 @@ public class AddRatingSanityTests extends RestTest ratingsApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.CREATED); } - @TestRail(section = { "rest-api", - "ratings" }, executionType = ExecutionType.SANITY, description = "Verify user with Consumer role is able to post like rating to a document") + @TestRail(section = { TestGroup.REST_API, + TestGroup.RATINGS }, executionType = ExecutionType.SANITY, description = "Verify user with Consumer role is able to post like rating to a document") public void consumerIsAbleToLikeDocument() throws Exception { restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteConsumer)); @@ -88,8 +89,8 @@ public class AddRatingSanityTests extends RestTest ratingsApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.CREATED); } - @TestRail(section = { "rest-api", - "ratings" }, executionType = ExecutionType.SANITY, description = "Verify admin user is able to post like rating to a document") + @TestRail(section = { TestGroup.REST_API, + TestGroup.RATINGS }, executionType = ExecutionType.SANITY, description = "Verify admin user is able to post like rating to a document") public void adminIsAbleToLikeDocument() throws Exception { restClient.authenticateUser(adminUser); @@ -97,8 +98,8 @@ public class AddRatingSanityTests extends RestTest ratingsApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.CREATED); } - @TestRail(section = { "rest-api", - "ratings" }, executionType = ExecutionType.SANITY, description = "Verify unauthenticated user is not able to post like rating to a document") + @TestRail(section = { TestGroup.REST_API, + TestGroup.RATINGS }, executionType = ExecutionType.SANITY, description = "Verify unauthenticated user is not able to post like rating to a document") @Bug(id = "MNT-16904") public void unauthenticatedUserIsNotAbleToLikeDocument() throws Exception { @@ -107,8 +108,8 @@ public class AddRatingSanityTests extends RestTest ratingsApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.UNAUTHORIZED); } - @TestRail(section = { "rest-api", - "ratings" }, executionType = ExecutionType.SANITY, description = "Verify user with Manager role is able to post stars rating to a document") + @TestRail(section = { TestGroup.REST_API, + TestGroup.RATINGS }, executionType = ExecutionType.SANITY, description = "Verify user with Manager role is able to post stars rating to a document") public void managerIsAbleToAddStarsToDocument() throws Exception { restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteManager)); @@ -116,8 +117,8 @@ public class AddRatingSanityTests extends RestTest ratingsApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.CREATED); } - @TestRail(section = { "rest-api", - "ratings" }, executionType = ExecutionType.SANITY, description = "Verify user with Collaborator role is able to post stars rating to a document") + @TestRail(section = { TestGroup.REST_API, + TestGroup.RATINGS }, executionType = ExecutionType.SANITY, description = "Verify user with Collaborator role is able to post stars rating to a document") public void collaboratorIsAbleToAddStarsToDocument() throws Exception { restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteCollaborator)); @@ -125,8 +126,8 @@ public class AddRatingSanityTests extends RestTest ratingsApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.CREATED); } - @TestRail(section = { "rest-api", - "ratings" }, executionType = ExecutionType.SANITY, description = "Verify user with Contributor role is able to post stars rating to a document") + @TestRail(section = { TestGroup.REST_API, + TestGroup.RATINGS }, executionType = ExecutionType.SANITY, description = "Verify user with Contributor role is able to post stars rating to a document") public void contributorIsAbleToAddStarsToDocument() throws Exception { restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteContributor)); @@ -134,8 +135,8 @@ public class AddRatingSanityTests extends RestTest ratingsApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.CREATED); } - @TestRail(section = { "rest-api", - "ratings" }, executionType = ExecutionType.SANITY, description = "Verify user with Consumer role is able to post stars rating to a document") + @TestRail(section = { TestGroup.REST_API, + TestGroup.RATINGS }, executionType = ExecutionType.SANITY, description = "Verify user with Consumer role is able to post stars rating to a document") public void consumerIsAbleToAddStarsToDocument() throws Exception { restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteConsumer)); @@ -143,8 +144,8 @@ public class AddRatingSanityTests extends RestTest ratingsApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.CREATED); } - @TestRail(section = { "rest-api", - "ratings" }, executionType = ExecutionType.SANITY, description = "Verify admin user is able to post stars rating to a document") + @TestRail(section = { TestGroup.REST_API, + TestGroup.RATINGS }, executionType = ExecutionType.SANITY, description = "Verify admin user is able to post stars rating to a document") public void adminIsAbleToAddStarsToDocument() throws Exception { restClient.authenticateUser(adminUser); @@ -152,8 +153,8 @@ public class AddRatingSanityTests extends RestTest ratingsApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.CREATED); } - @TestRail(section = { "rest-api", - "ratings" }, executionType = ExecutionType.SANITY, description = "Verify unauthenticated user is not able to post stars rating to a document") + @TestRail(section = { TestGroup.REST_API, + TestGroup.RATINGS }, executionType = ExecutionType.SANITY, description = "Verify unauthenticated user is not able to post stars rating to a document") @Bug(id = "MNT-16904") public void unauthenticatedUserIsNotAbleToRateStarsToDocument() throws Exception { diff --git a/e2e-test/java/org/alfresco/rest/ratings/DeleteRatingSanityTests.java b/e2e-test/java/org/alfresco/rest/ratings/DeleteRatingSanityTests.java index 7b9526fb6..b2659f895 100644 --- a/e2e-test/java/org/alfresco/rest/ratings/DeleteRatingSanityTests.java +++ b/e2e-test/java/org/alfresco/rest/ratings/DeleteRatingSanityTests.java @@ -9,6 +9,7 @@ import org.alfresco.utility.exception.DataPreparationException; import org.alfresco.utility.model.FileModel; import org.alfresco.utility.model.FolderModel; import org.alfresco.utility.model.SiteModel; +import org.alfresco.utility.model.TestGroup; import org.alfresco.utility.model.UserModel; import org.alfresco.utility.report.Bug; import org.alfresco.utility.testrail.ExecutionType; @@ -19,7 +20,7 @@ import org.testng.annotations.BeforeClass; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; -@Test(groups = { "rest-api", "ratings", "sanity" }) +@Test(groups = { TestGroup.REST_API, TestGroup.RATINGS, TestGroup.COMMENTS }) public class DeleteRatingSanityTests extends RestTest { @Autowired @@ -50,7 +51,7 @@ public class DeleteRatingSanityTests extends RestTest document = dataContent.usingUser(userModel).usingResource(folderModel).createContent(DocumentType.TEXT_PLAIN); } - @TestRail(section = {"rest-api", "ratings" }, executionType = ExecutionType.SANITY, + @TestRail(section = {TestGroup.REST_API, TestGroup.RATINGS }, executionType = ExecutionType.SANITY, description = "Verify user with Manager role is able to remove its own rating of a document") public void managerIsAbleToDeleteItsOwnRatings() throws Exception { @@ -72,7 +73,7 @@ public class DeleteRatingSanityTests extends RestTest .assertNodeHasNoFiveStarRating(); } - @TestRail(section = {"rest-api", "ratings" }, executionType = ExecutionType.SANITY, + @TestRail(section = {TestGroup.REST_API, TestGroup.RATINGS }, executionType = ExecutionType.SANITY, description = "Verify user with Collaborator role is able to remove its own rating of a document") public void collaboratorIsAbleToDeleteItsOwnRatings() throws Exception { @@ -94,7 +95,7 @@ public class DeleteRatingSanityTests extends RestTest .assertNodeHasNoFiveStarRating(); } - @TestRail(section = {"rest-api", "ratings" }, executionType = ExecutionType.SANITY, + @TestRail(section = {TestGroup.REST_API, TestGroup.RATINGS }, executionType = ExecutionType.SANITY, description = "Verify user with Contributor role is able to remove its own rating of a document") public void contributorIsAbleToDeleteItsOwnRatings() throws Exception { @@ -116,7 +117,7 @@ public class DeleteRatingSanityTests extends RestTest .assertNodeHasNoFiveStarRating(); } - @TestRail(section = {"rest-api", "ratings" }, executionType = ExecutionType.SANITY, + @TestRail(section = {TestGroup.REST_API, TestGroup.RATINGS }, executionType = ExecutionType.SANITY, description = "Verify user with Consumer role is able to remove its own rating of a document") public void consumerIsAbleToDeleteItsOwnRatings() throws Exception { @@ -138,7 +139,7 @@ public class DeleteRatingSanityTests extends RestTest .assertNodeHasNoFiveStarRating(); } - @TestRail(section = {"rest-api", "ratings" }, executionType = ExecutionType.SANITY, + @TestRail(section = {TestGroup.REST_API, TestGroup.RATINGS }, executionType = ExecutionType.SANITY, description = "Verify admin user is able to remove its own rating of a document") public void adminIsAbleToDeleteItsOwnRatings() throws Exception { @@ -160,7 +161,7 @@ public class DeleteRatingSanityTests extends RestTest .assertNodeHasNoFiveStarRating(); } - @TestRail(section = {"rest-api", "ratings" }, executionType = ExecutionType.SANITY, + @TestRail(section = {TestGroup.REST_API, TestGroup.RATINGS }, executionType = ExecutionType.SANITY, description = "Verify unauthenticated user is not able to remove its own rating of a document") public void unauthenticatedUserIsNotAbleToDeleteRatings() throws Exception { @@ -180,7 +181,7 @@ public class DeleteRatingSanityTests extends RestTest .assertStatusCodeIs(HttpStatus.UNAUTHORIZED); } - @TestRail(section = {"rest-api", "ratings" }, executionType = ExecutionType.SANITY, + @TestRail(section = {TestGroup.REST_API, TestGroup.RATINGS }, executionType = ExecutionType.SANITY, description = "Verify one user is not able to remove rating added by another user") @Bug(id = "ACE-5459") public void oneUserIsNotAbleToDeleteRatingsOfAnotherUser() throws Exception diff --git a/e2e-test/java/org/alfresco/rest/ratings/GetRatingSanityTests.java b/e2e-test/java/org/alfresco/rest/ratings/GetRatingSanityTests.java index 9c930b6c7..01482d89f 100644 --- a/e2e-test/java/org/alfresco/rest/ratings/GetRatingSanityTests.java +++ b/e2e-test/java/org/alfresco/rest/ratings/GetRatingSanityTests.java @@ -9,6 +9,7 @@ import org.alfresco.utility.exception.DataPreparationException; import org.alfresco.utility.model.FileModel; import org.alfresco.utility.model.FolderModel; import org.alfresco.utility.model.SiteModel; +import org.alfresco.utility.model.TestGroup; import org.alfresco.utility.model.UserModel; import org.alfresco.utility.report.Bug; import org.alfresco.utility.testrail.ExecutionType; @@ -19,7 +20,7 @@ import org.testng.annotations.BeforeClass; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; -@Test(groups = { "rest-api", "ratings", "sanity" }) +@Test(groups = { TestGroup.REST_API, TestGroup.RATINGS, TestGroup.COMMENTS }) public class GetRatingSanityTests extends RestTest { @Autowired @@ -49,7 +50,7 @@ public class GetRatingSanityTests extends RestTest document = dataContent.usingUser(adminUser).usingResource(folderModel).createContent(DocumentType.TEXT_PLAIN); } - @TestRail(section = {"rest-api", "ratings" }, executionType = ExecutionType.SANITY, + @TestRail(section = {TestGroup.REST_API, TestGroup.RATINGS }, executionType = ExecutionType.SANITY, description = "Verify user with Manager role is able to retrieve rating of a document") public void managerIsAbleToRetrieveRating() throws Exception { @@ -71,7 +72,7 @@ public class GetRatingSanityTests extends RestTest .assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = {"rest-api", "ratings" }, executionType = ExecutionType.SANITY, + @TestRail(section = {TestGroup.REST_API, TestGroup.RATINGS }, executionType = ExecutionType.SANITY, description = "Verify user with Collaborator role is able to retrieve rating of a document") public void collaboratorIsAbleToRetrieveRating() throws Exception { @@ -93,7 +94,7 @@ public class GetRatingSanityTests extends RestTest .assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = {"rest-api", "ratings" }, executionType = ExecutionType.SANITY, + @TestRail(section = {TestGroup.REST_API, TestGroup.RATINGS }, executionType = ExecutionType.SANITY, description = "Verify user with Contributor role is able to retrieve rating of a document") public void contributorIsAbleToRetrieveRating() throws Exception { @@ -115,7 +116,7 @@ public class GetRatingSanityTests extends RestTest .assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = {"rest-api", "ratings" }, executionType = ExecutionType.SANITY, + @TestRail(section = {TestGroup.REST_API, TestGroup.RATINGS }, executionType = ExecutionType.SANITY, description = "Verify user with Consumer role is able to retrieve rating of a document") public void consumerIsAbleToRetrieveRating() throws Exception { @@ -137,7 +138,7 @@ public class GetRatingSanityTests extends RestTest .assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = {"rest-api", "ratings" }, executionType = ExecutionType.SANITY, + @TestRail(section = {TestGroup.REST_API, TestGroup.RATINGS }, executionType = ExecutionType.SANITY, description = "Verify admin user is able to retrieve rating of a document") public void adminIsAbleToRetrieveRating() throws Exception { @@ -160,7 +161,7 @@ public class GetRatingSanityTests extends RestTest .assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = {"rest-api", "ratings" }, executionType = ExecutionType.SANITY, + @TestRail(section = {TestGroup.REST_API, TestGroup.RATINGS }, executionType = ExecutionType.SANITY, description = "Verify unauthenticated user is not able to retrieve rating of a document") @Bug(id = "MNT-16904") public void unauthenticatedUserIsNotAbleToRetrieveRating() throws Exception diff --git a/e2e-test/java/org/alfresco/rest/sites/AddSiteMemberSanityTests.java b/e2e-test/java/org/alfresco/rest/sites/AddSiteMemberSanityTests.java index 7cf0fedf8..d2c86b50d 100644 --- a/e2e-test/java/org/alfresco/rest/sites/AddSiteMemberSanityTests.java +++ b/e2e-test/java/org/alfresco/rest/sites/AddSiteMemberSanityTests.java @@ -5,6 +5,7 @@ import org.alfresco.rest.requests.RestSitesApi; import org.alfresco.utility.constants.UserRole; import org.alfresco.utility.data.DataUser.ListUserWithRoles; import org.alfresco.utility.model.SiteModel; +import org.alfresco.utility.model.TestGroup; import org.alfresco.utility.model.UserModel; import org.alfresco.utility.report.Bug; import org.alfresco.utility.testrail.ExecutionType; @@ -14,7 +15,7 @@ import org.springframework.http.HttpStatus; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; -@Test(groups = { "rest-api", "sites", "sanity" }) +@Test(groups = { TestGroup.REST_API, TestGroup.SITES, TestGroup.COMMENTS }) public class AddSiteMemberSanityTests extends RestTest { @Autowired @@ -35,7 +36,7 @@ public class AddSiteMemberSanityTests extends RestTest } - @TestRail(section = {"rest-api", "sites" }, executionType = ExecutionType.SANITY, + @TestRail(section = {TestGroup.REST_API, TestGroup.SITES }, executionType = ExecutionType.SANITY, description = "Verify that manager is able to add site member and gets status code CREATED (201)") public void managerIsAbleToAddSiteMember() throws Exception { @@ -46,7 +47,7 @@ public class AddSiteMemberSanityTests extends RestTest siteAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.CREATED); } - @TestRail(section = {"rest-api", "sites" }, executionType = ExecutionType.SANITY, + @TestRail(section = {TestGroup.REST_API, TestGroup.SITES }, executionType = ExecutionType.SANITY, description = "Verify that site collaborator is not able to add site member and gets status code FORBIDDEN (403)") public void collaboratorIsNotAbleToAddSiteMember() throws Exception { @@ -57,7 +58,7 @@ public class AddSiteMemberSanityTests extends RestTest siteAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.FORBIDDEN); } - @TestRail(section = {"rest-api", "sites" }, executionType = ExecutionType.SANITY, + @TestRail(section = {TestGroup.REST_API, TestGroup.SITES }, executionType = ExecutionType.SANITY, description = "Verify that site contributor is not able to add site member and gets status code FORBIDDEN (403)") public void contributorIsNotAbleToAddSiteMember() throws Exception { @@ -68,7 +69,7 @@ public class AddSiteMemberSanityTests extends RestTest siteAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.FORBIDDEN); } - @TestRail(section = {"rest-api", "sites" }, executionType = ExecutionType.SANITY, + @TestRail(section = {TestGroup.REST_API, TestGroup.SITES }, executionType = ExecutionType.SANITY, description = "Verify that site consumer is not able to add site member and gets status code FORBIDDEN (403)") public void consumerIsNotAbleToAddSiteMember() throws Exception { @@ -79,7 +80,7 @@ public class AddSiteMemberSanityTests extends RestTest siteAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.FORBIDDEN); } - @TestRail(section = {"rest-api", "sites" }, executionType = ExecutionType.SANITY, + @TestRail(section = {TestGroup.REST_API, TestGroup.SITES }, executionType = ExecutionType.SANITY, description = "Verify that admin user is able to add site member and gets status code CREATED (201)") public void adminIsAbleToAddSiteMember() throws Exception { @@ -91,7 +92,7 @@ public class AddSiteMemberSanityTests extends RestTest } @Bug(id="MNT-16904") - @TestRail(section = {"rest-api", "sites" }, executionType = ExecutionType.SANITY, + @TestRail(section = {TestGroup.REST_API, TestGroup.SITES }, executionType = ExecutionType.SANITY, description = "Verify that unauthenticated user is not able to add site member") public void unauthenticatedUserIsNotAuthorizedToAddSiteMmeber() throws Exception{ UserModel testUser = dataUser.createRandomTestUser("testUser"); diff --git a/e2e-test/java/org/alfresco/rest/sites/GetSiteContainerSanityTests.java b/e2e-test/java/org/alfresco/rest/sites/GetSiteContainerSanityTests.java index 8ddf9c3b3..29f2286e3 100644 --- a/e2e-test/java/org/alfresco/rest/sites/GetSiteContainerSanityTests.java +++ b/e2e-test/java/org/alfresco/rest/sites/GetSiteContainerSanityTests.java @@ -6,6 +6,7 @@ import org.alfresco.rest.requests.RestSitesApi; import org.alfresco.utility.constants.UserRole; import org.alfresco.utility.data.DataUser.ListUserWithRoles; import org.alfresco.utility.model.SiteModel; +import org.alfresco.utility.model.TestGroup; import org.alfresco.utility.model.UserModel; import org.alfresco.utility.report.Bug; import org.alfresco.utility.testrail.ExecutionType; @@ -18,7 +19,7 @@ import org.testng.annotations.Test; /** * @author iulia.cojocea */ -@Test(groups = { "rest-api", "sites", "sanity" }) +@Test(groups = { TestGroup.REST_API, TestGroup.SITES, TestGroup.COMMENTS }) public class GetSiteContainerSanityTests extends RestTest { @Autowired @@ -40,7 +41,7 @@ public class GetSiteContainerSanityTests extends RestTest UserRole.SiteContributor); } - @TestRail(section = { "rest-api", "sites" }, executionType = ExecutionType.SANITY, + @TestRail(section = { TestGroup.REST_API, TestGroup.SITES }, executionType = ExecutionType.SANITY, description = "Verify user with Manager role gets site container and gets status code OK (200)") public void getSiteContainerWithManagerRole() throws Exception { @@ -50,7 +51,7 @@ public class GetSiteContainerSanityTests extends RestTest siteAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", "sites" }, executionType = ExecutionType.SANITY, + @TestRail(section = { TestGroup.REST_API, TestGroup.SITES }, executionType = ExecutionType.SANITY, description = "Verify user with Collaborator role gets site container and gets status code OK (200)") public void getSiteContainerWithCollaboratorRole() throws Exception { @@ -60,7 +61,7 @@ public class GetSiteContainerSanityTests extends RestTest siteAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", "sites" }, executionType = ExecutionType.SANITY, + @TestRail(section = { TestGroup.REST_API, TestGroup.SITES }, executionType = ExecutionType.SANITY, description = "Verify user with Contributor role gets site container and gets status code OK (200)") public void getSiteContainerWithContributorRole() throws Exception { @@ -70,7 +71,7 @@ public class GetSiteContainerSanityTests extends RestTest siteAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", "sites" }, executionType = ExecutionType.SANITY, + @TestRail(section = { TestGroup.REST_API, TestGroup.SITES }, executionType = ExecutionType.SANITY, description = "Verify user with Consumer role gets site container and gets status code OK (200)") public void getSiteContainerWithConsumerRole() throws Exception { @@ -80,7 +81,7 @@ public class GetSiteContainerSanityTests extends RestTest siteAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", "sites" }, executionType = ExecutionType.SANITY, + @TestRail(section = { TestGroup.REST_API, TestGroup.SITES }, executionType = ExecutionType.SANITY, description = "Verify user with admin user gets site container and gets status code OK (200)") public void getSiteContainerWithAdminUser() throws Exception { @@ -91,7 +92,7 @@ public class GetSiteContainerSanityTests extends RestTest } - @TestRail(section = { "rest-api", "sites" }, executionType = ExecutionType.SANITY, + @TestRail(section = { TestGroup.REST_API, TestGroup.SITES }, executionType = ExecutionType.SANITY, description = "Failed authentication get site container call returns status code 401") @Bug(id="MNT-16904") public void unauthenticatedUserIsNotAuthorizedToRetrieveSiteContainer() throws Exception diff --git a/e2e-test/java/org/alfresco/rest/sites/GetSiteContainersSanityTests.java b/e2e-test/java/org/alfresco/rest/sites/GetSiteContainersSanityTests.java index 5782402f4..6f6dce146 100644 --- a/e2e-test/java/org/alfresco/rest/sites/GetSiteContainersSanityTests.java +++ b/e2e-test/java/org/alfresco/rest/sites/GetSiteContainersSanityTests.java @@ -8,6 +8,7 @@ import org.alfresco.utility.data.DataSite; import org.alfresco.utility.data.DataUser; import org.alfresco.utility.data.DataUser.ListUserWithRoles; import org.alfresco.utility.model.SiteModel; +import org.alfresco.utility.model.TestGroup; import org.alfresco.utility.model.UserModel; import org.alfresco.utility.report.Bug; import org.alfresco.utility.testrail.ExecutionType; @@ -20,7 +21,7 @@ import org.testng.annotations.Test; /** * @author iulia.cojocea */ -@Test(groups = { "rest-api", "sites", "sanity" }) +@Test(groups = { TestGroup.REST_API, TestGroup.SITES, TestGroup.COMMENTS }) public class GetSiteContainersSanityTests extends RestTest { @Autowired @@ -46,7 +47,7 @@ public class GetSiteContainersSanityTests extends RestTest usersWithRoles = dataUser.addUsersWithRolesToSite(siteModel, UserRole.SiteManager, UserRole.SiteCollaborator, UserRole.SiteConsumer, UserRole.SiteContributor); } - @TestRail(section = { "rest-api", "sites" }, executionType = ExecutionType.SANITY, + @TestRail(section = { TestGroup.REST_API, TestGroup.SITES }, executionType = ExecutionType.SANITY, description = "Verify user with Manager role gets site containers and gets status code OK (200)") public void getSiteContainersWithManagerRole() throws JsonToModelConversionException, Exception { @@ -55,7 +56,7 @@ public class GetSiteContainersSanityTests extends RestTest siteAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = {"rest-api", "sites" }, executionType = ExecutionType.SANITY, + @TestRail(section = {TestGroup.REST_API, TestGroup.SITES }, executionType = ExecutionType.SANITY, description = "Verify user with Collaborator role gets site containers and gets status code OK (200)") public void getSiteContainersWithCollaboratorRole() throws JsonToModelConversionException, Exception { @@ -64,7 +65,7 @@ public class GetSiteContainersSanityTests extends RestTest siteAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", "sites" }, executionType = ExecutionType.SANITY, + @TestRail(section = { TestGroup.REST_API, TestGroup.SITES }, executionType = ExecutionType.SANITY, description = "Verify user with Contributor role gets site containers and gets status code OK (200)") public void getSiteContainersWithContributorRole() throws JsonToModelConversionException, Exception { @@ -73,7 +74,7 @@ public class GetSiteContainersSanityTests extends RestTest siteAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", "sites" }, executionType = ExecutionType.SANITY, + @TestRail(section = { TestGroup.REST_API, TestGroup.SITES }, executionType = ExecutionType.SANITY, description = "Verify user with Consumer role gets site containers and gets status code OK (200)") public void getSiteContainersWithConsumerRole() throws JsonToModelConversionException, Exception { @@ -82,7 +83,7 @@ public class GetSiteContainersSanityTests extends RestTest siteAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", "sites" }, executionType = ExecutionType.SANITY, + @TestRail(section = { TestGroup.REST_API, TestGroup.SITES }, executionType = ExecutionType.SANITY, description = "Verify user with Admin user gets site containers information and gets status code OK (200)") public void getSiteContainersWithAdminUser() throws JsonToModelConversionException, Exception { @@ -92,7 +93,7 @@ public class GetSiteContainersSanityTests extends RestTest } @Bug(id="MNT-16904") - @TestRail(section = { "rest-api", "sites" }, executionType = ExecutionType.SANITY, + @TestRail(section = { TestGroup.REST_API, TestGroup.SITES }, executionType = ExecutionType.SANITY, description = "Failed authentication get site containers call returns status code 401 with Manager role") public void unauthenticatedUserIsNotAuthorizedToRetrieveSiteContainers() throws JsonToModelConversionException, Exception { diff --git a/e2e-test/java/org/alfresco/rest/sites/GetSiteMemberSanityTests.java b/e2e-test/java/org/alfresco/rest/sites/GetSiteMemberSanityTests.java index 0d7007111..7ac8041ff 100644 --- a/e2e-test/java/org/alfresco/rest/sites/GetSiteMemberSanityTests.java +++ b/e2e-test/java/org/alfresco/rest/sites/GetSiteMemberSanityTests.java @@ -7,6 +7,7 @@ import org.alfresco.utility.constants.UserRole; import org.alfresco.utility.data.DataUser.ListUserWithRoles; import org.alfresco.utility.exception.DataPreparationException; import org.alfresco.utility.model.SiteModel; +import org.alfresco.utility.model.TestGroup; import org.alfresco.utility.model.UserModel; import org.alfresco.utility.report.Bug; import org.alfresco.utility.testrail.ExecutionType; @@ -19,7 +20,7 @@ import org.testng.annotations.Test; /** * @author iulia.cojocea */ -@Test(groups = { "rest-api", "sites", "sanity" }) +@Test(groups = { TestGroup.REST_API, TestGroup.SITES, TestGroup.COMMENTS }) public class GetSiteMemberSanityTests extends RestTest { @@ -43,7 +44,7 @@ public class GetSiteMemberSanityTests extends RestTest dataUser.addUserToSite(userModel, siteModel, UserRole.SiteConsumer); } - @TestRail(section = { "rest-api", "sites" }, executionType = ExecutionType.SANITY, + @TestRail(section = { TestGroup.REST_API, TestGroup.SITES }, executionType = ExecutionType.SANITY, description = "Verify user with Manager role gets site member and status code is OK (200)") public void getSiteMemberWithManagerRole() throws Exception { @@ -52,7 +53,7 @@ public class GetSiteMemberSanityTests extends RestTest restSitesApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", "sites" }, executionType = ExecutionType.SANITY, + @TestRail(section = { TestGroup.REST_API, TestGroup.SITES }, executionType = ExecutionType.SANITY, description = "Verify user with Collaborator role gets site member and gets status code OK (200)") public void getSiteMemberWithCollaboratorRole() throws Exception { @@ -61,7 +62,7 @@ public class GetSiteMemberSanityTests extends RestTest restSitesApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", "sites" }, executionType = ExecutionType.SANITY, + @TestRail(section = { TestGroup.REST_API, TestGroup.SITES }, executionType = ExecutionType.SANITY, description = "Verify user with Contributor role gets site member and gets status code OK (200)") public void getSiteMemberWithContributorRole() throws Exception { @@ -70,7 +71,7 @@ public class GetSiteMemberSanityTests extends RestTest restSitesApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", "sites" }, executionType = ExecutionType.SANITY, + @TestRail(section = { TestGroup.REST_API, TestGroup.SITES }, executionType = ExecutionType.SANITY, description = "Verify user with Consumer role gets site member and gets status code OK (200)") public void getSiteMemberWithConsumerRole() throws Exception { @@ -79,7 +80,7 @@ public class GetSiteMemberSanityTests extends RestTest restSitesApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", "sites" }, executionType = ExecutionType.SANITY, + @TestRail(section = { TestGroup.REST_API, TestGroup.SITES }, executionType = ExecutionType.SANITY, description = "Verify user with admin user gets site member and gets status code OK (200)") public void getSiteMemberWithAdminUser() throws Exception { @@ -88,7 +89,7 @@ public class GetSiteMemberSanityTests extends RestTest restSitesApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", "sites" }, executionType = ExecutionType.SANITY, + @TestRail(section = { TestGroup.REST_API, TestGroup.SITES }, executionType = ExecutionType.SANITY, description = "Failed authentication get site member call returns status code 401") @Bug(id = "MNT-16904") public void unauthenticatedUserIsNotAuthorizedToRetrieveSiteMember() throws JsonToModelConversionException, Exception diff --git a/e2e-test/java/org/alfresco/rest/sites/GetSiteMembersSanityTests.java b/e2e-test/java/org/alfresco/rest/sites/GetSiteMembersSanityTests.java index e05fcd296..0c63197ea 100644 --- a/e2e-test/java/org/alfresco/rest/sites/GetSiteMembersSanityTests.java +++ b/e2e-test/java/org/alfresco/rest/sites/GetSiteMembersSanityTests.java @@ -9,6 +9,7 @@ import org.alfresco.utility.data.DataUser; import org.alfresco.utility.data.DataUser.ListUserWithRoles; import org.alfresco.utility.exception.DataPreparationException; import org.alfresco.utility.model.SiteModel; +import org.alfresco.utility.model.TestGroup; import org.alfresco.utility.model.UserModel; import org.alfresco.utility.report.Bug; import org.alfresco.utility.testrail.ExecutionType; @@ -21,7 +22,7 @@ import org.testng.annotations.Test; /** * @author iulia.cojocea */ -@Test(groups = { "rest-api", "sites", "sanity" }) +@Test(groups = { TestGroup.REST_API, TestGroup.SITES, TestGroup.COMMENTS }) public class GetSiteMembersSanityTests extends RestTest { @Autowired @@ -47,7 +48,7 @@ public class GetSiteMembersSanityTests extends RestTest usersWithRoles = dataUser.addUsersWithRolesToSite(siteModel,UserRole.SiteManager, UserRole.SiteCollaborator, UserRole.SiteConsumer, UserRole.SiteContributor); } - @TestRail(section = {"rest-api", "sites" }, executionType = ExecutionType.SANITY, + @TestRail(section = {TestGroup.REST_API, TestGroup.SITES }, executionType = ExecutionType.SANITY, description = "Verify user with Manager role gets site members and gets status code OK (200)") public void getSiteMembersWithManagerRole() throws JsonToModelConversionException, Exception { @@ -56,7 +57,7 @@ public class GetSiteMembersSanityTests extends RestTest siteAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = {"rest-api", "sites" }, executionType = ExecutionType.SANITY, + @TestRail(section = {TestGroup.REST_API, TestGroup.SITES }, executionType = ExecutionType.SANITY, description = "Verify user with Collaborator role gets site members and gets status code OK (200)") public void getSiteMembersWithCollaboratorRole() throws JsonToModelConversionException, Exception { @@ -65,7 +66,7 @@ public class GetSiteMembersSanityTests extends RestTest siteAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = {"rest-api", "sites" }, executionType = ExecutionType.SANITY, + @TestRail(section = {TestGroup.REST_API, TestGroup.SITES }, executionType = ExecutionType.SANITY, description = "Verify user with Contributor role gets site members and gets status code OK (200)") public void getSiteMembersWithContributorRole() throws JsonToModelConversionException, Exception { @@ -74,7 +75,7 @@ public class GetSiteMembersSanityTests extends RestTest siteAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = {"rest-api", "sites" }, executionType = ExecutionType.SANITY, + @TestRail(section = {TestGroup.REST_API, TestGroup.SITES }, executionType = ExecutionType.SANITY, description = "Verify user with Consumer role gets site members and gets status code OK (200)") public void getSiteMembersWithConsumerRole() throws JsonToModelConversionException, Exception { @@ -83,7 +84,7 @@ public class GetSiteMembersSanityTests extends RestTest siteAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = {"rest-api", "sites" }, executionType = ExecutionType.SANITY, + @TestRail(section = {TestGroup.REST_API, TestGroup.SITES }, executionType = ExecutionType.SANITY, description = "Verify user with admin usere gets site members and gets status code OK (200)") public void getSiteMembersWithAdminUser() throws JsonToModelConversionException, Exception { @@ -93,7 +94,7 @@ public class GetSiteMembersSanityTests extends RestTest } @Bug(id="MNT-16904") - @TestRail(section = {"rest-api", "sites" }, executionType = ExecutionType.SANITY, + @TestRail(section = {TestGroup.REST_API, TestGroup.SITES }, executionType = ExecutionType.SANITY, description = "Failed authentication get site members call returns status code 401") public void unauthenticatedUserIsNotAuthorizedToRetrieveSiteMembers() throws JsonToModelConversionException, Exception { diff --git a/e2e-test/java/org/alfresco/rest/sites/GetSiteSanityTests.java b/e2e-test/java/org/alfresco/rest/sites/GetSiteSanityTests.java index c7e8d7555..d6f5d6c72 100644 --- a/e2e-test/java/org/alfresco/rest/sites/GetSiteSanityTests.java +++ b/e2e-test/java/org/alfresco/rest/sites/GetSiteSanityTests.java @@ -9,6 +9,7 @@ import org.alfresco.utility.data.DataUser; import org.alfresco.utility.data.DataUser.ListUserWithRoles; import org.alfresco.utility.exception.DataPreparationException; import org.alfresco.utility.model.SiteModel; +import org.alfresco.utility.model.TestGroup; import org.alfresco.utility.model.UserModel; import org.alfresco.utility.report.Bug; import org.alfresco.utility.testrail.ExecutionType; @@ -22,7 +23,7 @@ import org.testng.annotations.Test; * @author iulia.cojocea */ -@Test(groups = { "rest-api", "sites", "sanity" }) +@Test(groups = { TestGroup.REST_API, TestGroup.SITES, TestGroup.COMMENTS }) public class GetSiteSanityTests extends RestTest { @Autowired @@ -49,7 +50,7 @@ public class GetSiteSanityTests extends RestTest usersWithRoles = dataUser.addUsersWithRolesToSite(siteModel,UserRole.SiteManager, UserRole.SiteCollaborator, UserRole.SiteConsumer, UserRole.SiteContributor); } - @TestRail(section = { "rest-api", "sites" }, executionType = ExecutionType.SANITY, + @TestRail(section = { TestGroup.REST_API, TestGroup.SITES }, executionType = ExecutionType.SANITY, description = "Verify user with Manager role gets site information and gets status code OK (200)") public void getSiteWithManagerRole() throws JsonToModelConversionException, Exception { @@ -58,7 +59,7 @@ public class GetSiteSanityTests extends RestTest siteAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", "sites" }, executionType = ExecutionType.SANITY, + @TestRail(section = { TestGroup.REST_API, TestGroup.SITES }, executionType = ExecutionType.SANITY, description = "Verify user with Collaborator role gets site information and gets status code OK (200)") public void getSiteWithCollaboratorRole() throws JsonToModelConversionException, Exception { @@ -67,7 +68,7 @@ public class GetSiteSanityTests extends RestTest siteAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", "sites" }, executionType = ExecutionType.SANITY, + @TestRail(section = { TestGroup.REST_API, TestGroup.SITES }, executionType = ExecutionType.SANITY, description = "Verify user with Contributor role gets site information and gets status code OK (200)") public void getSiteWithContributorRole() throws JsonToModelConversionException, Exception { @@ -76,7 +77,7 @@ public class GetSiteSanityTests extends RestTest siteAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", "sites" }, executionType = ExecutionType.SANITY, + @TestRail(section = { TestGroup.REST_API, TestGroup.SITES }, executionType = ExecutionType.SANITY, description = "Verify user with Consumer role gets site information and gets status code OK (200)") public void getSiteWithConsumerRole() throws JsonToModelConversionException, Exception { @@ -85,7 +86,7 @@ public class GetSiteSanityTests extends RestTest siteAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", "sites" }, executionType = ExecutionType.SANITY, + @TestRail(section = { TestGroup.REST_API, TestGroup.SITES }, executionType = ExecutionType.SANITY, description = "Verify user with admin role gets site information and gets status code OK (200)") public void getSiteWithAdminRole() throws JsonToModelConversionException, Exception { @@ -95,7 +96,7 @@ public class GetSiteSanityTests extends RestTest } @Bug(id="MNT-16904") - @TestRail(section = { "rest-api", "sites" }, executionType = ExecutionType.SANITY, + @TestRail(section = { TestGroup.REST_API, TestGroup.SITES }, executionType = ExecutionType.SANITY, description = "Failed authentication get site call returns status code 401") public void unauthenticatedUserIsNotAuthorizedToRetrieveSite() throws JsonToModelConversionException, Exception { diff --git a/e2e-test/java/org/alfresco/rest/sites/GetSitesSanityTests.java b/e2e-test/java/org/alfresco/rest/sites/GetSitesSanityTests.java index b1b759fac..5262aae4d 100644 --- a/e2e-test/java/org/alfresco/rest/sites/GetSitesSanityTests.java +++ b/e2e-test/java/org/alfresco/rest/sites/GetSitesSanityTests.java @@ -8,6 +8,7 @@ import org.alfresco.utility.data.DataSite; import org.alfresco.utility.data.DataUser; import org.alfresco.utility.data.DataUser.ListUserWithRoles; import org.alfresco.utility.model.SiteModel; +import org.alfresco.utility.model.TestGroup; import org.alfresco.utility.model.UserModel; import org.alfresco.utility.report.Bug; import org.alfresco.utility.testrail.ExecutionType; @@ -20,7 +21,7 @@ import org.testng.annotations.Test; /** * @author iulia.cojocea */ -@Test(groups = { "rest-api", "sites", "sanity" }) +@Test(groups = { TestGroup.REST_API, TestGroup.SITES, TestGroup.COMMENTS }) public class GetSitesSanityTests extends RestTest { @Autowired @@ -47,7 +48,7 @@ public class GetSitesSanityTests extends RestTest usersWithRoles = dataUser.addUsersWithRolesToSite(siteModel,UserRole.SiteManager, UserRole.SiteCollaborator, UserRole.SiteConsumer, UserRole.SiteContributor); } - @TestRail(section = { "rest-api", "sites" }, executionType = ExecutionType.SANITY, description = "Verify user with Manager role gets sites information and gets status code OK (200)") + @TestRail(section = { TestGroup.REST_API, TestGroup.SITES }, executionType = ExecutionType.SANITY, description = "Verify user with Manager role gets sites information and gets status code OK (200)") public void managerIsAbleToRetrieveSites() throws JsonToModelConversionException, Exception { @@ -56,7 +57,7 @@ public class GetSitesSanityTests extends RestTest siteAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", "sites" }, executionType = ExecutionType.SANITY, + @TestRail(section = { TestGroup.REST_API, TestGroup.SITES }, executionType = ExecutionType.SANITY, description = "Verify user with Collaborator role gets sites information and gets status code OK (200)") public void collaboratorIsAbleToRetrieveSites() throws JsonToModelConversionException, Exception { @@ -66,7 +67,7 @@ public class GetSitesSanityTests extends RestTest siteAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", "sites" }, executionType = ExecutionType.SANITY, + @TestRail(section = { TestGroup.REST_API, TestGroup.SITES }, executionType = ExecutionType.SANITY, description = "Verify user with Contributor role gets sites information and gets status code OK (200)") public void contributorIsAbleToRetrieveSites() throws JsonToModelConversionException, Exception { @@ -76,7 +77,7 @@ public class GetSitesSanityTests extends RestTest siteAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", "sites" }, executionType = ExecutionType.SANITY, + @TestRail(section = { TestGroup.REST_API, TestGroup.SITES }, executionType = ExecutionType.SANITY, description = "Verify user with Consumer role gets sites information and gets status code OK (200)") public void consumerIsAbleToRetrieveSites() throws JsonToModelConversionException, Exception { @@ -86,7 +87,7 @@ public class GetSitesSanityTests extends RestTest siteAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", "sites" }, executionType = ExecutionType.SANITY, + @TestRail(section = { TestGroup.REST_API, TestGroup.SITES }, executionType = ExecutionType.SANITY, description = "Verify user with Admin user gets sites information and gets status code OK (200)") public void adminUserIsAbleToRetrieveSites() throws JsonToModelConversionException, Exception { @@ -96,7 +97,7 @@ public class GetSitesSanityTests extends RestTest } @Bug(id="MNT-16904") - @TestRail(section = { "rest-api", "sites" }, executionType = ExecutionType.SANITY, + @TestRail(section = { TestGroup.REST_API, TestGroup.SITES }, executionType = ExecutionType.SANITY, description = "Failed authentication get sites call returns status code 401") public void unauthenticatedUserIsNotAuthorizedToRetrieveSites() throws JsonToModelConversionException, Exception { diff --git a/e2e-test/java/org/alfresco/rest/sites/RemoveSiteMemberSanityTests.java b/e2e-test/java/org/alfresco/rest/sites/RemoveSiteMemberSanityTests.java index 6b3b1ec71..10848b847 100644 --- a/e2e-test/java/org/alfresco/rest/sites/RemoveSiteMemberSanityTests.java +++ b/e2e-test/java/org/alfresco/rest/sites/RemoveSiteMemberSanityTests.java @@ -7,6 +7,7 @@ import org.alfresco.utility.data.DataUser; import org.alfresco.utility.data.DataUser.ListUserWithRoles; import org.alfresco.utility.exception.DataPreparationException; import org.alfresco.utility.model.SiteModel; +import org.alfresco.utility.model.TestGroup; import org.alfresco.utility.model.UserModel; import org.alfresco.utility.report.Bug; import org.alfresco.utility.testrail.ExecutionType; @@ -20,7 +21,7 @@ import org.testng.annotations.Test; /** * @author iulia.cojocea */ -@Test(groups = {"rest-api", "sites", "sanity"}) +@Test(groups = {TestGroup.REST_API, TestGroup.SITES, TestGroup.COMMENTS}) public class RemoveSiteMemberSanityTests extends RestTest { @@ -50,7 +51,7 @@ public class RemoveSiteMemberSanityTests extends RestTest dataUser.addUserToSite(testUserModel, siteModel, UserRole.SiteConsumer); } - @TestRail(section = {"rest-api", "sites" }, executionType = ExecutionType.SANITY, + @TestRail(section = {TestGroup.REST_API, TestGroup.SITES }, executionType = ExecutionType.SANITY, description = "Verify that site manager can delete site member and gets status code 204, 'No Content'") public void siteManagerIsAbleToDeleteSiteMember() throws Exception{ restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteManager)); @@ -59,7 +60,7 @@ public class RemoveSiteMemberSanityTests extends RestTest } @Bug(id="ACE-5444") - @TestRail(section = {"rest-api", "sites" }, executionType = ExecutionType.SANITY, + @TestRail(section = {TestGroup.REST_API, TestGroup.SITES }, executionType = ExecutionType.SANITY, description = "Verify that site collaborator cannot delete site member and gets status code 403, 'Forbidden'") public void siteCollaboratorIsNotAbleToDeleteSiteMember() throws Exception{ restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteCollaborator)); @@ -68,7 +69,7 @@ public class RemoveSiteMemberSanityTests extends RestTest } @Bug(id="ACE-5444") - @TestRail(section = {"rest-api", "sites" }, executionType = ExecutionType.SANITY, + @TestRail(section = {TestGroup.REST_API, TestGroup.SITES }, executionType = ExecutionType.SANITY, description = "Verify that site contributor cannot delete site member and gets status code 403, 'Forbidden'") public void siteContributorIsNotAbleToDeleteSiteMember() throws Exception{ restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteContributor)); @@ -77,7 +78,7 @@ public class RemoveSiteMemberSanityTests extends RestTest } @Bug(id="ACE-5444") - @TestRail(section = {"rest-api", "sites" }, executionType = ExecutionType.SANITY, + @TestRail(section = {TestGroup.REST_API, TestGroup.SITES }, executionType = ExecutionType.SANITY, description = "Verify that site consumer cannot delete site member and gets status code 403, 'Forbidden'") public void siteConsumerIsNotAbleToDeleteSiteMember() throws Exception{ restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteConsumer)); @@ -85,7 +86,7 @@ public class RemoveSiteMemberSanityTests extends RestTest restSitesAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.FORBIDDEN); } - @TestRail(section = {"rest-api", "sites" }, executionType = ExecutionType.SANITY, + @TestRail(section = {TestGroup.REST_API, TestGroup.SITES }, executionType = ExecutionType.SANITY, description = "Verify that admin user can delete site member and gets status code 204, 'No Content'") public void adminUserIsAbleToDeleteSiteMember() throws Exception{ restClient.authenticateUser(adminUserModel); @@ -93,7 +94,7 @@ public class RemoveSiteMemberSanityTests extends RestTest restSitesAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.NO_CONTENT); } - @TestRail(section = {"rest-api", "sites" }, executionType = ExecutionType.SANITY, + @TestRail(section = {TestGroup.REST_API, TestGroup.SITES }, executionType = ExecutionType.SANITY, description = "Verify that unauthenticated user is not able to delete site member") public void unauthenticatedUserIsNotAuthorizedToDeleteSiteMember() throws Exception{ UserModel inexistentUser = new UserModel("inexistent user", "inexistent password"); diff --git a/e2e-test/java/org/alfresco/rest/sites/UpdateSiteMemberSanityTests.java b/e2e-test/java/org/alfresco/rest/sites/UpdateSiteMemberSanityTests.java index caccec1ba..27f3cc6eb 100644 --- a/e2e-test/java/org/alfresco/rest/sites/UpdateSiteMemberSanityTests.java +++ b/e2e-test/java/org/alfresco/rest/sites/UpdateSiteMemberSanityTests.java @@ -5,6 +5,7 @@ import org.alfresco.rest.requests.RestSitesApi; import org.alfresco.utility.constants.UserRole; import org.alfresco.utility.data.DataUser.ListUserWithRoles; import org.alfresco.utility.model.SiteModel; +import org.alfresco.utility.model.TestGroup; import org.alfresco.utility.model.UserModel; import org.alfresco.utility.report.Bug; import org.alfresco.utility.testrail.ExecutionType; @@ -14,7 +15,7 @@ import org.springframework.http.HttpStatus; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; -@Test(groups = { "rest-api", "sites", "sanity" }) +@Test(groups = { TestGroup.REST_API, TestGroup.SITES, TestGroup.COMMENTS }) public class UpdateSiteMemberSanityTests extends RestTest { @Autowired @@ -37,7 +38,7 @@ public class UpdateSiteMemberSanityTests extends RestTest dataUser.addUserToSite(testUserModel, siteModel, UserRole.SiteConsumer); } - @TestRail(section = {"rest-api", "sites" }, executionType = ExecutionType.SANITY, + @TestRail(section = {TestGroup.REST_API, TestGroup.SITES }, executionType = ExecutionType.SANITY, description = "Verify that manager is able to update site member and gets status code OK (200)") public void managerIsAbleToUpdateSiteMember() throws Exception { @@ -48,7 +49,7 @@ public class UpdateSiteMemberSanityTests extends RestTest } @Bug(id="ACE-5444") - @TestRail(section = {"rest-api", "sites" }, executionType = ExecutionType.SANITY, + @TestRail(section = {TestGroup.REST_API, TestGroup.SITES }, executionType = ExecutionType.SANITY, description = "Verify that collaborator is not able to update site member and gets status code FORBIDDEN (403)") public void collaboratorIsNotAbleToUpdateSiteMember() throws Exception { @@ -59,7 +60,7 @@ public class UpdateSiteMemberSanityTests extends RestTest } @Bug(id="ACE-5444") - @TestRail(section = {"rest-api", "sites" }, executionType = ExecutionType.SANITY, + @TestRail(section = {TestGroup.REST_API, TestGroup.SITES }, executionType = ExecutionType.SANITY, description = "Verify that contributor is not able to update site member and gets status code FORBIDDEN (403)") public void contributorIsNotAbleToUpdateSiteMember() throws Exception { @@ -70,7 +71,7 @@ public class UpdateSiteMemberSanityTests extends RestTest } @Bug(id="ACE-5444") - @TestRail(section = {"rest-api", "sites" }, executionType = ExecutionType.SANITY, + @TestRail(section = {TestGroup.REST_API, TestGroup.SITES }, executionType = ExecutionType.SANITY, description = "Verify that consumer is not able to update site member and gets status code FORBIDDEN (403)") public void consumerIsNotAbleToUpdateSiteMember() throws Exception { @@ -80,7 +81,7 @@ public class UpdateSiteMemberSanityTests extends RestTest siteAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.FORBIDDEN); } - @TestRail(section = {"rest-api", "sites" }, executionType = ExecutionType.SANITY, + @TestRail(section = {TestGroup.REST_API, TestGroup.SITES }, executionType = ExecutionType.SANITY, description = "Verify that admin is able to update site member and gets status code OK (200)") public void adminIsAbleToUpdateSiteMember() throws Exception { @@ -91,7 +92,7 @@ public class UpdateSiteMemberSanityTests extends RestTest } @Bug(id="MNT-16904") - @TestRail(section = {"rest-api", "sites" }, executionType = ExecutionType.SANITY, + @TestRail(section = {TestGroup.REST_API, TestGroup.SITES }, executionType = ExecutionType.SANITY, description = "Verify that unauthenticated user is not able to update site member") public void unauthenticatedUserIsNotAuthorizedToUpdateSiteMmeber() throws Exception{ UserModel inexistentUser = new UserModel("inexistent user", "inexistent password"); diff --git a/e2e-test/java/org/alfresco/rest/tags/AddTagSanityTests.java b/e2e-test/java/org/alfresco/rest/tags/AddTagSanityTests.java index db6cfa66e..45e1ca2c6 100644 --- a/e2e-test/java/org/alfresco/rest/tags/AddTagSanityTests.java +++ b/e2e-test/java/org/alfresco/rest/tags/AddTagSanityTests.java @@ -9,6 +9,7 @@ import org.alfresco.utility.data.DataUser; import org.alfresco.utility.data.RandomData; import org.alfresco.utility.model.FileModel; import org.alfresco.utility.model.SiteModel; +import org.alfresco.utility.model.TestGroup; import org.alfresco.utility.model.UserModel; import org.alfresco.utility.report.Bug; import org.alfresco.utility.testrail.ExecutionType; @@ -22,7 +23,7 @@ import org.testng.annotations.Test; /** * Created by Claudia Agache on 10/3/2016. */ -@Test(groups = { "rest-api", "tags", "sanity" }) +@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.COMMENTS }) public class AddTagSanityTests extends RestTest { @Autowired @@ -55,8 +56,8 @@ public class AddTagSanityTests extends RestTest tagValue = RandomData.getRandomName("tag"); } - @TestRail(section = { "rest-api", - "tags" }, executionType = ExecutionType.SANITY, description = "Verify admin user adds tags with Rest API and status code is 201") + @TestRail(section = { TestGroup.REST_API, + TestGroup.TAGS }, executionType = ExecutionType.SANITY, description = "Verify admin user adds tags with Rest API and status code is 201") public void adminIsAbleToAddTag() throws JsonToModelConversionException, Exception { restClient.authenticateUser(adminUserModel); @@ -65,8 +66,8 @@ public class AddTagSanityTests extends RestTest } - @TestRail(section = { "rest-api", - "tags" }, executionType = ExecutionType.SANITY, description = "Verify Manager user adds tags with Rest API and status code is 201") + @TestRail(section = { TestGroup.REST_API, + TestGroup.TAGS }, executionType = ExecutionType.SANITY, description = "Verify Manager user adds tags with Rest API and status code is 201") public void managerIsAbleToAddTag() throws JsonToModelConversionException, Exception { restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteManager)); @@ -74,8 +75,8 @@ public class AddTagSanityTests extends RestTest tagsAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.CREATED); } - @TestRail(section = { "rest-api", - "tags" }, executionType = ExecutionType.SANITY, description = "Verify Collaborator user adds tags with Rest API and status code is 201") + @TestRail(section = { TestGroup.REST_API, + TestGroup.TAGS }, executionType = ExecutionType.SANITY, description = "Verify Collaborator user adds tags with Rest API and status code is 201") public void collaboratorIsAbleToAddTag() throws JsonToModelConversionException, Exception { restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteCollaborator)); @@ -83,8 +84,8 @@ public class AddTagSanityTests extends RestTest tagsAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.CREATED); } - @TestRail(section = { "rest-api", - "tags" }, executionType = ExecutionType.SANITY, description = "Verify Contributor user doesn't have permission to add tags with Rest API and status code is 403") + @TestRail(section = { TestGroup.REST_API, + TestGroup.TAGS }, executionType = ExecutionType.SANITY, description = "Verify Contributor user doesn't have permission to add tags with Rest API and status code is 403") public void contributorIsNotAbleToAddTagToAnotherContent() throws JsonToModelConversionException, Exception { restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteContributor)); @@ -92,8 +93,8 @@ public class AddTagSanityTests extends RestTest tagsAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.FORBIDDEN); } - @TestRail(section = { "rest-api", - "tags" }, executionType = ExecutionType.SANITY, description = "Verify Contributor user adds tags to his content with Rest API and status code is 201") + @TestRail(section = { TestGroup.REST_API, + TestGroup.TAGS }, executionType = ExecutionType.SANITY, description = "Verify Contributor user adds tags to his content with Rest API and status code is 201") public void contributorIsAbleToAddTagToHisContent() throws JsonToModelConversionException, Exception { userModel = usersWithRoles.getOneUserWithRole(UserRole.SiteContributor); @@ -103,8 +104,8 @@ public class AddTagSanityTests extends RestTest tagsAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.CREATED); } - @TestRail(section = { "rest-api", - "tags" }, executionType = ExecutionType.SANITY, description = "Verify Consumer user doesn't have permission to add tags with Rest API and status code is 403") + @TestRail(section = { TestGroup.REST_API, + TestGroup.TAGS }, executionType = ExecutionType.SANITY, description = "Verify Consumer user doesn't have permission to add tags with Rest API and status code is 403") public void consumerIsNotAbleToAddTag() throws JsonToModelConversionException, Exception { restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteConsumer)); @@ -112,8 +113,8 @@ public class AddTagSanityTests extends RestTest tagsAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.FORBIDDEN); } - @TestRail(section = { "rest-api", - "tags" }, executionType = ExecutionType.SANITY, description = "Verify Manager user gets status code 401 if authentication call fails") + @TestRail(section = { TestGroup.REST_API, + TestGroup.TAGS }, executionType = ExecutionType.SANITY, description = "Verify Manager user gets status code 401 if authentication call fails") @Bug(id="MNT-16904") public void managerIsNotAbleToAddTagIfAuthenticationFails() throws JsonToModelConversionException, Exception { diff --git a/e2e-test/java/org/alfresco/rest/tags/AddTagsSanityTests.java b/e2e-test/java/org/alfresco/rest/tags/AddTagsSanityTests.java index 1e4a439e5..a12a11918 100644 --- a/e2e-test/java/org/alfresco/rest/tags/AddTagsSanityTests.java +++ b/e2e-test/java/org/alfresco/rest/tags/AddTagsSanityTests.java @@ -9,6 +9,7 @@ import org.alfresco.utility.data.DataUser; import org.alfresco.utility.data.RandomData; import org.alfresco.utility.model.FileModel; import org.alfresco.utility.model.SiteModel; +import org.alfresco.utility.model.TestGroup; import org.alfresco.utility.model.UserModel; import org.alfresco.utility.report.Bug; import org.alfresco.utility.testrail.ExecutionType; @@ -22,7 +23,7 @@ import org.testng.annotations.Test; /** * Created by Claudia Agache on 10/7/2016. */ -@Test(groups = { "rest-api", "tags", "sanity" }) +@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.COMMENTS }) public class AddTagsSanityTests extends RestTest { @Autowired @@ -56,8 +57,8 @@ public class AddTagsSanityTests extends RestTest tag2 = RandomData.getRandomName("tag"); } - @TestRail(section = { "rest-api", - "tags" }, executionType = ExecutionType.SANITY, description = "Verify admin user adds multiple tags with Rest API and status code is 201") + @TestRail(section = { TestGroup.REST_API, + TestGroup.TAGS }, executionType = ExecutionType.SANITY, description = "Verify admin user adds multiple tags with Rest API and status code is 201") public void adminIsAbleToAddTags() throws JsonToModelConversionException, Exception { restClient.authenticateUser(adminUserModel); @@ -65,8 +66,8 @@ public class AddTagsSanityTests extends RestTest tagsAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.CREATED); } - @TestRail(section = { "rest-api", - "tags" }, executionType = ExecutionType.SANITY, description = "Verify Manager user adds multiple tags with Rest API and status code is 201") + @TestRail(section = { TestGroup.REST_API, + TestGroup.TAGS }, executionType = ExecutionType.SANITY, description = "Verify Manager user adds multiple tags with Rest API and status code is 201") public void managerIsAbleToAddTags() throws JsonToModelConversionException, Exception { restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteManager)); @@ -74,8 +75,8 @@ public class AddTagsSanityTests extends RestTest tagsAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.CREATED); } - @TestRail(section = { "rest-api", - "tags" }, executionType = ExecutionType.SANITY, description = "Verify Collaborator user adds multiple tags with Rest API and status code is 201") + @TestRail(section = { TestGroup.REST_API, + TestGroup.TAGS }, executionType = ExecutionType.SANITY, description = "Verify Collaborator user adds multiple tags with Rest API and status code is 201") public void collaboratorIsAbleToAddTags() throws JsonToModelConversionException, Exception { restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteCollaborator)); @@ -83,8 +84,8 @@ public class AddTagsSanityTests extends RestTest tagsAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.CREATED); } - @TestRail(section = { "rest-api", - "tags" }, executionType = ExecutionType.SANITY, description = "Verify Contributor user doesn't have permission to add multiple tags with Rest API and status code is 403") + @TestRail(section = { TestGroup.REST_API, + TestGroup.TAGS }, executionType = ExecutionType.SANITY, description = "Verify Contributor user doesn't have permission to add multiple tags with Rest API and status code is 403") public void contributorIsNotAbleToAddTagsToAnotherContent() throws JsonToModelConversionException, Exception { restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteContributor)); @@ -92,8 +93,8 @@ public class AddTagsSanityTests extends RestTest tagsAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.FORBIDDEN); } - @TestRail(section = { "rest-api", - "tags" }, executionType = ExecutionType.SANITY, description = "Verify Contributor user adds multiple tags to his content with Rest API and status code is 201") + @TestRail(section = { TestGroup.REST_API, + TestGroup.TAGS }, executionType = ExecutionType.SANITY, description = "Verify Contributor user adds multiple tags to his content with Rest API and status code is 201") public void contributorIsAbleToAddTagsToHisContent() throws JsonToModelConversionException, Exception { userModel = usersWithRoles.getOneUserWithRole(UserRole.SiteContributor); @@ -103,8 +104,8 @@ public class AddTagsSanityTests extends RestTest tagsAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.CREATED); } - @TestRail(section = { "rest-api", - "tags" }, executionType = ExecutionType.SANITY, description = "Verify Consumer user doesn't have permission to add multiple tags with Rest API and status code is 403") + @TestRail(section = { TestGroup.REST_API, + TestGroup.TAGS }, executionType = ExecutionType.SANITY, description = "Verify Consumer user doesn't have permission to add multiple tags with Rest API and status code is 403") public void consumerIsNotAbleToAddTags() throws JsonToModelConversionException, Exception { restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteConsumer)); @@ -112,8 +113,8 @@ public class AddTagsSanityTests extends RestTest tagsAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.FORBIDDEN); } - @TestRail(section = { "rest-api", - "tags" }, executionType = ExecutionType.SANITY, description = "Verify Manager user gets status code 401 if authentication call fails") + @TestRail(section = { TestGroup.REST_API, + TestGroup.TAGS }, executionType = ExecutionType.SANITY, description = "Verify Manager user gets status code 401 if authentication call fails") @Bug(id="MNT-16904") public void managerIsNotAbleToAddTagsIfAuthenticationFails() throws JsonToModelConversionException, Exception { diff --git a/e2e-test/java/org/alfresco/rest/tags/DeleteTagSanityTests.java b/e2e-test/java/org/alfresco/rest/tags/DeleteTagSanityTests.java index 6ce9fe0e1..b8c906b58 100644 --- a/e2e-test/java/org/alfresco/rest/tags/DeleteTagSanityTests.java +++ b/e2e-test/java/org/alfresco/rest/tags/DeleteTagSanityTests.java @@ -9,6 +9,7 @@ import org.alfresco.utility.constants.UserRole; import org.alfresco.utility.data.DataUser; import org.alfresco.utility.model.FileModel; import org.alfresco.utility.model.SiteModel; +import org.alfresco.utility.model.TestGroup; import org.alfresco.utility.model.UserModel; import org.alfresco.utility.testrail.ExecutionType; import org.alfresco.utility.testrail.annotation.TestRail; @@ -20,7 +21,7 @@ import org.testng.annotations.Test; /** * Created by Claudia Agache on 10/4/2016. */ -@Test(groups = { "rest-api", "tags", "sanity" }) +@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.COMMENTS }) public class DeleteTagSanityTests extends RestTest { @Autowired @@ -45,8 +46,8 @@ public class DeleteTagSanityTests extends RestTest tagsAPI.useRestClient(restClient); } - @TestRail(section = { "rest-api", - "tags" }, executionType = ExecutionType.SANITY, description = "Verify Admin user deletes tags with Rest API and status code is 204") + @TestRail(section = { TestGroup.REST_API, + TestGroup.TAGS }, executionType = ExecutionType.SANITY, description = "Verify Admin user deletes tags with Rest API and status code is 204") public void adminIsAbleToDeleteTags() throws JsonToModelConversionException, Exception { restClient.authenticateUser(adminUserModel); @@ -56,8 +57,8 @@ public class DeleteTagSanityTests extends RestTest tagsAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.NO_CONTENT); } - @TestRail(section = { "rest-api", - "tags" }, executionType = ExecutionType.SANITY, description = "Verify Manager user deletes tags created by admin user with Rest API and status code is 204") + @TestRail(section = { TestGroup.REST_API, + TestGroup.TAGS }, executionType = ExecutionType.SANITY, description = "Verify Manager user deletes tags created by admin user with Rest API and status code is 204") public void managerIsAbleToDeleteTags() throws JsonToModelConversionException, Exception { restClient.authenticateUser(adminUserModel); @@ -68,8 +69,8 @@ public class DeleteTagSanityTests extends RestTest tagsAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.NO_CONTENT); } - @TestRail(section = { "rest-api", - "tags" }, executionType = ExecutionType.SANITY, description = "Verify Collaborator user deletes tags created by admin user with Rest API and status code is 204") + @TestRail(section = { TestGroup.REST_API, + TestGroup.TAGS }, executionType = ExecutionType.SANITY, description = "Verify Collaborator user deletes tags created by admin user with Rest API and status code is 204") public void collaboratorIsAbleToDeleteTags() throws JsonToModelConversionException, Exception { restClient.authenticateUser(adminUserModel); @@ -80,7 +81,7 @@ public class DeleteTagSanityTests extends RestTest tagsAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.NO_CONTENT); } - @TestRail(section = { "rest-api", "tags" }, + @TestRail(section = { TestGroup.REST_API, TestGroup.TAGS }, executionType = ExecutionType.SANITY, description = "Verify Contributor user can't delete tags created by admin user with Rest API and status code is 403") public void contributorIsNotAbleToDeleteTagsForAnotherUserContent() throws JsonToModelConversionException, Exception { @@ -92,8 +93,8 @@ public class DeleteTagSanityTests extends RestTest tagsAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.FORBIDDEN); } - @TestRail(section = { "rest-api", - "tags" }, executionType = ExecutionType.SANITY, description = "Verify Contributor user deletes tags created by him with Rest API and status code is 204") + @TestRail(section = { TestGroup.REST_API, + TestGroup.TAGS }, executionType = ExecutionType.SANITY, description = "Verify Contributor user deletes tags created by him with Rest API and status code is 204") public void contributorIsAbleToDeleteTagsForHisContent() throws JsonToModelConversionException, Exception { userModel = usersWithRoles.getOneUserWithRole(UserRole.SiteContributor); @@ -104,8 +105,8 @@ public class DeleteTagSanityTests extends RestTest tagsAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.NO_CONTENT); } - @TestRail(section = { "rest-api", - "tags" }, executionType = ExecutionType.SANITY, description = "Verify Consumer user can't delete tags created by admin user with Rest API and status code is 403") + @TestRail(section = { TestGroup.REST_API, + TestGroup.TAGS }, executionType = ExecutionType.SANITY, description = "Verify Consumer user can't delete tags created by admin user with Rest API and status code is 403") public void consumerIsNotAbleToDeleteTags() throws JsonToModelConversionException, Exception { restClient.authenticateUser(adminUserModel); @@ -116,8 +117,8 @@ public class DeleteTagSanityTests extends RestTest tagsAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.FORBIDDEN); } - @TestRail(section = { "rest-api", - "tags" }, executionType = ExecutionType.SANITY, description = "Verify Manager user gets status code 401 if authentication call fails") + @TestRail(section = { TestGroup.REST_API, + TestGroup.TAGS }, executionType = ExecutionType.SANITY, description = "Verify Manager user gets status code 401 if authentication call fails") public void managerIsNotAbleToDeleteTagIfAuthenticationFails() throws JsonToModelConversionException, Exception { restClient.authenticateUser(adminUserModel); diff --git a/e2e-test/java/org/alfresco/rest/tags/GetNodeTagsSanityTests.java b/e2e-test/java/org/alfresco/rest/tags/GetNodeTagsSanityTests.java index fac8e59aa..f08461656 100644 --- a/e2e-test/java/org/alfresco/rest/tags/GetNodeTagsSanityTests.java +++ b/e2e-test/java/org/alfresco/rest/tags/GetNodeTagsSanityTests.java @@ -6,10 +6,11 @@ import org.alfresco.rest.exception.JsonToModelConversionException; import org.alfresco.rest.requests.RestTagsApi; import org.alfresco.utility.constants.UserRole; import org.alfresco.utility.data.DataUser; -import org.alfresco.utility.data.RandomData; import org.alfresco.utility.data.DataUser.ListUserWithRoles; +import org.alfresco.utility.data.RandomData; import org.alfresco.utility.model.FileModel; import org.alfresco.utility.model.SiteModel; +import org.alfresco.utility.model.TestGroup; import org.alfresco.utility.model.UserModel; import org.alfresco.utility.report.Bug; import org.alfresco.utility.testrail.ExecutionType; @@ -19,7 +20,7 @@ import org.springframework.http.HttpStatus; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; -@Test(groups = { "rest-api", "tags", "sanity" }) +@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.COMMENTS }) public class GetNodeTagsSanityTests extends RestTest { @Autowired @@ -53,7 +54,7 @@ public class GetNodeTagsSanityTests extends RestTest tagsAPI.addTag(document, tagValue); } - @TestRail(section = { "rest-api", "tags" }, + @TestRail(section = { TestGroup.REST_API, TestGroup.TAGS }, executionType = ExecutionType.SANITY, description = "Verify site Manager is able to get node tags") public void siteManagerIsAbleToRetrieveNodeTags() throws JsonToModelConversionException, Exception { @@ -67,7 +68,7 @@ public class GetNodeTagsSanityTests extends RestTest .assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", "tags" }, + @TestRail(section = { TestGroup.REST_API, TestGroup.TAGS }, executionType = ExecutionType.SANITY, description = "Verify site Collaborator is able to get node tags") public void siteCollaboratorIsAbleToRetrieveNodeTags() throws JsonToModelConversionException, Exception { @@ -80,7 +81,7 @@ public class GetNodeTagsSanityTests extends RestTest .assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", "tags" }, + @TestRail(section = { TestGroup.REST_API, TestGroup.TAGS }, executionType = ExecutionType.SANITY, description = "Verify site Contributor is able to get node tags") public void siteContributorIsAbleToRetrieveNodeTags() throws JsonToModelConversionException, Exception { @@ -91,7 +92,7 @@ public class GetNodeTagsSanityTests extends RestTest .assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", "tags" }, + @TestRail(section = { TestGroup.REST_API, TestGroup.TAGS }, executionType = ExecutionType.SANITY, description = "Verify site Consumer is able to get node tags") public void siteConsumerIsAbleToRetrieveNodeTags() throws JsonToModelConversionException, Exception { @@ -102,7 +103,7 @@ public class GetNodeTagsSanityTests extends RestTest .assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", "tags" }, + @TestRail(section = { TestGroup.REST_API, TestGroup.TAGS }, executionType = ExecutionType.SANITY, description = "Verify admin is able to get node tags") public void adminIsAbleToRetrieveNodeTags() throws JsonToModelConversionException, Exception { @@ -113,7 +114,7 @@ public class GetNodeTagsSanityTests extends RestTest .assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", "tags" }, + @TestRail(section = { TestGroup.REST_API, TestGroup.TAGS }, executionType = ExecutionType.SANITY, description = "Verify unauthenticated user is not able to get node tags") @Bug(id="MNT-16904") public void unauthenticatedUserIsNotAbleToRetrieveNodeTags() throws JsonToModelConversionException, Exception diff --git a/e2e-test/java/org/alfresco/rest/tags/GetTagSanityTests.java b/e2e-test/java/org/alfresco/rest/tags/GetTagSanityTests.java index e76a13e0c..8fdc23e67 100644 --- a/e2e-test/java/org/alfresco/rest/tags/GetTagSanityTests.java +++ b/e2e-test/java/org/alfresco/rest/tags/GetTagSanityTests.java @@ -11,6 +11,7 @@ import org.alfresco.utility.data.DataUser.ListUserWithRoles; import org.alfresco.utility.data.RandomData; import org.alfresco.utility.model.FileModel; import org.alfresco.utility.model.SiteModel; +import org.alfresco.utility.model.TestGroup; import org.alfresco.utility.model.UserModel; import org.alfresco.utility.testrail.ExecutionType; import org.alfresco.utility.testrail.annotation.TestRail; @@ -19,7 +20,7 @@ import org.springframework.http.HttpStatus; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; -@Test(groups = { "rest-api", "tags", "sanity" }) +@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.COMMENTS }) public class GetTagSanityTests extends RestTest { @@ -47,7 +48,7 @@ public class GetTagSanityTests extends RestTest } - @TestRail(section = { "rest-api", "tags" }, executionType = ExecutionType.SANITY, description = "Verify admin user gets tag using REST API and status code is OK (200)") + @TestRail(section = { TestGroup.REST_API, TestGroup.TAGS }, executionType = ExecutionType.SANITY, description = "Verify admin user gets tag using REST API and status code is OK (200)") public void userWithAdminIsAbletoGetTag() throws JsonToModelConversionException, Exception { String tagValue = RandomData.getRandomName("tag"); @@ -59,7 +60,7 @@ public class GetTagSanityTests extends RestTest } - @TestRail(section = { "rest-api", "tags" }, executionType = ExecutionType.SANITY, description = "Verify user with Manager role gets tag using REST API and status code is OK (200)") + @TestRail(section = { TestGroup.REST_API, TestGroup.TAGS }, executionType = ExecutionType.SANITY, description = "Verify user with Manager role gets tag using REST API and status code is OK (200)") public void userWithManagerRoleIsAbletoGetTag() throws JsonToModelConversionException, Exception { String tagValue = RandomData.getRandomName("tag"); @@ -70,7 +71,7 @@ public class GetTagSanityTests extends RestTest tagsAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", "tags" }, executionType = ExecutionType.SANITY, description = "Verify user with Collaborator role gets tag using REST API and status code is OK (200)") + @TestRail(section = { TestGroup.REST_API, TestGroup.TAGS }, executionType = ExecutionType.SANITY, description = "Verify user with Collaborator role gets tag using REST API and status code is OK (200)") public void userWithCollaboratorRoleIsAbletoGetTag() throws JsonToModelConversionException, Exception { String tagValue = RandomData.getRandomName("tag"); @@ -81,7 +82,7 @@ public class GetTagSanityTests extends RestTest tagsAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", "tags" }, executionType = ExecutionType.SANITY, description = "Verify user with Contributor role gets tag using REST API and status code is OK (200)") + @TestRail(section = { TestGroup.REST_API, TestGroup.TAGS }, executionType = ExecutionType.SANITY, description = "Verify user with Contributor role gets tag using REST API and status code is OK (200)") public void userWithContributorRoleIsAbletoGetTag() throws JsonToModelConversionException, Exception { String tagValue = RandomData.getRandomName("tag"); @@ -94,7 +95,7 @@ public class GetTagSanityTests extends RestTest } - @TestRail(section = { "rest-api", "tags" }, executionType = ExecutionType.SANITY, description = "Verify user with Consumer role gets tag using REST API and status code is OK (200)") + @TestRail(section = { TestGroup.REST_API, TestGroup.TAGS }, executionType = ExecutionType.SANITY, description = "Verify user with Consumer role gets tag using REST API and status code is OK (200)") public void userWithConsumerRoleIsAbletoGetTag() throws JsonToModelConversionException, Exception { String tagValue = RandomData.getRandomName("tag"); @@ -106,7 +107,7 @@ public class GetTagSanityTests extends RestTest tagsAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", "tags" }, executionType = ExecutionType.SANITY, description = "Verify Manager user gets status code 401 if authentication call fails") + @TestRail(section = { TestGroup.REST_API, TestGroup.TAGS }, executionType = ExecutionType.SANITY, description = "Verify Manager user gets status code 401 if authentication call fails") public void managerIsNotAbleToGetTagIfAuthenticationFails() throws JsonToModelConversionException, Exception { String tagValue = RandomData.getRandomName("tag"); diff --git a/e2e-test/java/org/alfresco/rest/tags/GetTagsSanityTests.java b/e2e-test/java/org/alfresco/rest/tags/GetTagsSanityTests.java index 4b6f7d7f2..d016f7deb 100644 --- a/e2e-test/java/org/alfresco/rest/tags/GetTagsSanityTests.java +++ b/e2e-test/java/org/alfresco/rest/tags/GetTagsSanityTests.java @@ -7,6 +7,7 @@ import org.alfresco.utility.constants.UserRole; import org.alfresco.utility.data.DataUser; import org.alfresco.utility.data.DataUser.ListUserWithRoles; import org.alfresco.utility.model.SiteModel; +import org.alfresco.utility.model.TestGroup; import org.alfresco.utility.model.UserModel; import org.alfresco.utility.report.Bug; import org.alfresco.utility.testrail.ExecutionType; @@ -16,7 +17,7 @@ import org.springframework.http.HttpStatus; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; -@Test(groups = { "rest-api", "tags", "sanity" }) +@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.COMMENTS }) public class GetTagsSanityTests extends RestTest { @Autowired @@ -41,7 +42,7 @@ public class GetTagsSanityTests extends RestTest } - @TestRail(section = { "rest-api", "tags" }, executionType = ExecutionType.SANITY, description = "Verify user with Manager role gets tags using REST API and status code is OK (200)") + @TestRail(section = { TestGroup.REST_API, TestGroup.TAGS }, executionType = ExecutionType.SANITY, description = "Verify user with Manager role gets tags using REST API and status code is OK (200)") public void getTagsWithManagerRole() throws JsonToModelConversionException, Exception { @@ -50,7 +51,7 @@ public class GetTagsSanityTests extends RestTest tagsAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", "tags" }, executionType = ExecutionType.SANITY, description = "Verify user with Collaborator role gets tags using REST API and status code is OK (200)") + @TestRail(section = { TestGroup.REST_API, TestGroup.TAGS }, executionType = ExecutionType.SANITY, description = "Verify user with Collaborator role gets tags using REST API and status code is OK (200)") public void getTagsWithCollaboratorRole() throws JsonToModelConversionException, Exception { @@ -59,7 +60,7 @@ public class GetTagsSanityTests extends RestTest tagsAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", "tags" }, executionType = ExecutionType.SANITY, description = "Verify user with Contributor role gets tags using REST API and status code is OK (200)") + @TestRail(section = { TestGroup.REST_API, TestGroup.TAGS }, executionType = ExecutionType.SANITY, description = "Verify user with Contributor role gets tags using REST API and status code is OK (200)") public void getTagsWithContributorRole() throws JsonToModelConversionException, Exception { @@ -68,7 +69,7 @@ public class GetTagsSanityTests extends RestTest tagsAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", "tags" }, executionType = ExecutionType.SANITY, description = "Verify user with Consumer role gets tags using REST API and status code is OK (200)") + @TestRail(section = { TestGroup.REST_API, TestGroup.TAGS }, executionType = ExecutionType.SANITY, description = "Verify user with Consumer role gets tags using REST API and status code is OK (200)") public void getTagsWithConsumerRole() throws JsonToModelConversionException, Exception { @@ -77,7 +78,7 @@ public class GetTagsSanityTests extends RestTest tagsAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", "tags" }, executionType = ExecutionType.SANITY, description = "Verify Admin user gets tags using REST API and status code is OK (200)") + @TestRail(section = { TestGroup.REST_API, TestGroup.TAGS }, executionType = ExecutionType.SANITY, description = "Verify Admin user gets tags using REST API and status code is OK (200)") public void getTagsWithAdminUser() throws JsonToModelConversionException, Exception { restClient.authenticateUser(adminUserModel); @@ -85,7 +86,7 @@ public class GetTagsSanityTests extends RestTest tagsAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", "tags" }, executionType = ExecutionType.SANITY, description = "Failed authentication get tags call returns status code 401 with Manager role") + @TestRail(section = { TestGroup.REST_API, TestGroup.TAGS }, executionType = ExecutionType.SANITY, description = "Failed authentication get tags call returns status code 401 with Manager role") @Bug(id = "MNT-16904") public void getTagsWithManagerRoleFailedAuth() throws JsonToModelConversionException, Exception { diff --git a/e2e-test/java/org/alfresco/rest/tags/UpdateTagSanityTests.java b/e2e-test/java/org/alfresco/rest/tags/UpdateTagSanityTests.java index ac0d1f9ae..1e8ae61e2 100644 --- a/e2e-test/java/org/alfresco/rest/tags/UpdateTagSanityTests.java +++ b/e2e-test/java/org/alfresco/rest/tags/UpdateTagSanityTests.java @@ -10,6 +10,7 @@ import org.alfresco.utility.data.DataUser; import org.alfresco.utility.data.RandomData; import org.alfresco.utility.model.FileModel; import org.alfresco.utility.model.SiteModel; +import org.alfresco.utility.model.TestGroup; import org.alfresco.utility.model.UserModel; import org.alfresco.utility.report.Bug; import org.alfresco.utility.testrail.ExecutionType; @@ -23,7 +24,7 @@ import org.testng.annotations.Test; /** * Created by Claudia Agache on 10/4/2016. */ -@Test(groups = { "rest-api", "tags", "sanity" }) +@Test(groups = { TestGroup.REST_API, TestGroup.TAGS, TestGroup.COMMENTS }) public class UpdateTagSanityTests extends RestTest { @Autowired RestTagsApi tagsAPI; @@ -55,7 +56,7 @@ public class UpdateTagSanityTests extends RestTest randomTag = RandomData.getRandomName("tag"); } - @TestRail(section = { "rest-api", "tags" }, executionType = ExecutionType.SANITY, description = "Verify Admin user updates tags and status code is 200") + @TestRail(section = { TestGroup.REST_API, TestGroup.TAGS }, executionType = ExecutionType.SANITY, description = "Verify Admin user updates tags and status code is 200") @Bug(id="MNT-16917") public void adminIsAbleToUpdateTags() throws JsonToModelConversionException, Exception { @@ -63,8 +64,8 @@ public class UpdateTagSanityTests extends RestTest tagsAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", - "tags" }, executionType = ExecutionType.SANITY, description = "Verify Manager user can't update tags with Rest API and status code is 403") + @TestRail(section = { TestGroup.REST_API, + TestGroup.TAGS }, executionType = ExecutionType.SANITY, description = "Verify Manager user can't update tags with Rest API and status code is 403") public void managerIsNotAbleToUpdateTag() throws JsonToModelConversionException, Exception { restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteManager)); @@ -72,8 +73,8 @@ public class UpdateTagSanityTests extends RestTest tagsAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.FORBIDDEN); } - @TestRail(section = { "rest-api", - "tags" }, executionType = ExecutionType.SANITY, description = "Verify Collaborator user can't update tags with Rest API and status code is 403") + @TestRail(section = { TestGroup.REST_API, + TestGroup.TAGS }, executionType = ExecutionType.SANITY, description = "Verify Collaborator user can't update tags with Rest API and status code is 403") public void collaboratorIsNotAbleToUpdateTag() throws JsonToModelConversionException, Exception { restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteCollaborator)); @@ -81,8 +82,8 @@ public class UpdateTagSanityTests extends RestTest tagsAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.FORBIDDEN); } - @TestRail(section = { "rest-api", - "tags" }, executionType = ExecutionType.SANITY, description = "Verify Contributor user can't update tags with Rest API and status code is 403") + @TestRail(section = { TestGroup.REST_API, + TestGroup.TAGS }, executionType = ExecutionType.SANITY, description = "Verify Contributor user can't update tags with Rest API and status code is 403") public void contributorIsNotAbleToUpdateTag() throws JsonToModelConversionException, Exception { restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteContributor)); @@ -90,8 +91,8 @@ public class UpdateTagSanityTests extends RestTest tagsAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.FORBIDDEN); } - @TestRail(section = { "rest-api", - "tags" }, executionType = ExecutionType.SANITY, description = "Verify Consumer user can't update tags with Rest API and status code is 403") + @TestRail(section = { TestGroup.REST_API, + TestGroup.TAGS }, executionType = ExecutionType.SANITY, description = "Verify Consumer user can't update tags with Rest API and status code is 403") public void consumerIsNotAbleToUpdateTag() throws JsonToModelConversionException, Exception { restClient.authenticateUser(usersWithRoles.getOneUserWithRole(UserRole.SiteConsumer)); @@ -99,8 +100,8 @@ public class UpdateTagSanityTests extends RestTest tagsAPI.usingRestWrapper().assertStatusCodeIs(HttpStatus.FORBIDDEN); } - @TestRail(section = { "rest-api", - "tags" }, executionType = ExecutionType.SANITY, description = "Verify Manager user gets status code 401 if authentication call fails") + @TestRail(section = { TestGroup.REST_API, + TestGroup.TAGS }, executionType = ExecutionType.SANITY, description = "Verify Manager user gets status code 401 if authentication call fails") @Bug(id="MNT-16904") public void managerIsNotAbleToUpdateTagIfAuthenticationFails() throws JsonToModelConversionException, Exception { diff --git a/e2e-test/java/org/alfresco/rest/workflow/deployments/GetDeploymentsSanityTests.java b/e2e-test/java/org/alfresco/rest/workflow/deployments/GetDeploymentsSanityTests.java index 1683e2c2f..2878d4e2a 100644 --- a/e2e-test/java/org/alfresco/rest/workflow/deployments/GetDeploymentsSanityTests.java +++ b/e2e-test/java/org/alfresco/rest/workflow/deployments/GetDeploymentsSanityTests.java @@ -5,6 +5,7 @@ import org.alfresco.rest.exception.JsonToModelConversionException; import org.alfresco.rest.requests.RestDeploymentsApi; import org.alfresco.rest.requests.RestTenantApi; import org.alfresco.utility.data.DataUser; +import org.alfresco.utility.model.TestGroup; import org.alfresco.utility.model.UserModel; import org.alfresco.utility.testrail.ExecutionType; import org.alfresco.utility.testrail.annotation.TestRail; @@ -16,7 +17,7 @@ import org.testng.annotations.Test; /** * Created by Claudia Agache on 10/4/2016. */ -@Test(groups = { "rest-api", "deployments", "sanity" }) +@Test(groups = { TestGroup.REST_API, "deployments", TestGroup.COMMENTS, TestGroup.NETWORKS }) public class GetDeploymentsSanityTests extends RestWorkflowTest { @Autowired @@ -37,8 +38,7 @@ public class GetDeploymentsSanityTests extends RestWorkflowTest deploymentsApi.useRestClient(restClient); } - // works on docker - @TestRail(section = { "rest-api", + @TestRail(section = { TestGroup.REST_API, "deployments" }, executionType = ExecutionType.SANITY, description = "Verify Admin user gets non-network deployments using REST API and status code is OK (200)") public void getNonNetworkDeploymentsWithAdmin() throws JsonToModelConversionException, Exception { @@ -47,11 +47,8 @@ public class GetDeploymentsSanityTests extends RestWorkflowTest deploymentsApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - // works on alfresco.server=172.29.100.215 - @TestRail(section = { "rest-api", + @TestRail(section = { TestGroup.REST_API, "deployments" }, executionType = ExecutionType.SANITY, description = "Verify Tenant Admin user gets network deployments using REST API and status code is OK (200)") - - @Test(groups = { "networks" }) public void getNetworkDeploymentsWithAdmin() throws JsonToModelConversionException, Exception { tenantApi.useRestClient(restClient); diff --git a/e2e-test/java/org/alfresco/rest/workflow/processDefinitions/GetProcessDefinitionImageSanityTests.java b/e2e-test/java/org/alfresco/rest/workflow/processDefinitions/GetProcessDefinitionImageSanityTests.java index 0765f427d..d9980d2b7 100644 --- a/e2e-test/java/org/alfresco/rest/workflow/processDefinitions/GetProcessDefinitionImageSanityTests.java +++ b/e2e-test/java/org/alfresco/rest/workflow/processDefinitions/GetProcessDefinitionImageSanityTests.java @@ -4,6 +4,7 @@ import org.alfresco.rest.RestWorkflowTest; import org.alfresco.rest.model.RestProcessDefinitionModel; import org.alfresco.rest.requests.RestProcessDefinitionsApi; import org.alfresco.utility.data.DataUser; +import org.alfresco.utility.model.TestGroup; import org.alfresco.utility.model.UserModel; import org.alfresco.utility.testrail.ExecutionType; import org.alfresco.utility.testrail.annotation.TestRail; @@ -15,40 +16,38 @@ import org.testng.annotations.Test; /** * Created by Claudia Agache on 10/13/2016. */ -@Test(groups = { "rest-api", "process-definitions", "sanity" }) -public class GetProcessDefinitionImageSanityTests extends RestWorkflowTest -{ - @Autowired - private DataUser dataUser; - @Autowired - private RestProcessDefinitionsApi processDefinitionsApi; +@Test(groups = { TestGroup.REST_API, TestGroup.PROCESS_DEFINITION, TestGroup.COMMENTS }) +public class GetProcessDefinitionImageSanityTests extends RestWorkflowTest { + @Autowired + private DataUser dataUser; + @Autowired + private RestProcessDefinitionsApi processDefinitionsApi; - private UserModel testUser; - private RestProcessDefinitionModel randomProcessDefinition; + private UserModel testUser; + private RestProcessDefinitionModel randomProcessDefinition; - @BeforeClass(alwaysRun = true) - public void dataPreparation() throws Exception - { - testUser = dataUser.createRandomTestUser(); - processDefinitionsApi.useRestClient(restClient); - restClient.authenticateUser(dataUser.getAdminUser()); - randomProcessDefinition = processDefinitionsApi.getProcessDefinitions().getOneRandomEntry(); - } + @BeforeClass(alwaysRun = true) + public void dataPreparation() throws Exception { + testUser = dataUser.createRandomTestUser(); + processDefinitionsApi.useRestClient(restClient); + restClient.authenticateUser(dataUser.getAdminUser()); + randomProcessDefinition = processDefinitionsApi.getProcessDefinitions().getOneRandomEntry(); + } - @TestRail(section = { "rest-api", "process-definitions" }, - executionType = ExecutionType.SANITY, description = "Verify Any user gets a specific process definition image for non-network deployments using REST API and status code is OK (200)") - public void anyUserGetsProcessDefinitionImage() throws Exception - { - restClient.authenticateUser(testUser); - processDefinitionsApi.getProcessDefinitionImage(randomProcessDefinition).assertResponseContainsImage(); - processDefinitionsApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); - } + @TestRail(section = { TestGroup.REST_API, + TestGroup.PROCESS_DEFINITION }, executionType = ExecutionType.SANITY, description = "Verify Any user gets a specific process definition image for non-network deployments using REST API and status code is OK (200)") + public void anyUserGetsProcessDefinitionImage() throws Exception { + restClient.authenticateUser(testUser); + processDefinitionsApi.getProcessDefinitionImage(randomProcessDefinition) + .assertResponseContainsImage(); + processDefinitionsApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); + } - @TestRail(section = { "rest-api", "process-definitions" }, - executionType = ExecutionType.SANITY, description = "Verify Admin user gets a specific process definition image for non-network deployments using REST API and status code is OK (200)") - public void adminGetsProcessDefinitionImage() throws Exception - { - processDefinitionsApi.getProcessDefinitionImage(randomProcessDefinition).assertResponseContainsImage(); - processDefinitionsApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); - } + @TestRail(section = { TestGroup.REST_API, + TestGroup.PROCESS_DEFINITION }, executionType = ExecutionType.SANITY, description = "Verify Admin user gets a specific process definition image for non-network deployments using REST API and status code is OK (200)") + public void adminGetsProcessDefinitionImage() throws Exception { + processDefinitionsApi.getProcessDefinitionImage(randomProcessDefinition) + .assertResponseContainsImage(); + processDefinitionsApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); + } } \ No newline at end of file diff --git a/e2e-test/java/org/alfresco/rest/workflow/processDefinitions/GetProcessDefinitionSanityTests.java b/e2e-test/java/org/alfresco/rest/workflow/processDefinitions/GetProcessDefinitionSanityTests.java index e6d624253..97d97b98a 100644 --- a/e2e-test/java/org/alfresco/rest/workflow/processDefinitions/GetProcessDefinitionSanityTests.java +++ b/e2e-test/java/org/alfresco/rest/workflow/processDefinitions/GetProcessDefinitionSanityTests.java @@ -4,6 +4,7 @@ import org.alfresco.rest.RestWorkflowTest; import org.alfresco.rest.model.RestProcessDefinitionModel; import org.alfresco.rest.requests.RestProcessDefinitionsApi; import org.alfresco.utility.data.DataUser; +import org.alfresco.utility.model.TestGroup; import org.alfresco.utility.model.UserModel; import org.alfresco.utility.testrail.ExecutionType; import org.alfresco.utility.testrail.annotation.TestRail; @@ -15,7 +16,7 @@ import org.testng.annotations.Test; /** * Created by Claudia Agache on 10/13/2016. */ -@Test(groups = { "rest-api", "process-definitions", "sanity" }) +@Test(groups = { TestGroup.REST_API, TestGroup.PROCESS_DEFINITION, TestGroup.COMMENTS }) public class GetProcessDefinitionSanityTests extends RestWorkflowTest { @Autowired @@ -35,7 +36,7 @@ public class GetProcessDefinitionSanityTests extends RestWorkflowTest randomProcessDefinition = processDefinitionsApi.getProcessDefinitions().getOneRandomEntry(); } - @TestRail(section = { "rest-api", "process-definitions" }, + @TestRail(section = { TestGroup.REST_API, TestGroup.PROCESS_DEFINITION }, executionType = ExecutionType.SANITY, description = "Verify Admin user gets a specific process definition for non-network deployments using REST API and status code is OK (200)") public void adminGetsProcessDefinition() throws Exception @@ -44,7 +45,7 @@ public class GetProcessDefinitionSanityTests extends RestWorkflowTest processDefinitionsApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", "process-definitions" }, + @TestRail(section = { TestGroup.REST_API, TestGroup.PROCESS_DEFINITION }, executionType = ExecutionType.SANITY, description = "Verify Any user gets a specific process definition for non-network deployments using REST API and status code is OK (200)") public void anyUserGetsProcessDefinition() throws Exception diff --git a/e2e-test/java/org/alfresco/rest/workflow/processDefinitions/GetProcessDefinitionsSanityTests.java b/e2e-test/java/org/alfresco/rest/workflow/processDefinitions/GetProcessDefinitionsSanityTests.java index b83eec472..1528350f4 100644 --- a/e2e-test/java/org/alfresco/rest/workflow/processDefinitions/GetProcessDefinitionsSanityTests.java +++ b/e2e-test/java/org/alfresco/rest/workflow/processDefinitions/GetProcessDefinitionsSanityTests.java @@ -4,6 +4,7 @@ import org.alfresco.rest.RestWorkflowTest; import org.alfresco.rest.requests.RestProcessDefinitionsApi; import org.alfresco.rest.requests.RestTenantApi; import org.alfresco.utility.data.DataUser; +import org.alfresco.utility.model.TestGroup; import org.alfresco.utility.model.UserModel; import org.alfresco.utility.testrail.ExecutionType; import org.alfresco.utility.testrail.annotation.TestRail; @@ -15,7 +16,7 @@ import org.testng.annotations.Test; /** * Created by Claudia Agache on 10/13/2016. */ -@Test(groups = { "rest-api", "process-definitions", "sanity" }) +@Test(groups = { TestGroup.REST_API, TestGroup.PROCESS_DEFINITION, TestGroup.COMMENTS }) public class GetProcessDefinitionsSanityTests extends RestWorkflowTest { @Autowired @@ -37,7 +38,7 @@ public class GetProcessDefinitionsSanityTests extends RestWorkflowTest } // works on docker - @TestRail(section = { "rest-api", "process-definitions" }, + @TestRail(section = { TestGroup.REST_API, TestGroup.PROCESS_DEFINITION }, executionType = ExecutionType.SANITY, description = "Verify Admin user gets process definitions for non-network deployments using REST API and status code is OK (200)") public void nonNetworkAdminGetsProcessDefinitions() throws Exception { @@ -47,10 +48,10 @@ public class GetProcessDefinitionsSanityTests extends RestWorkflowTest } // works on alfresco.server=172.29.100.215 - @TestRail(section = { "rest-api", "process-definitions" }, + @TestRail(section = { TestGroup.REST_API, TestGroup.PROCESS_DEFINITION }, executionType = ExecutionType.SANITY, description = "Verify Tenant Admin user gets process definitions for network deployments using REST API and status code is OK (200)") - @Test(groups = { "networks" }) + @Test(groups = { TestGroup.NETWORKS }) public void networkAdminGetsProcessDefinitions() throws Exception { tenantApi.useRestClient(restClient); diff --git a/e2e-test/java/org/alfresco/rest/workflow/processes/AddProcessVariableSanityTests.java b/e2e-test/java/org/alfresco/rest/workflow/processes/AddProcessVariableSanityTests.java index 13eb59b47..4dc749e68 100644 --- a/e2e-test/java/org/alfresco/rest/workflow/processes/AddProcessVariableSanityTests.java +++ b/e2e-test/java/org/alfresco/rest/workflow/processes/AddProcessVariableSanityTests.java @@ -11,6 +11,7 @@ import org.alfresco.utility.data.DataUser; import org.alfresco.utility.data.RandomData; import org.alfresco.utility.model.FileModel; import org.alfresco.utility.model.SiteModel; +import org.alfresco.utility.model.TestGroup; import org.alfresco.utility.model.UserModel; import org.alfresco.utility.testrail.ExecutionType; import org.alfresco.utility.testrail.annotation.TestRail; @@ -22,7 +23,7 @@ import org.testng.annotations.Test; /** * @author iulia.cojocea */ -@Test(groups = { "rest-api", "processes", "sanity" }) +@Test(groups = { TestGroup.REST_API, "processes", TestGroup.COMMENTS }) public class AddProcessVariableSanityTests extends RestWorkflowTest { @Autowired @@ -52,7 +53,7 @@ public class AddProcessVariableSanityTests extends RestWorkflowTest processesApi.useRestClient(restClient); } - @TestRail(section = {"rest-api", "processes" }, executionType = ExecutionType.SANITY, + @TestRail(section = {TestGroup.REST_API, "processes" }, executionType = ExecutionType.SANITY, description = "Create non-existing variable") public void addProcessVariable() throws JsonToModelConversionException, Exception { @@ -63,7 +64,7 @@ public class AddProcessVariableSanityTests extends RestWorkflowTest processesApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.CREATED); } - @TestRail(section = {"rest-api", "processes" }, executionType = ExecutionType.SANITY, + @TestRail(section = {TestGroup.REST_API, "processes" }, executionType = ExecutionType.SANITY, description = "Update existing variable") public void updateExistingProcessVariable() throws JsonToModelConversionException, Exception { @@ -76,8 +77,8 @@ public class AddProcessVariableSanityTests extends RestWorkflowTest processesApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.CREATED); } - @Test(groups = { "networks" }) - @TestRail(section = {"rest-api", "processes" }, executionType = ExecutionType.SANITY, + @Test(groups = { TestGroup.NETWORKS }) + @TestRail(section = {TestGroup.REST_API, "processes" }, executionType = ExecutionType.SANITY, description = "Add process variable using admin user from same network") public void addProcessVariableByAdmin() throws JsonToModelConversionException, Exception { @@ -100,7 +101,7 @@ public class AddProcessVariableSanityTests extends RestWorkflowTest processesApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.CREATED); } - @TestRail(section = {"rest-api", "processes" }, executionType = ExecutionType.SANITY, + @TestRail(section = {TestGroup.REST_API, "processes" }, executionType = ExecutionType.SANITY, description = "Adding process variable is falling in case invalid variableBody is provided") public void failedAddingProcessVariableIfInvalidBodyIsProvided() throws JsonToModelConversionException, Exception { diff --git a/e2e-test/java/org/alfresco/rest/workflow/processes/DeleteProcessSanityTests.java b/e2e-test/java/org/alfresco/rest/workflow/processes/DeleteProcessSanityTests.java index aa20eb22b..819835f72 100644 --- a/e2e-test/java/org/alfresco/rest/workflow/processes/DeleteProcessSanityTests.java +++ b/e2e-test/java/org/alfresco/rest/workflow/processes/DeleteProcessSanityTests.java @@ -7,6 +7,7 @@ import org.alfresco.utility.data.DataUser; import org.alfresco.utility.model.FileModel; import org.alfresco.utility.model.SiteModel; import org.alfresco.utility.model.TaskModel; +import org.alfresco.utility.model.TestGroup; import org.alfresco.utility.model.UserModel; import org.alfresco.utility.testrail.ExecutionType; import org.alfresco.utility.testrail.annotation.TestRail; @@ -19,7 +20,7 @@ import org.testng.annotations.Test; /** * Created by Claudia Agache on 10/12/2016. */ -@Test(groups = { "rest-api", "processes", "sanity" }) +@Test(groups = { TestGroup.REST_API, "processes", TestGroup.COMMENTS }) public class DeleteProcessSanityTests extends RestWorkflowTest { @Autowired @@ -50,7 +51,7 @@ public class DeleteProcessSanityTests extends RestWorkflowTest task = dataWorkflow.usingUser(userWhoStartsTask).usingSite(siteModel).usingResource(document).createNewTaskAndAssignTo(assignee); } - @TestRail(section = { "rest-api", + @TestRail(section = { TestGroup.REST_API, "processes" }, executionType = ExecutionType.SANITY, description = "Verify User is able to delete process started by him using REST API and status code is OK (204)") public void deleteProcessByUserWhoStartedProcess() throws Exception { @@ -60,7 +61,7 @@ public class DeleteProcessSanityTests extends RestWorkflowTest processesApi.getProcesses().assertProcessDoesNotExist(task); } - @TestRail(section = { "rest-api", + @TestRail(section = { TestGroup.REST_API, "processes" }, executionType = ExecutionType.SANITY, description = "Verify User is able to delete process assigned to him using REST API and status code is OK (204)") public void deleteProcessByAssignedUser() throws Exception { @@ -70,7 +71,7 @@ public class DeleteProcessSanityTests extends RestWorkflowTest processesApi.getProcesses().assertProcessDoesNotExist(task); } - @TestRail(section = { "rest-api", + @TestRail(section = { TestGroup.REST_API, "processes" }, executionType = ExecutionType.SANITY, description = "Verify User that is not involved in a process is not authorized to delete it using REST API and status code is 403") public void deleteProcessByAnotherUser() throws Exception { diff --git a/e2e-test/java/org/alfresco/rest/workflow/processes/GetProcessItemsSanityTests.java b/e2e-test/java/org/alfresco/rest/workflow/processes/GetProcessItemsSanityTests.java index 9ae18c912..9bc76022b 100644 --- a/e2e-test/java/org/alfresco/rest/workflow/processes/GetProcessItemsSanityTests.java +++ b/e2e-test/java/org/alfresco/rest/workflow/processes/GetProcessItemsSanityTests.java @@ -9,6 +9,7 @@ import org.alfresco.rest.requests.RestTenantApi; import org.alfresco.utility.data.DataUser; import org.alfresco.utility.model.FileModel; import org.alfresco.utility.model.SiteModel; +import org.alfresco.utility.model.TestGroup; import org.alfresco.utility.model.UserModel; import org.alfresco.utility.testrail.ExecutionType; import org.alfresco.utility.testrail.annotation.TestRail; @@ -21,7 +22,7 @@ import org.testng.annotations.Test; * @author iulia.cojocea */ -@Test(groups = { "rest-api", "processes", "sanity" }) +@Test(groups = { TestGroup.REST_API, "processes", TestGroup.COMMENTS }) public class GetProcessItemsSanityTests extends RestWorkflowTest { @Autowired @@ -51,7 +52,7 @@ public class GetProcessItemsSanityTests extends RestWorkflowTest processesApi.useRestClient(restClient); } - @TestRail(section = {"rest-api", "processes" }, executionType = ExecutionType.SANITY, + @TestRail(section = {TestGroup.REST_API, "processes" }, executionType = ExecutionType.SANITY, description = "Verify that user that started the process gets all process items") public void getProcessItemsUsingTheUserWhoStartedProcess() throws JsonToModelConversionException, Exception { @@ -61,7 +62,7 @@ public class GetProcessItemsSanityTests extends RestWorkflowTest processesApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", "processes" }, executionType = ExecutionType.SANITY, + @TestRail(section = { TestGroup.REST_API, "processes" }, executionType = ExecutionType.SANITY, description = "Verify that user that is involved in the process gets all process items") public void getProcessItemsUsingUserInvolvedInProcess() throws JsonToModelConversionException, Exception { @@ -71,8 +72,8 @@ public class GetProcessItemsSanityTests extends RestWorkflowTest processesApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @Test(groups = { "networks" }) - @TestRail(section = {"rest-api", "processes" }, executionType = ExecutionType.SANITY, + @Test(groups = { TestGroup.NETWORKS }) + @TestRail(section = {TestGroup.REST_API, "processes" }, executionType = ExecutionType.SANITY, description = "Get process items using admin from same network") public void getProcessItemsUsingAdminUserFromSameNetwork() throws JsonToModelConversionException, Exception { diff --git a/e2e-test/java/org/alfresco/rest/workflow/processes/GetProcessTasksSanityTests.java b/e2e-test/java/org/alfresco/rest/workflow/processes/GetProcessTasksSanityTests.java index bb00f9ddf..c50b21218 100644 --- a/e2e-test/java/org/alfresco/rest/workflow/processes/GetProcessTasksSanityTests.java +++ b/e2e-test/java/org/alfresco/rest/workflow/processes/GetProcessTasksSanityTests.java @@ -7,6 +7,7 @@ import org.alfresco.rest.requests.RestProcessesApi; import org.alfresco.utility.model.FileModel; import org.alfresco.utility.model.ProcessModel; import org.alfresco.utility.model.SiteModel; +import org.alfresco.utility.model.TestGroup; import org.alfresco.utility.model.UserModel; import org.alfresco.utility.testrail.ExecutionType; import org.alfresco.utility.testrail.annotation.TestRail; @@ -20,7 +21,7 @@ import org.testng.annotations.Test; * * @author Cristina Axinte */ -@Test(groups = { "rest-api", "workflow", "processes", "sanity" }) +@Test(groups = { TestGroup.REST_API, TestGroup.WORKFLOW, "processes", TestGroup.COMMENTS }) public class GetProcessTasksSanityTests extends RestWorkflowTest { @Autowired @@ -46,7 +47,7 @@ public class GetProcessTasksSanityTests extends RestWorkflowTest processesApi.useRestClient(restClient); } - @TestRail(section = { "rest-api", "workflow", "processes" }, executionType = ExecutionType.SANITY, description = "Verify user who started the process gets all tasks of started process with Rest API and response is successfull (200)") + @TestRail(section = { TestGroup.REST_API, TestGroup.WORKFLOW, "processes" }, executionType = ExecutionType.SANITY, description = "Verify user who started the process gets all tasks of started process with Rest API and response is successfull (200)") public void userWhoStartedProcessCanGetProcessTasks() throws JsonToModelConversionException, Exception { restClient.authenticateUser(userModel); @@ -58,7 +59,7 @@ public class GetProcessTasksSanityTests extends RestWorkflowTest processesApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", "workflow", "processes" }, executionType = ExecutionType.SANITY, description = "Verify any assignee user of the process gets all tasks of the process with Rest API and response is successfull (200)") + @TestRail(section = { TestGroup.REST_API, TestGroup.WORKFLOW, "processes" }, executionType = ExecutionType.SANITY, description = "Verify any assignee user of the process gets all tasks of the process with Rest API and response is successfull (200)") public void assigneeUserCanGetAllProcessTasks() throws JsonToModelConversionException, Exception { restClient.authenticateUser(assignee1); @@ -70,7 +71,7 @@ public class GetProcessTasksSanityTests extends RestWorkflowTest processesApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", "workflow", "processes" }, executionType = ExecutionType.SANITY, description = "Verify any assignee user of the process gets all tasks of the process with Rest API and response is successfull (200)") + @TestRail(section = { TestGroup.REST_API, TestGroup.WORKFLOW, "processes" }, executionType = ExecutionType.SANITY, description = "Verify any assignee user of the process gets all tasks of the process with Rest API and response is successfull (200)") public void involvedUserCanGetAllProcessTasks() throws JsonToModelConversionException, Exception { ProcessModel process = dataWorkflow.usingUser(userModel).usingSite(siteModel).usingResource(document) diff --git a/e2e-test/java/org/alfresco/rest/workflow/processes/GetProcessesSanityTests.java b/e2e-test/java/org/alfresco/rest/workflow/processes/GetProcessesSanityTests.java index 6ef8c2ab4..aa038cce1 100644 --- a/e2e-test/java/org/alfresco/rest/workflow/processes/GetProcessesSanityTests.java +++ b/e2e-test/java/org/alfresco/rest/workflow/processes/GetProcessesSanityTests.java @@ -8,6 +8,7 @@ import org.alfresco.utility.data.DataUser; import org.alfresco.utility.model.FileModel; import org.alfresco.utility.model.SiteModel; import org.alfresco.utility.model.TaskModel; +import org.alfresco.utility.model.TestGroup; import org.alfresco.utility.model.UserModel; import org.alfresco.utility.testrail.ExecutionType; import org.alfresco.utility.testrail.annotation.TestRail; @@ -19,7 +20,7 @@ import org.testng.annotations.Test; /** * Created by Claudia Agache on 10/11/2016. */ -@Test(groups = { "rest-api", "processes", "sanity" }) +@Test(groups = { TestGroup.REST_API, "processes", TestGroup.COMMENTS }) public class GetProcessesSanityTests extends RestWorkflowTest { @Autowired @@ -45,7 +46,7 @@ public class GetProcessesSanityTests extends RestWorkflowTest processesApi.useRestClient(restClient); } - @TestRail(section = { "rest-api", + @TestRail(section = { TestGroup.REST_API, "processes" }, executionType = ExecutionType.SANITY, description = "Verify User gets all processes started by him using REST API and status code is OK (200)") public void getProcessesByUserWhoStartedProcess() throws JsonToModelConversionException, Exception { @@ -54,7 +55,7 @@ public class GetProcessesSanityTests extends RestWorkflowTest processesApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", + @TestRail(section = { TestGroup.REST_API, "processes" }, executionType = ExecutionType.SANITY, description = "Verify User gets all processes assigned to him using REST API and status code is OK (200)") public void getProcessesByAssignedUser() throws JsonToModelConversionException, Exception { @@ -63,7 +64,7 @@ public class GetProcessesSanityTests extends RestWorkflowTest processesApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", + @TestRail(section = { TestGroup.REST_API, "processes" }, executionType = ExecutionType.SANITY, description = "Verify User that is not involved in a process can not get that process using REST API and status code is OK (200)") public void getProcessesByAnotherUser() throws JsonToModelConversionException, Exception { @@ -72,7 +73,7 @@ public class GetProcessesSanityTests extends RestWorkflowTest processesApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", + @TestRail(section = { TestGroup.REST_API, "processes" }, executionType = ExecutionType.SANITY, description = "Verify Admin gets all processes, even if he isn't involved in a process, using REST API and status code is OK (200)") public void getProcessesByAdmin() throws JsonToModelConversionException, Exception { diff --git a/e2e-test/java/org/alfresco/rest/workflow/processes/GetProcessesVariablesSanityTests.java b/e2e-test/java/org/alfresco/rest/workflow/processes/GetProcessesVariablesSanityTests.java index 5861e1734..11197bf30 100644 --- a/e2e-test/java/org/alfresco/rest/workflow/processes/GetProcessesVariablesSanityTests.java +++ b/e2e-test/java/org/alfresco/rest/workflow/processes/GetProcessesVariablesSanityTests.java @@ -8,6 +8,7 @@ import org.alfresco.rest.requests.RestProcessesApi; import org.alfresco.utility.data.DataUser; import org.alfresco.utility.model.FileModel; import org.alfresco.utility.model.SiteModel; +import org.alfresco.utility.model.TestGroup; import org.alfresco.utility.model.UserModel; import org.alfresco.utility.testrail.ExecutionType; import org.alfresco.utility.testrail.annotation.TestRail; @@ -19,7 +20,7 @@ import org.testng.annotations.Test; /** * @author iulia.cojocea */ -@Test(groups = { "rest-api", "processes", "sanity" }) +@Test(groups = { TestGroup.REST_API, "processes", TestGroup.COMMENTS }) public class GetProcessesVariablesSanityTests extends RestWorkflowTest { @Autowired @@ -44,7 +45,7 @@ public class GetProcessesVariablesSanityTests extends RestWorkflowTest processesApi.useRestClient(restClient); } - @TestRail(section = {"rest-api", "processes" }, executionType = ExecutionType.SANITY, + @TestRail(section = {TestGroup.REST_API, "processes" }, executionType = ExecutionType.SANITY, description = "Verify that user that started the process gets all process variables") public void getProcessVariablesUsingTheUserWhoStartedProcess() throws JsonToModelConversionException, Exception { @@ -54,7 +55,7 @@ public class GetProcessesVariablesSanityTests extends RestWorkflowTest processesApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", "processes" }, executionType = ExecutionType.SANITY, + @TestRail(section = { TestGroup.REST_API, "processes" }, executionType = ExecutionType.SANITY, description = "Verify get all process variables call using a user that is involved in the process") public void getProcessVariablesUsingUserInvolvedInProcess() throws JsonToModelConversionException, Exception { diff --git a/e2e-test/java/org/alfresco/rest/workflow/processes/RemoveProcessVariableSanityTests.java b/e2e-test/java/org/alfresco/rest/workflow/processes/RemoveProcessVariableSanityTests.java index d896f04be..9a5ac3ed2 100644 --- a/e2e-test/java/org/alfresco/rest/workflow/processes/RemoveProcessVariableSanityTests.java +++ b/e2e-test/java/org/alfresco/rest/workflow/processes/RemoveProcessVariableSanityTests.java @@ -9,6 +9,7 @@ import org.alfresco.rest.requests.RestProcessesApi; import org.alfresco.utility.data.DataUser; import org.alfresco.utility.model.FileModel; import org.alfresco.utility.model.SiteModel; +import org.alfresco.utility.model.TestGroup; import org.alfresco.utility.model.UserModel; import org.alfresco.utility.testrail.ExecutionType; import org.alfresco.utility.testrail.annotation.TestRail; @@ -20,7 +21,7 @@ import org.testng.annotations.Test; /** * @author iulia.cojocea */ -@Test(groups = { "rest-api", "processes", "sanity" }) +@Test(groups = { TestGroup.REST_API, "processes", TestGroup.COMMENTS }) public class RemoveProcessVariableSanityTests extends RestWorkflowTest { @Autowired @@ -47,7 +48,7 @@ public class RemoveProcessVariableSanityTests extends RestWorkflowTest processesApi.useRestClient(restClient); } - @TestRail(section = {"rest-api", "processes" }, executionType = ExecutionType.SANITY, + @TestRail(section = {TestGroup.REST_API, "processes" }, executionType = ExecutionType.SANITY, description = "Delete existing variable") public void deleteProcessVariable() throws JsonToModelConversionException, Exception { @@ -59,7 +60,7 @@ public class RemoveProcessVariableSanityTests extends RestWorkflowTest processesApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.NO_CONTENT); } - @TestRail(section = {"rest-api", "processes" }, executionType = ExecutionType.SANITY, + @TestRail(section = {TestGroup.REST_API, "processes" }, executionType = ExecutionType.SANITY, description = "Try to delete existing variable using invalid processId") public void deleteProcessVariableUsingInvalidProcessId() throws JsonToModelConversionException, Exception { diff --git a/e2e-test/java/org/alfresco/rest/workflow/tasks/GetTaskSanityTests.java b/e2e-test/java/org/alfresco/rest/workflow/tasks/GetTaskSanityTests.java index efb85a120..5c731fd72 100644 --- a/e2e-test/java/org/alfresco/rest/workflow/tasks/GetTaskSanityTests.java +++ b/e2e-test/java/org/alfresco/rest/workflow/tasks/GetTaskSanityTests.java @@ -7,6 +7,7 @@ import org.alfresco.utility.model.FileModel; import org.alfresco.utility.model.GroupModel; import org.alfresco.utility.model.SiteModel; import org.alfresco.utility.model.TaskModel; +import org.alfresco.utility.model.TestGroup; import org.alfresco.utility.model.UserModel; import org.alfresco.utility.report.Bug; import org.alfresco.utility.testrail.ExecutionType; @@ -16,7 +17,7 @@ import org.springframework.http.HttpStatus; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; -@Test(groups = { "rest-api", "workflow", "tasks", "sanity" }) +@Test(groups = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.COMMENTS }) public class GetTaskSanityTests extends RestWorkflowTest { @Autowired @@ -41,7 +42,7 @@ public class GetTaskSanityTests extends RestWorkflowTest tasksApi.useRestClient(restClient); } - @TestRail(section = { "rest-api", "workflow", "tasks" }, executionType = ExecutionType.SANITY, description = "Verify admin user gets any existing task with Rest API and response is successfull (200)") + @TestRail(section = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS }, executionType = ExecutionType.SANITY, description = "Verify admin user gets any existing task with Rest API and response is successfull (200)") public void adminUserGetsAnyTaskWithSuccess() throws Exception { UserModel adminUser = dataUser.getAdminUser(); @@ -50,7 +51,7 @@ public class GetTaskSanityTests extends RestWorkflowTest tasksApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", "workflow", "tasks" }, executionType = ExecutionType.SANITY, description = "Verify assignee user gets its assigned task with Rest API and response is successfull (200)") + @TestRail(section = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS }, executionType = ExecutionType.SANITY, description = "Verify assignee user gets its assigned task with Rest API and response is successfull (200)") public void assigneeUserGetsItsTaskWithSuccess() throws Exception { restClient.authenticateUser(assigneeUser); @@ -58,7 +59,7 @@ public class GetTaskSanityTests extends RestWorkflowTest tasksApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", "workflow", "tasks" }, executionType = ExecutionType.SANITY, description = "Verify user that started the task gets the started task with Rest API and response is successfull (200)") + @TestRail(section = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS }, executionType = ExecutionType.SANITY, description = "Verify user that started the task gets the started task with Rest API and response is successfull (200)") public void starterUserGetsItsTaskWithSuccess() throws Exception { restClient.authenticateUser(userModel); @@ -66,7 +67,7 @@ public class GetTaskSanityTests extends RestWorkflowTest tasksApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", "workflow", "tasks" }, executionType = ExecutionType.SANITY, description = "Verify any user with no relation to task id forbidden to get other task with Rest API (403)") + @TestRail(section = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS }, executionType = ExecutionType.SANITY, description = "Verify any user with no relation to task id forbidden to get other task with Rest API (403)") public void anyUserIsForbiddenToGetOtherTask() throws Exception { UserModel anyUser= dataUser.createRandomTestUser(); @@ -76,7 +77,7 @@ public class GetTaskSanityTests extends RestWorkflowTest tasksApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.FORBIDDEN); } - @TestRail(section = { "rest-api", "workflow", "tasks" }, executionType = ExecutionType.SANITY, description = "Verify candidate user gets its specific task and no other user claimed the task with Rest API and response is successfull (200)") + @TestRail(section = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS }, executionType = ExecutionType.SANITY, description = "Verify candidate user gets its specific task and no other user claimed the task with Rest API and response is successfull (200)") public void candidateUserGetsItsTasks() throws Exception { UserModel userModel1 = dataUser.createRandomTestUser(); @@ -91,7 +92,7 @@ public class GetTaskSanityTests extends RestWorkflowTest } @Bug(id = "") - @TestRail(section = { "rest-api", "workflow", "tasks" }, executionType = ExecutionType.SANITY, description = "Verify involved user in a task without claim it gets the task with Rest API and response is successfull (200)") + @TestRail(section = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS }, executionType = ExecutionType.SANITY, description = "Verify involved user in a task without claim it gets the task with Rest API and response is successfull (200)") public void involvedUserWithoutClaimTaskGetsTask() throws Exception { UserModel userModel1 = dataUser.createRandomTestUser(); diff --git a/e2e-test/java/org/alfresco/rest/workflow/tasks/GetTasksSanityTests.java b/e2e-test/java/org/alfresco/rest/workflow/tasks/GetTasksSanityTests.java index 79539cf57..ec70c8b9f 100644 --- a/e2e-test/java/org/alfresco/rest/workflow/tasks/GetTasksSanityTests.java +++ b/e2e-test/java/org/alfresco/rest/workflow/tasks/GetTasksSanityTests.java @@ -7,6 +7,7 @@ import org.alfresco.utility.model.FileModel; import org.alfresco.utility.model.GroupModel; import org.alfresco.utility.model.SiteModel; import org.alfresco.utility.model.TaskModel; +import org.alfresco.utility.model.TestGroup; import org.alfresco.utility.model.UserModel; import org.alfresco.utility.testrail.ExecutionType; import org.alfresco.utility.testrail.annotation.TestRail; @@ -15,7 +16,7 @@ import org.springframework.http.HttpStatus; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; -@Test(groups = { "rest-api", "workflow", "tasks", "sanity" }) +@Test(groups = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.COMMENTS }) public class GetTasksSanityTests extends RestWorkflowTest { @Autowired @@ -39,7 +40,7 @@ public class GetTasksSanityTests extends RestWorkflowTest tasksApi.useRestClient(restClient); } - @TestRail(section = { "rest-api", "workflow", "tasks" }, executionType = ExecutionType.SANITY, description = "Verify admin user gets all existing tasks with Rest API and response is successfull (200)") + @TestRail(section = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS }, executionType = ExecutionType.SANITY, description = "Verify admin user gets all existing tasks with Rest API and response is successfull (200)") public void adminUserGetsAllTasks() throws Exception { UserModel adminUser = dataUser.getAdminUser(); @@ -48,7 +49,7 @@ public class GetTasksSanityTests extends RestWorkflowTest tasksApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", "workflow", "tasks" }, executionType = ExecutionType.SANITY, description = "Verify asignee user gets its existing tasks with Rest API and response is successfull (200)") + @TestRail(section = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS }, executionType = ExecutionType.SANITY, description = "Verify asignee user gets its existing tasks with Rest API and response is successfull (200)") public void asigneeUserGetsItsTasks() throws Exception { restClient.authenticateUser(assigneeUser); @@ -56,7 +57,7 @@ public class GetTasksSanityTests extends RestWorkflowTest tasksApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", "workflow", "tasks" }, executionType = ExecutionType.SANITY, description = "Verify candidate user that claims the task gets its existing tasks with Rest API and response is successfull (200)") + @TestRail(section = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS }, executionType = ExecutionType.SANITY, description = "Verify candidate user that claims the task gets its existing tasks with Rest API and response is successfull (200)") public void candidateUserThatClaimsTaskGetsItsTasks() throws Exception { UserModel userModel1 = dataUser.createRandomTestUser(); @@ -71,7 +72,7 @@ public class GetTasksSanityTests extends RestWorkflowTest tasksApi.usingRestWrapper().assertStatusCodeIs(HttpStatus.OK); } - @TestRail(section = { "rest-api", "workflow", "tasks" }, executionType = ExecutionType.SANITY, description = "Verify candidate user without claim gets no tasks with Rest API and response is successfull (200)") + @TestRail(section = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS }, executionType = ExecutionType.SANITY, description = "Verify candidate user without claim gets no tasks with Rest API and response is successfull (200)") public void candidateUserWithoutClaimTaskGetsNoTasks() throws Exception { UserModel userModel1 = dataUser.createRandomTestUser();