adde description for tests

This commit is contained in:
cnechifor
2016-09-16 12:19:49 +03:00
parent 429af545af
commit 4eaebd717d
3 changed files with 26 additions and 13 deletions

View File

@@ -35,7 +35,8 @@ public class SampleCommentsTest extends RestTest
document = dataContent.usingResource("Shared").usingUser(userModel).createContent(DocumentType.TEXT_PLAIN); document = dataContent.usingResource("Shared").usingUser(userModel).createContent(DocumentType.TEXT_PLAIN);
} }
@TestRail(section={"rest-api", "comments"}, executionType= ExecutionType.SANITY) @TestRail(section={"rest-api", "comments"}, executionType= ExecutionType.SANITY,
description= "Verify admin user adds comments with Rest API")
public void admiShouldAddComment() throws JsonToModelConversionException, Exception public void admiShouldAddComment() throws JsonToModelConversionException, Exception
{ {
commentsAPI.addComment(document.getNodeRef(), "This is a new comment"); commentsAPI.addComment(document.getNodeRef(), "This is a new comment");
@@ -43,7 +44,8 @@ public class SampleCommentsTest extends RestTest
.assertStatusCodeIs(HttpStatus.CREATED.toString()); .assertStatusCodeIs(HttpStatus.CREATED.toString());
} }
@TestRail(section={"rest-api", "comments"}, executionType= ExecutionType.SANITY) @TestRail(section={"rest-api", "comments"}, executionType= ExecutionType.SANITY,
description= "Verify admin user gets comments with Rest API")
public void admiShouldRetrieveComments() throws JsonToModelConversionException public void admiShouldRetrieveComments() throws JsonToModelConversionException
{ {
commentsAPI.getNodeComments(document.getNodeRef()); commentsAPI.getNodeComments(document.getNodeRef());
@@ -51,7 +53,8 @@ public class SampleCommentsTest extends RestTest
.assertStatusCodeIs(HttpStatus.OK.toString()); .assertStatusCodeIs(HttpStatus.OK.toString());
} }
@TestRail(section={"rest-api", "comments"}, executionType= ExecutionType.SANITY) @TestRail(section={"rest-api", "comments"}, executionType= ExecutionType.SANITY,
description= "Verify admin user updates comments with Rest API")
public void adminShouldUpdateComment() throws JsonToModelConversionException, Exception public void adminShouldUpdateComment() throws JsonToModelConversionException, Exception
{ {
// add initial comment // add initial comment

View File

@@ -32,7 +32,8 @@ public class SamplePeopleTest extends RestTest
peopleAPI.useRestClient(restClient); peopleAPI.useRestClient(restClient);
} }
@TestRail(section={"rest-api", "people"}, executionType= ExecutionType.SANITY) @TestRail(section={"rest-api", "people"}, executionType= ExecutionType.SANITY,
description = "Verify admin user gets person with Rest API and response is not empty")
public void adminShouldRetrievePerson() throws Exception public void adminShouldRetrievePerson() throws Exception
{ {
peopleAPI.getPerson(userModel.getUsername()) peopleAPI.getPerson(userModel.getUsername())
@@ -42,7 +43,8 @@ public class SamplePeopleTest extends RestTest
.assertStatusCodeIs(HttpStatus.OK.toString()); .assertStatusCodeIs(HttpStatus.OK.toString());
} }
@TestRail(section={"rest-api", "people"}, executionType= ExecutionType.SANITY) @TestRail(section={"rest-api", "people"}, executionType= ExecutionType.SANITY,
description = "Admin user gets own person information with Rest Api and assert that name is correct")
public void adminShouldRetrieveItself() throws Exception public void adminShouldRetrieveItself() throws Exception
{ {
peopleAPI.getPerson(adminUser.getUsername()) peopleAPI.getPerson(adminUser.getUsername())

View File

@@ -39,14 +39,16 @@ public class SampleSitesTest extends RestTest
siteAPI.useRestClient(restClient); siteAPI.useRestClient(restClient);
} }
@TestRail(section={"rest-api", "sites"}, executionType= ExecutionType.SANITY) @TestRail(section={"rest-api", "sites"}, executionType= ExecutionType.SANITY,
description = "Verify admin user gets site details with Rest API and response is not empty")
public void adminShouldGetSiteDetails() throws JsonToModelConversionException, Exception public void adminShouldGetSiteDetails() throws JsonToModelConversionException, Exception
{ {
siteAPI.getSite(siteModel.getId()) siteAPI.getSite(siteModel.getId())
.assertResponseIsNotEmpty(); .assertResponseIsNotEmpty();
} }
@TestRail(section={"rest-api", "sites"}, executionType= ExecutionType.SANITY) @TestRail(section={"rest-api", "sites"}, executionType= ExecutionType.SANITY,
description = "Verify admin user gets site information and gets status code OK (200)")
public void adminShouldGetSites() throws JsonToModelConversionException, Exception public void adminShouldGetSites() throws JsonToModelConversionException, Exception
{ {
siteAPI.getSite(siteModel.getId()); siteAPI.getSite(siteModel.getId());
@@ -54,14 +56,16 @@ public class SampleSitesTest extends RestTest
.assertStatusCodeIs(HttpStatus.OK.toString()); .assertStatusCodeIs(HttpStatus.OK.toString());
} }
@TestRail(section={"rest-api", "sites"}, executionType= ExecutionType.SANITY) @TestRail(section={"rest-api", "sites"}, executionType= ExecutionType.SANITY,
description = "Verify admin user gets sites with Rest API and the response is not empty")
public void adminShouldAccessSites() throws JsonToModelConversionException, Exception public void adminShouldAccessSites() throws JsonToModelConversionException, Exception
{ {
siteAPI.getSites() siteAPI.getSites()
.assertThatResponseIsNotEmpty(); .assertThatResponseIsNotEmpty();
} }
@TestRail(section={"rest-api", "sites"}, executionType= ExecutionType.SANITY) @TestRail(section={"rest-api", "sites"}, executionType= ExecutionType.SANITY,
description = "Verify admin user gets sites with Rest API and status code is 200")
public void adminShouldRetrieveSites() throws JsonToModelConversionException, Exception public void adminShouldRetrieveSites() throws JsonToModelConversionException, Exception
{ {
siteAPI.getSites(); siteAPI.getSites();
@@ -69,14 +73,16 @@ public class SampleSitesTest extends RestTest
.assertStatusCodeIs(HttpStatus.OK.toString()); .assertStatusCodeIs(HttpStatus.OK.toString());
} }
@TestRail(section={"rest-api", "sites"}, executionType= ExecutionType.SANITY) @TestRail(section={"rest-api", "sites"}, executionType= ExecutionType.SANITY,
description = "Verify admin user gets sites with Rest API and status code is 200")
public void adminShouldAccessResponsePagination() throws JsonToModelConversionException, Exception public void adminShouldAccessResponsePagination() throws JsonToModelConversionException, Exception
{ {
siteAPI.getSites() siteAPI.getSites()
.assertResponseHasPagination(); .assertResponseHasPagination();
} }
@TestRail(section={"rest-api", "sites"}, executionType= ExecutionType.SANITY) @TestRail(section={"rest-api", "sites"}, executionType= ExecutionType.SANITY,
description = "Verify admin user adds site member with Rest API and status code is 201")
public void adminShouldAddNewSiteMember() throws JsonToModelConversionException, DataPreparationException, Exception public void adminShouldAddNewSiteMember() throws JsonToModelConversionException, DataPreparationException, Exception
{ {
UserModel newMember = dataUser.createRandomTestUser(); UserModel newMember = dataUser.createRandomTestUser();
@@ -87,14 +93,16 @@ public class SampleSitesTest extends RestTest
.assertStatusCodeIs(HttpStatus.CREATED.toString()); .assertStatusCodeIs(HttpStatus.CREATED.toString());
} }
@TestRail(section={"rest-api", "sites"}, executionType= ExecutionType.SANITY) @TestRail(section={"rest-api", "sites"}, executionType= ExecutionType.SANITY,
description = "Verify that site exists from get all sites request")
public void adminShouldGetSiteFromSitesList() throws JsonToModelConversionException, Exception public void adminShouldGetSiteFromSitesList() throws JsonToModelConversionException, Exception
{ {
siteAPI.getAllSites() siteAPI.getAllSites()
.assertThatResponseHasSite(siteModel.getId()); .assertThatResponseHasSite(siteModel.getId());
} }
@TestRail(section={"rest-api", "sites"}, executionType= ExecutionType.SANITY) @TestRail(section={"rest-api", "sites"}, executionType= ExecutionType.SANITY,
description = "Verify site details: response not empty, description, title, visibility")
public void adminShouldAccessSiteDetails1() throws JsonToModelConversionException, Exception public void adminShouldAccessSiteDetails1() throws JsonToModelConversionException, Exception
{ {
siteAPI.getSite(siteModel.getId()) siteAPI.getSite(siteModel.getId())