use of com.seleniumtests.connectors.selenium.SeleniumRobotVariableServerConnector in project seleniumRobot by bhecquet.
the class TestSeleniumRobotVariableServerConnector method init.
@BeforeMethod(groups = { "it" })
public void init(ITestContext ctx) {
initThreadContext(ctx);
connector = new SeleniumRobotVariableServerConnector(true, "http://localhost:8002", "Test 1", "37023c02b9df77b5e5939cca85bc2f20cd3d001d");
if (!connector.getActive()) {
throw new SkipException("no seleniumrobot server available");
}
}
use of com.seleniumtests.connectors.selenium.SeleniumRobotVariableServerConnector in project seleniumRobot by bhecquet.
the class TestSeleniumRobotVariableServerConnector method testCreateTestCaseWithToken.
/**
* Check tokens are not added to request when not provided
* @throws UnirestException
*/
@Test(groups = { "ut" })
public void testCreateTestCaseWithToken() throws UnirestException {
configureMockedVariableServerConnection();
SeleniumRobotVariableServerConnector connector = new SeleniumRobotVariableServerConnector(true, SERVER_URL, "Test1", "123");
connector.createTestCase("foo");
verify(createTestCaseRequest, times(2)).header("Authorization", "Token 123");
}
use of com.seleniumtests.connectors.selenium.SeleniumRobotVariableServerConnector in project seleniumRobot by bhecquet.
the class TestSeleniumRobotVariableServerConnector method testCreateApplicationWithToken.
/**
* Check tokens are not added to request when not provided
* @throws UnirestException
*/
@Test(groups = { "ut" })
public void testCreateApplicationWithToken() throws UnirestException {
configureMockedVariableServerConnection();
SeleniumRobotVariableServerConnector connector = new SeleniumRobotVariableServerConnector(true, SERVER_URL, "Test1", "123");
connector.createApplication();
verify(createApplicationRequest, times(1)).header("Authorization", "Token 123");
}
use of com.seleniumtests.connectors.selenium.SeleniumRobotVariableServerConnector in project seleniumRobot by bhecquet.
the class TestSeleniumRobotVariableServerConnector method testServerActiveNotAlive.
@Test(groups = { "ut" })
public void testServerActiveNotAlive() throws UnirestException {
SeleniumRobotVariableServerConnector connector = configureNotAliveConnection();
Assert.assertFalse(connector.getActive());
}
use of com.seleniumtests.connectors.selenium.SeleniumRobotVariableServerConnector in project seleniumRobot by bhecquet.
the class TestSeleniumRobotVariableServerConnector method testServerActiveAliveAndSecuredWithoutToken.
@Test(groups = { "ut" })
public void testServerActiveAliveAndSecuredWithoutToken() throws UnirestException {
configureMockedVariableServerConnection();
SeleniumRobotVariableServerConnector connector = new SeleniumRobotVariableServerConnector(true, SERVER_URL, "Test1", null);
verify(getAliveRequest, never()).header("Authorization", "Token 123");
}
Aggregations