use of com.coveros.selenified.utilities.Hub 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.utilities.Hub 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();
}
use of com.coveros.selenified.utilities.Hub in project selenified by Coveros.
the class SauceIT method saucePassedTest.
@Test(groups = { "integration", "hub", "sauce", "sauceAPI" }, dependsOnMethods = { "hubTitleTest" }, description = "An integration test to check that sauce get all expected information")
public void saucePassedTest(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("passed", true);
response.assertContains().keyValues(expectedResults);
finish();
}
use of com.coveros.selenified.utilities.Hub in project selenified by Coveros.
the class SauceIT method sauceTagsTest.
@Test(groups = { "integration", "hub", "sauce", "sauceAPI" }, dependsOnMethods = { "hubTitleTest" }, description = "An integration test to check that sauce get all expected information")
public void sauceTagsTest(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<>();
JsonArray tags = new JsonArray();
tags.add("hub");
tags.add("integration");
tags.add("sauce");
expectedResults.put("tags", tags);
response.assertContains().keyValues(expectedResults);
finish();
}
use of com.coveros.selenified.utilities.Hub in project selenified by Coveros.
the class SauceIT method sauceComplexNameTest.
@Test(groups = { "integration", "hub", "sauce", "sauceAPI" }, dependsOnMethods = { "hubSearchTest" }, description = "An integration test to check that sauce get all expected information")
public void sauceComplexNameTest(ITestContext iTestContext) throws IOException {
SessionId paramSessionId = (SessionId) iTestContext.getAttribute("PARAM_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/" + paramSessionId.toString());
Map<String, Object> expectedResults = new HashMap<>();
expectedResults.put("name", "integration.hub.SauceIT.hubSearchTestWithOptionSelenifiedcoveroscom");
response.assertContains().keyValues(expectedResults);
finish();
}
Aggregations