use of com.coveros.selenified.services.Call in project selenified by Coveros.
the class ServicesResponseAssertEqualsIT method assertArraySizeGood.
@Test(groups = { "integration", "service", "httpget", "response" }, description = "An integration test to verify json data response")
public void assertArraySizeGood() {
// use this object to verify the app looks as expected
Call call = this.calls.get();
// perform some actions
Response response = call.get("posts/");
response.assertEquals().arraySize(4);
// verify no issues
finish();
}
use of com.coveros.selenified.services.Call in project selenified by Coveros.
the class ServicesResponseAssertEqualsIT method assertNestArraySizeNotArray.
@Test(groups = { "integration", "service", "httpget", "response" }, description = "An integration test to verify json data response")
public void assertNestArraySizeNotArray() {
// use this object to verify the app looks as expected
Call call = this.calls.get();
// perform some actions
Response response = call.get("/null/");
response.assertEquals().nestedArraySize(Collections.singletonList("name"), -1);
// verify no issues
finish();
}
use of com.coveros.selenified.services.Call in project selenified by Coveros.
the class SauceIT method sauceBuildTest.
@Test(groups = { "integration", "hub", "sauce", "sauceAPI" }, dependsOnMethods = { "hubTitleTest" }, description = "An integration test to check that sauce get all expected information")
public void sauceBuildTest(ITestContext iTestContext) throws IOException {
SessionId sessionId = (SessionId) iTestContext.getAttribute("HUB_SESSION_ID");
String buildName = iTestContext.getAttribute("HUB_BUILD").toString();
Hub hub = new Hub();
Call call = this.calls.get();
call.addCredentials(hub.getUsername(), hub.getPassword());
Response response = call.get("rest/v1/" + hub.getUsername() + "/jobs/" + sessionId.toString());
Map<String, Object> expectedResults = new HashMap<>();
expectedResults.put("build", buildName);
response.assertContains().keyValues(expectedResults);
finish();
}
use of com.coveros.selenified.services.Call in project selenified by Coveros.
the class SauceIT method sauceNameTest.
@Test(groups = { "integration", "hub", "sauce", "sauceAPI" }, dependsOnMethods = { "hubTitleTest" }, description = "An integration test to check that sauce get all expected information")
public void sauceNameTest(ITestContext iTestContext) throws IOException {
SessionId sessionId = (SessionId) iTestContext.getAttribute("HUB_SESSION_ID");
Hub hub = new Hub();
Call call = this.calls.get();
call.addCredentials(hub.getUsername(), hub.getPassword());
Response response = call.get("rest/v1/" + hub.getUsername() + "/jobs/" + sessionId.toString());
Map<String, Object> expectedResults = new HashMap<>();
expectedResults.put("name", "integration.hub.SauceIT.hubTitleTest");
response.assertContains().keyValues(expectedResults);
finish();
}
use of com.coveros.selenified.services.Call in project selenified by Coveros.
the class SauceIT method sauceSeleniumVersionTest.
@Test(groups = { "integration", "hub", "sauce", "sauceAPI" }, dependsOnMethods = { "hubTitleTest" }, description = "An integration test to check that sauce get all expected information")
public void sauceSeleniumVersionTest(ITestContext iTestContext) throws IOException {
SessionId sessionId = (SessionId) iTestContext.getAttribute("HUB_SESSION_ID");
Hub hub = new Hub();
Call call = this.calls.get();
call.addCredentials(hub.getUsername(), hub.getPassword());
Response response = call.get("rest/v1/" + hub.getUsername() + "/jobs/" + sessionId.toString());
Map<String, Object> expectedResults = new HashMap<>();
expectedResults.put("selenium_version", System.getProperty("selenium.version"));
response.assertContains().keyValues(expectedResults);
finish();
}
Aggregations