use of com.coveros.selenified.utilities.Hub in project selenified by Coveros.
the class HubTest method defaultGetHubSystemBadTest.
@Test(expectedExceptions = InvalidHubException.class)
public void defaultGetHubSystemBadTest() throws MalformedURLException {
System.setProperty(HUB, "somehub");
new Hub().getHubURL();
}
use of com.coveros.selenified.utilities.Hub in project selenified by Coveros.
the class HubTest method defaultGetHubSystemEmptyTest.
@Test(expectedExceptions = InvalidHubException.class)
public void defaultGetHubSystemEmptyTest() throws MalformedURLException {
System.setProperty(HUB, "");
new Hub().getHubURL();
}
use of com.coveros.selenified.utilities.Hub in project selenified by Coveros.
the class HubTest method defaultGetHubOverrideTrueTest.
@Test
public void defaultGetHubOverrideTrueTest() throws IOException {
System.setProperty(HUB, "http://somehub");
createPropertiesFile(HUB + "=");
assertEquals(new Hub().getHubURL(), new URL("http://somehub/wd/hub"));
}
use of com.coveros.selenified.utilities.Hub in project selenified by Coveros.
the class HubTest method getUserOnlyUserTest.
@Test(expectedExceptions = InvalidHubException.class)
public void getUserOnlyUserTest() throws MalformedURLException {
System.setProperty(HUB, "https://sauceusername@ondemand.saucelabs.com:443");
new Hub().getUsername();
}
use of com.coveros.selenified.utilities.Hub 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();
}
Aggregations