From be792c4d78bdbb3a7ff1edee401603b842f242b5 Mon Sep 17 00:00:00 2001 From: Andreea Nechifor Date: Mon, 12 Dec 2016 10:42:43 +0200 Subject: [PATCH] Added @Test annotation --- .../rest/workflow/tasks/AddTaskItemSanityTests.java | 9 ++++++--- .../rest/workflow/tasks/AddTaskVariablesCoreTests.java | 9 ++++++++- .../rest/workflow/tasks/AddTaskVariablesSanityTests.java | 6 +++++- .../rest/workflow/tasks/GetTaskCandidatesCoreTests.java | 6 +++++- .../workflow/tasks/GetTaskCandidatesSanityTests.java | 5 ++++- .../rest/workflow/tasks/GetTaskFormModelSanityTests.java | 4 +++- .../rest/workflow/tasks/GetTaskItemsSanityTests.java | 6 ++++-- .../alfresco/rest/workflow/tasks/GetTaskSanityTests.java | 8 +++++++- .../rest/workflow/tasks/GetTaskVariablesCoreTests.java | 7 ++++++- .../rest/workflow/tasks/GetTaskVariablesSanityTests.java | 6 +++++- .../rest/workflow/tasks/GetTasksSanityTests.java | 7 ++++++- .../rest/workflow/tasks/UpdateTaskSanityTests.java | 7 ++++++- 12 files changed, 65 insertions(+), 15 deletions(-) diff --git a/e2e-test/java/org/alfresco/rest/workflow/tasks/AddTaskItemSanityTests.java b/e2e-test/java/org/alfresco/rest/workflow/tasks/AddTaskItemSanityTests.java index c76e94c26..c6b95b0e2 100644 --- a/e2e-test/java/org/alfresco/rest/workflow/tasks/AddTaskItemSanityTests.java +++ b/e2e-test/java/org/alfresco/rest/workflow/tasks/AddTaskItemSanityTests.java @@ -16,7 +16,7 @@ import org.springframework.http.HttpStatus; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; -@Test(groups = {TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.SANITY }) + public class AddTaskItemSanityTests extends RestTest { private UserModel userModel, userWhoStartsTask, assigneeUser, adminTenantUser, tenantUser, tenantUserAssignee;; @@ -37,6 +37,7 @@ public class AddTaskItemSanityTests extends RestTest taskModel = dataWorkflow.usingUser(userWhoStartsTask).usingSite(siteModel).usingResource(fileModel).createNewTaskAndAssignTo(assigneeUser); } + @Test(groups = {TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.SANITY }) @TestRail(section = {TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS }, executionType = ExecutionType.SANITY, description = "Create non-existing task item") public void createTaskItem() throws Exception @@ -56,8 +57,10 @@ public class AddTaskItemSanityTests extends RestTest .assertThat().field("modifiedBy").is(taskItem.getModifiedBy()) .assertThat().field("id").is(taskItem.getId()) .assertThat().field("mimeType").is(taskItem.getMimeType()); - } + + } + @Test(groups = {TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.SANITY }) @Bug(id = "MNT-16966") @TestRail(section = {TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS }, executionType = ExecutionType.SANITY, description = "Verify that in case task item exists the request fails") @@ -83,7 +86,7 @@ public class AddTaskItemSanityTests extends RestTest restClient.assertStatusCodeIs(HttpStatus.BAD_REQUEST); } - @Test(groups = { TestGroup.NETWORKS }) + @Test(groups = { TestGroup.NETWORKS,TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.SANITY }) @TestRail(section = {TestGroup.REST_API, TestGroup.PROCESSES }, executionType = ExecutionType.SANITY, description = "Add task item using admin user from same network") public void addTaskItemByAdminSameNetwork() throws JsonToModelConversionException, Exception diff --git a/e2e-test/java/org/alfresco/rest/workflow/tasks/AddTaskVariablesCoreTests.java b/e2e-test/java/org/alfresco/rest/workflow/tasks/AddTaskVariablesCoreTests.java index 93f4e8c5d..946f6028e 100644 --- a/e2e-test/java/org/alfresco/rest/workflow/tasks/AddTaskVariablesCoreTests.java +++ b/e2e-test/java/org/alfresco/rest/workflow/tasks/AddTaskVariablesCoreTests.java @@ -18,7 +18,7 @@ import org.springframework.http.HttpStatus; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; -@Test(groups = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.CORE }) + public class AddTaskVariablesCoreTests extends RestTest { private UserModel userWhoStartsTask, adminUser; @@ -43,6 +43,7 @@ public class AddTaskVariablesCoreTests extends RestTest restClient.authenticateUser(adminUser); } + @Test(groups = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.CORE }) @TestRail(section = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS }, executionType = ExecutionType.REGRESSION, description = "Adding task variable is falling in case invalid variableBody is provided") public void failedAddingTaskVariableIfInvalidBodyIsProvided() throws Exception { @@ -53,6 +54,7 @@ public class AddTaskVariablesCoreTests extends RestTest } + @Test(groups = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.CORE }) @TestRail(section = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS }, executionType = ExecutionType.REGRESSION, description = "Adding task variable is falling in case empty body type is provided") public void failedAddingTaskVariableIfEmptyBodyIsProvided() throws Exception { @@ -64,6 +66,7 @@ public class AddTaskVariablesCoreTests extends RestTest } + @Test(groups = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.CORE }) @TestRail(section = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS }, executionType = ExecutionType.REGRESSION, description = "Adding task variable is falling in case incomplete body type is provided") public void failedAddingTaskVariableIfIncompleteBodyIsProvided() throws Exception { @@ -87,6 +90,7 @@ public class AddTaskVariablesCoreTests extends RestTest } + @Test(groups = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.CORE }) @TestRail(section = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS }, executionType = ExecutionType.REGRESSION, description = "Adding task variable is falling in case invalid type is provided") public void failedAddingTaskVariableIfInvalidTypeIsProvided() throws Exception { @@ -110,6 +114,7 @@ public class AddTaskVariablesCoreTests extends RestTest } + @Test(groups = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.CORE }) @TestRail(section = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS }, executionType = ExecutionType.REGRESSION, description = "Adding task variable is falling in case invalid scope is provided") public void failedAddingTaskVariableIfInvalidScopeIsProvided() throws Exception { @@ -121,6 +126,7 @@ public class AddTaskVariablesCoreTests extends RestTest } + @Test(groups = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.CORE }) @TestRail(section = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS }, executionType = ExecutionType.REGRESSION, description = "Adding task variable is falling in case invalid task id is provided") public void failedAddingTaskVariableIfInvalidTaskIdIsProvided() throws Exception { @@ -133,6 +139,7 @@ public class AddTaskVariablesCoreTests extends RestTest } + @Test(groups = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.CORE }) @TestRail(section = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS }, executionType = ExecutionType.REGRESSION, description = "Adding task variable is falling in case invalid task id is provided") public void failedAddingTaskVariableIfInvalidValueIsProvided() throws Exception { diff --git a/e2e-test/java/org/alfresco/rest/workflow/tasks/AddTaskVariablesSanityTests.java b/e2e-test/java/org/alfresco/rest/workflow/tasks/AddTaskVariablesSanityTests.java index e607b62a8..e4df01a99 100644 --- a/e2e-test/java/org/alfresco/rest/workflow/tasks/AddTaskVariablesSanityTests.java +++ b/e2e-test/java/org/alfresco/rest/workflow/tasks/AddTaskVariablesSanityTests.java @@ -17,7 +17,7 @@ import org.testng.annotations.Test; /** * @author iulia.cojocea */ -@Test(groups = {TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.SANITY }) + public class AddTaskVariablesSanityTests extends RestTest { private UserModel userModel, userWhoStartsTask; @@ -38,6 +38,7 @@ public class AddTaskVariablesSanityTests extends RestTest taskModel = dataWorkflow.usingUser(userWhoStartsTask).usingSite(siteModel).usingResource(fileModel).createNewTaskAndAssignTo(assigneeUser); } + @Test(groups = {TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.SANITY }) @TestRail(section = {TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS }, executionType = ExecutionType.SANITY, description = "Create non-existing task variable with admin") public void createTaskVariableWithAdmin() throws Exception @@ -55,6 +56,7 @@ public class AddTaskVariablesSanityTests extends RestTest .and().field("type").is(variableModel.getType()); } + @Test(groups = {TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.SANITY }) @TestRail(section = {TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS }, executionType = ExecutionType.SANITY, description = "Create non-existing task variable with user involved in the process") public void createTaskVariableWithInvolvedUser() throws Exception @@ -72,6 +74,7 @@ public class AddTaskVariablesSanityTests extends RestTest restClient.withWorkflowAPI().usingTask(taskModel).getTaskVariables().assertThat().entriesListContains("name", variableModel.getName()); } + @Test(groups = {TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.SANITY }) @TestRail(section = {TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS }, executionType = ExecutionType.SANITY, description = "Create non-existing task variable with task owner") public void createTaskVariableWithTaskOwner() throws Exception @@ -87,6 +90,7 @@ public class AddTaskVariablesSanityTests extends RestTest .and().field("type").is(variableModel.getType()); } + @Test(groups = {TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.SANITY }) @TestRail(section = {TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS }, executionType = ExecutionType.SANITY, description = "Create non-existing task variable with any user") public void createTaskVariableWithRandomUser() throws Exception diff --git a/e2e-test/java/org/alfresco/rest/workflow/tasks/GetTaskCandidatesCoreTests.java b/e2e-test/java/org/alfresco/rest/workflow/tasks/GetTaskCandidatesCoreTests.java index 04251ad60..f8831a252 100644 --- a/e2e-test/java/org/alfresco/rest/workflow/tasks/GetTaskCandidatesCoreTests.java +++ b/e2e-test/java/org/alfresco/rest/workflow/tasks/GetTaskCandidatesCoreTests.java @@ -20,7 +20,7 @@ import org.testng.annotations.Test; * @author bogdan.bocancea * */ -@Test(groups = {TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.CORE }) + public class GetTaskCandidatesCoreTests extends RestTest { private UserModel userModel, userModel1, userModel2; @@ -41,6 +41,7 @@ public class GetTaskCandidatesCoreTests extends RestTest dataGroup.addListOfUsersToGroup(group, userModel1, userModel2); } + @Test(groups = {TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.CORE }) @TestRail(section = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS }, executionType = ExecutionType.REGRESSION, description = "Verify get task candidates with invalid task id") public void getTaskCandidatesWithInvalidTaskId() throws Exception @@ -54,6 +55,7 @@ public class GetTaskCandidatesCoreTests extends RestTest .assertLastError().containsSummary(String.format(RestErrorModel.ENTITY_NOT_FOUND, "invalid-id")); } + @Test(groups = {TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.CORE }) @TestRail(section = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS }, executionType = ExecutionType.REGRESSION, description = "Verify get task candidates with empty task id") public void getTaskCandidatesWithEmptyTaskId() throws Exception @@ -67,6 +69,7 @@ public class GetTaskCandidatesCoreTests extends RestTest .assertLastError().containsSummary(String.format(RestErrorModel.ENTITY_NOT_FOUND, "")); } + @Test(groups = {TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.CORE }) @TestRail(section = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS }, executionType = ExecutionType.REGRESSION, description = "Verify get task candidates for completed task") public void getTaskCandidatesForCompletedTask() throws Exception @@ -89,6 +92,7 @@ public class GetTaskCandidatesCoreTests extends RestTest .assertLastError().containsSummary(String.format(RestErrorModel.ENTITY_NOT_FOUND, taskModel.getId())); } + @Test(groups = {TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.CORE }) @TestRail(section = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS }, executionType = ExecutionType.REGRESSION, description = "Verify get task candidates by non candidate user") public void getTaskCandidatesByNonCandidateUser() throws Exception diff --git a/e2e-test/java/org/alfresco/rest/workflow/tasks/GetTaskCandidatesSanityTests.java b/e2e-test/java/org/alfresco/rest/workflow/tasks/GetTaskCandidatesSanityTests.java index 8dd4f7095..f6b7651fc 100644 --- a/e2e-test/java/org/alfresco/rest/workflow/tasks/GetTaskCandidatesSanityTests.java +++ b/e2e-test/java/org/alfresco/rest/workflow/tasks/GetTaskCandidatesSanityTests.java @@ -20,7 +20,7 @@ import org.testng.annotations.Test; * @author Cristina Axinte * */ -@Test(groups = {TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.SANITY }) + public class GetTaskCandidatesSanityTests extends RestTest { private UserModel userModel, user, userModel1, userModel2; @@ -44,6 +44,7 @@ public class GetTaskCandidatesSanityTests extends RestTest taskModel = dataWorkflow.usingUser(user).usingSite(siteModel).usingResource(fileModel).createPooledReviewTaskAndAssignTo(group); } + @Test(groups = {TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.SANITY }) @TestRail(section = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS }, executionType = ExecutionType.SANITY, description = "Verify that admin gets task candidates") public void getTaskCandidatesByAdmin() throws Exception @@ -54,6 +55,7 @@ public class GetTaskCandidatesSanityTests extends RestTest .and().entriesListContains("candidateId", String.format("GROUP_%s", group.getGroupIdentifier())); } + @Test(groups = {TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.SANITY }) @TestRail(section = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS }, executionType = ExecutionType.SANITY, description = "Verify that user that started the process gets task candidates") public void getTaskCandidatesByUserWhoStartedProcess() throws Exception @@ -64,6 +66,7 @@ public class GetTaskCandidatesSanityTests extends RestTest .and().entriesListContains("candidateId", String.format("GROUP_%s", group.getGroupIdentifier())); } + @Test(groups = {TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.SANITY }) @TestRail(section = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS }, executionType = ExecutionType.SANITY, description = "Verify that user from the assighed group to the process gets task candidates") public void getTaskCandidatesByCandidateUser() throws Exception diff --git a/e2e-test/java/org/alfresco/rest/workflow/tasks/GetTaskFormModelSanityTests.java b/e2e-test/java/org/alfresco/rest/workflow/tasks/GetTaskFormModelSanityTests.java index 6735f7f40..0bb678207 100644 --- a/e2e-test/java/org/alfresco/rest/workflow/tasks/GetTaskFormModelSanityTests.java +++ b/e2e-test/java/org/alfresco/rest/workflow/tasks/GetTaskFormModelSanityTests.java @@ -17,7 +17,7 @@ import org.testng.annotations.Test; /** * Created by Claudia Agache on 10/20/2016. */ -@Test(groups = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.SANITY }) + public class GetTaskFormModelSanityTests extends RestTest { UserModel userModel; @@ -35,6 +35,7 @@ public class GetTaskFormModelSanityTests extends RestTest taskModel = dataWorkflow.usingUser(userModel).usingSite(siteModel).usingResource(fileModel).createNewTaskAndAssignTo(userModel); } + @Test(groups = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.SANITY }) @TestRail(section = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS }, executionType = ExecutionType.SANITY, description = "Verify admin user gets all task form models with Rest API and response is successful (200)") public void adminGetsTaskFormModels() throws Exception @@ -65,6 +66,7 @@ public class GetTaskFormModelSanityTests extends RestTest restClient.assertStatusCodeIs(HttpStatus.OK); } + @Test(groups = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.SANITY }) @TestRail(section = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS }, executionType = ExecutionType.SANITY, description = "Verify user involved in task gets all the task form models with Rest API and response is successful (200)") public void involvedUserGetsTaskFormModels() throws Exception diff --git a/e2e-test/java/org/alfresco/rest/workflow/tasks/GetTaskItemsSanityTests.java b/e2e-test/java/org/alfresco/rest/workflow/tasks/GetTaskItemsSanityTests.java index 3cd75aaa3..71ed12c34 100644 --- a/e2e-test/java/org/alfresco/rest/workflow/tasks/GetTaskItemsSanityTests.java +++ b/e2e-test/java/org/alfresco/rest/workflow/tasks/GetTaskItemsSanityTests.java @@ -16,7 +16,7 @@ import org.springframework.http.HttpStatus; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; -@Test(groups = {TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.SANITY }) + public class GetTaskItemsSanityTests extends RestTest { private UserModel userModel, userWhoStartsTask, assignee, adminTenantUser, tenantUser, tenantUserAssignee; @@ -37,6 +37,7 @@ public class GetTaskItemsSanityTests extends RestTest taskModel = dataWorkflow.usingUser(userWhoStartsTask).usingSite(siteModel).usingResource(fileModel).createNewTaskAndAssignTo(assignee); } + @Test(groups = {TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.SANITY }) @TestRail(section = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS }, executionType = ExecutionType.SANITY, description = "Verify that user that started the process gets task items") public void getTaskItemsByUserWhoStartedProcess() throws Exception @@ -54,6 +55,7 @@ public class GetTaskItemsSanityTests extends RestTest .entriesListContains("name", document1.getName()); } + @Test(groups = {TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.SANITY }) @TestRail(section = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS }, executionType = ExecutionType.SANITY, description = "Verify that involved user in process gets task items") public void getTaskItemsByUserInvolvedInProcess() throws Exception @@ -73,7 +75,7 @@ public class GetTaskItemsSanityTests extends RestTest @TestRail(section = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS }, executionType = ExecutionType.SANITY, description = "Verify that user that started the process gets task items") - @Test(groups = { TestGroup.NETWORKS }) + @Test(groups = { TestGroup.NETWORKS,TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.SANITY}) public void getTaskItemsByAdminInSameNetwork() throws Exception { UserModel adminuser = dataUser.getAdminUser(); 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 0413c6617..9f7f638bd 100644 --- a/e2e-test/java/org/alfresco/rest/workflow/tasks/GetTaskSanityTests.java +++ b/e2e-test/java/org/alfresco/rest/workflow/tasks/GetTaskSanityTests.java @@ -17,7 +17,7 @@ import org.springframework.http.HttpStatus; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; -@Test(groups = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.SANITY }) + public class GetTaskSanityTests extends RestTest { UserModel userModel; @@ -38,6 +38,7 @@ public class GetTaskSanityTests extends RestTest taskModel = dataWorkflow.usingUser(userModel).usingSite(siteModel).usingResource(fileModel).createNewTaskAndAssignTo(assigneeUser); } + @Test(groups = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.SANITY }) @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 @@ -49,6 +50,7 @@ public class GetTaskSanityTests extends RestTest restTaskModel.assertThat().field("id").is(taskModel.getId()).and().field("description").is(taskModel.getMessage()); } + @Test(groups = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.SANITY }) @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 @@ -60,6 +62,7 @@ public class GetTaskSanityTests extends RestTest } + @Test(groups = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.SANITY }) @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 @@ -69,6 +72,7 @@ public class GetTaskSanityTests extends RestTest restTaskModel.assertThat().field("id").is(taskModel.getId()).and().field("description").is(taskModel.getMessage()); } + @Test(groups = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.SANITY }) @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 @@ -79,6 +83,7 @@ public class GetTaskSanityTests extends RestTest restClient.assertStatusCodeIs(HttpStatus.FORBIDDEN).assertLastError().containsSummary("Permission was denied"); } + @Test(groups = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.SANITY }) @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 @@ -95,6 +100,7 @@ public class GetTaskSanityTests extends RestTest } + @Test(groups = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.SANITY }) @Bug(id = "MNT-17051") @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)") diff --git a/e2e-test/java/org/alfresco/rest/workflow/tasks/GetTaskVariablesCoreTests.java b/e2e-test/java/org/alfresco/rest/workflow/tasks/GetTaskVariablesCoreTests.java index d10abe588..a3c76115e 100644 --- a/e2e-test/java/org/alfresco/rest/workflow/tasks/GetTaskVariablesCoreTests.java +++ b/e2e-test/java/org/alfresco/rest/workflow/tasks/GetTaskVariablesCoreTests.java @@ -16,7 +16,7 @@ import org.testng.annotations.Test; /** * Created by Claudia Agache on 12/7/2016. */ -@Test(groups = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.CORE }) + public class GetTaskVariablesCoreTests extends RestTest { private UserModel userWhoStartsTask, assignee; @@ -34,6 +34,7 @@ public class GetTaskVariablesCoreTests extends RestTest fileModel = dataContent.usingSite(siteModel).createContent(CMISUtil.DocumentType.TEXT_PLAIN); } + @Test(groups = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.CORE }) @TestRail(section = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS }, executionType = ExecutionType.REGRESSION, description = "Verify if get task variables request returns status code 404 when invalid taskId is used") public void getTaskVariablesUsingInvalidTaskId() throws Exception @@ -46,6 +47,7 @@ public class GetTaskVariablesCoreTests extends RestTest .assertLastError().containsSummary(String.format(RestErrorModel.ENTITY_NOT_FOUND, "invalidId")); } + @Test(groups = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.CORE }) @TestRail(section = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS }, executionType = ExecutionType.REGRESSION, description = "Verify if get task variables request returns status code 404 when empty taskId is used") public void getTaskVariablesUsingEmptyTaskId() throws Exception @@ -58,6 +60,7 @@ public class GetTaskVariablesCoreTests extends RestTest .assertLastError().containsSummary(String.format(RestErrorModel.ENTITY_NOT_FOUND, "")); } + @Test(groups = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.CORE }) @TestRail(section = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS }, executionType = ExecutionType.REGRESSION, description = "Verify if get task variables request returns status code 200 after the task is finished.") public void getTaskVariablesAfterFinishingTask() throws Exception @@ -70,6 +73,7 @@ public class GetTaskVariablesCoreTests extends RestTest variableModels.assertThat().entriesListIsNotEmpty(); } + @Test(groups = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.CORE }) @TestRail(section = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS }, executionType = ExecutionType.REGRESSION, description = "Verify if get task variables request returns status code 200 after the process is deleted (Task state is now completed.)") public void getTaskVariablesAfterDeletingProcess() throws Exception @@ -85,6 +89,7 @@ public class GetTaskVariablesCoreTests extends RestTest } + @Test(groups = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.CORE }) @TestRail(section = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS }, executionType = ExecutionType.REGRESSION, description = "Verify user gets task variables that matches a where clause.") public void getTaskVariablesWithWhereClauseAsParameter() throws Exception diff --git a/e2e-test/java/org/alfresco/rest/workflow/tasks/GetTaskVariablesSanityTests.java b/e2e-test/java/org/alfresco/rest/workflow/tasks/GetTaskVariablesSanityTests.java index 542e1da12..d5d057cdd 100644 --- a/e2e-test/java/org/alfresco/rest/workflow/tasks/GetTaskVariablesSanityTests.java +++ b/e2e-test/java/org/alfresco/rest/workflow/tasks/GetTaskVariablesSanityTests.java @@ -18,7 +18,7 @@ import org.testng.annotations.Test; /** * @author iulia.cojocea */ -@Test(groups = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.SANITY }) + public class GetTaskVariablesSanityTests extends RestTest { private UserModel userModel, userWhoStartsTask, assignee; @@ -38,6 +38,7 @@ public class GetTaskVariablesSanityTests extends RestTest taskModel = dataWorkflow.usingUser(userWhoStartsTask).usingSite(siteModel).usingResource(fileModel).createNewTaskAndAssignTo(assignee); } + @Test(groups = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.SANITY }) @TestRail(section = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS }, executionType = ExecutionType.SANITY, description = "Verify that user that started the process gets task variables") public void getTaskVariablesByUserWhoStartedProcess() throws Exception @@ -48,6 +49,7 @@ public class GetTaskVariablesSanityTests extends RestTest variableModels.assertThat().entriesListIsNotEmpty(); } + @Test(groups = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.SANITY }) @TestRail(section = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS }, executionType = ExecutionType.SANITY, description = "Verify that user that is involved in the process gets task variables") public void getTaskVariablesByUserInvolvedInProcess() throws Exception @@ -58,6 +60,7 @@ public class GetTaskVariablesSanityTests extends RestTest variableModels.assertThat().entriesListIsNotEmpty(); } + @Test(groups = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.SANITY }) @TestRail(section = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS }, executionType = ExecutionType.SANITY, description = "Verify that user that is not involved in the process gets task variables") public void getTaskVariablesUsingAnyUser() throws Exception @@ -69,6 +72,7 @@ public class GetTaskVariablesSanityTests extends RestTest restClient.assertStatusCodeIs(HttpStatus.FORBIDDEN).assertLastError().containsSummary(RestErrorModel.PERMISSION_WAS_DENIED); } + @Test(groups = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.SANITY }) @TestRail(section = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS }, executionType = ExecutionType.SANITY, description = "Verify that admin is able to task variables") public void getTaskVariablesUsingAdmin() throws Exception 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 6c77aece6..18f26dc24 100644 --- a/e2e-test/java/org/alfresco/rest/workflow/tasks/GetTasksSanityTests.java +++ b/e2e-test/java/org/alfresco/rest/workflow/tasks/GetTasksSanityTests.java @@ -18,7 +18,7 @@ import org.springframework.http.HttpStatus; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; -@Test(groups = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.SANITY }) + public class GetTasksSanityTests extends RestTest { UserModel userModel; @@ -38,6 +38,7 @@ public class GetTasksSanityTests extends RestTest dataWorkflow.usingUser(userModel).usingSite(siteModel).usingResource(fileModel).createNewTaskAndAssignTo(assigneeUser); } + @Test(groups = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.SANITY }) @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 { @@ -48,6 +49,7 @@ public class GetTasksSanityTests extends RestTest taskModels.assertThat().entriesListIsNotEmpty(); } + @Test(groups = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.SANITY }) @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 { @@ -56,6 +58,7 @@ public class GetTasksSanityTests extends RestTest taskModels.assertThat().entriesListIsNotEmpty().and().entriesListCountIs(1).and().entriesListContains("assignee", assigneeUser.getUsername()); } + @Test(groups = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.SANITY }) @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)") @Bug(id = "MNT-16967") public void candidateUserGetsItsTasks() throws Exception @@ -72,6 +75,7 @@ public class GetTasksSanityTests extends RestTest taskModels.assertThat().entriesListIsNotEmpty(); } + @Test(groups = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.SANITY }) @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 { @@ -87,6 +91,7 @@ public class GetTasksSanityTests extends RestTest taskModels.assertThat().entriesListIsNotEmpty(); } + @Test(groups = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.SANITY }) @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 { diff --git a/e2e-test/java/org/alfresco/rest/workflow/tasks/UpdateTaskSanityTests.java b/e2e-test/java/org/alfresco/rest/workflow/tasks/UpdateTaskSanityTests.java index 68ee25b07..bc5329c55 100644 --- a/e2e-test/java/org/alfresco/rest/workflow/tasks/UpdateTaskSanityTests.java +++ b/e2e-test/java/org/alfresco/rest/workflow/tasks/UpdateTaskSanityTests.java @@ -15,7 +15,7 @@ import org.springframework.http.HttpStatus; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; -@Test(groups = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.SANITY }) + public class UpdateTaskSanityTests extends RestTest { UserModel userModel; @@ -36,6 +36,7 @@ public class UpdateTaskSanityTests extends RestTest taskModel = dataWorkflow.usingUser(userModel).usingSite(siteModel).usingResource(fileModel).createNewTaskAndAssignTo(assigneeUser); } + @Test(groups = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.SANITY }) @TestRail(section = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS }, executionType = ExecutionType.SANITY, description = "Verify admin user updates task with Rest API and response is successfull (200)") public void adminUserUpdatesAnyTaskWithSuccess() throws Exception { @@ -47,6 +48,7 @@ public class UpdateTaskSanityTests extends RestTest .and().field("description").is(taskModel.getMessage()); } + @Test(groups = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.SANITY }) @TestRail(section = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS }, executionType = ExecutionType.SANITY, description = "Verify assignee user updates its assigned task with Rest API and response is successfull (200)") public void assigneeUserUpdatesItsTaskWithSuccess() throws Exception { @@ -56,6 +58,7 @@ public class UpdateTaskSanityTests extends RestTest .and().field("description").is(taskModel.getMessage()); } + @Test(groups = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.SANITY }) @TestRail(section = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS }, executionType = ExecutionType.SANITY, description = "Verify user that started the task updates the started task with Rest API and response is successfull (200)") public void starterUserUpdatesItsTaskWithSuccess() throws Exception { @@ -63,6 +66,7 @@ public class UpdateTaskSanityTests extends RestTest restClient.assertStatusCodeIs(HttpStatus.OK); } + @Test(groups = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.SANITY }) @TestRail(section = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS }, executionType = ExecutionType.SANITY, description = "Verify any user with no relation to task is forbidden to update other task with Rest API (403)") public void anyUserIsForbiddenToUpdateOtherTask() throws Exception { @@ -72,6 +76,7 @@ public class UpdateTaskSanityTests extends RestTest restClient.assertStatusCodeIs(HttpStatus.FORBIDDEN).assertLastError().containsSummary("Permission was denied"); } + @Test(groups = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS, TestGroup.SANITY }) @TestRail(section = { TestGroup.REST_API, TestGroup.WORKFLOW, TestGroup.TASKS }, executionType = ExecutionType.SANITY, description = "Verify candidate user updates its specific task and no other user claimed the task with Rest API and response is successfull (200)") public void candidateUserUpdatesItsTasks() throws Exception {