Search in sources :

Example 1 with HpAlmConnector

use of com.seleniumtests.connectors.tms.hpalm.HpAlmConnector in project seleniumRobot by bhecquet.

the class TestTestManager method testTmsSelectionHpAlm.

@Test(groups = { "ut" })
public void testTmsSelectionHpAlm() {
    String config = "{'tmsType': 'hp', 'tmsRun': '3'}";
    TestManager manager = TestManager.getInstance(new JSONObject(config));
    Assert.assertTrue(manager instanceof HpAlmConnector);
}
Also used : JSONObject(org.json.JSONObject) TestManager(com.seleniumtests.connectors.tms.TestManager) HpAlmConnector(com.seleniumtests.connectors.tms.hpalm.HpAlmConnector) Test(org.testng.annotations.Test) GenericTest(com.seleniumtests.GenericTest)

Example 2 with HpAlmConnector

use of com.seleniumtests.connectors.tms.hpalm.HpAlmConnector in project seleniumRobot by bhecquet.

the class TestHpAlmConnector method checkConfiguration.

@Test(groups = { "ut" })
public void checkConfiguration() {
    String config = "{'tmsType': 'hp', 'tmsRun': '3'}";
    HpAlmConnector hp = new HpAlmConnector(new JSONObject(config));
    Assert.assertEquals(hp.getCurrentRunId(), "3");
}
Also used : JSONObject(org.json.JSONObject) HpAlmConnector(com.seleniumtests.connectors.tms.hpalm.HpAlmConnector) Test(org.testng.annotations.Test) GenericTest(com.seleniumtests.GenericTest)

Example 3 with HpAlmConnector

use of com.seleniumtests.connectors.tms.hpalm.HpAlmConnector in project seleniumRobot by bhecquet.

the class TestHpAlmConnector method testInitWithoutUserParameter.

@Test(groups = { "ut" }, expectedExceptions = ConfigurationException.class)
public void testInitWithoutUserParameter() {
    JSONObject connect = new JSONObject();
    connect.put(HpAlmConnector.TMS_SERVER_URL, "http://myServer");
    connect.put(HpAlmConnector.TMS_DOMAIN, "domain");
    connect.put(HpAlmConnector.TMS_PROJECT, "project");
    connect.put(HpAlmConnector.TMS_PASSWORD, "password");
    String config = "{'tmsType': 'hp', 'tmsRun': '3'}";
    HpAlmConnector hp = new HpAlmConnector(new JSONObject(config));
    hp.init(connect);
}
Also used : JSONObject(org.json.JSONObject) HpAlmConnector(com.seleniumtests.connectors.tms.hpalm.HpAlmConnector) Test(org.testng.annotations.Test) GenericTest(com.seleniumtests.GenericTest)

Example 4 with HpAlmConnector

use of com.seleniumtests.connectors.tms.hpalm.HpAlmConnector in project seleniumRobot by bhecquet.

the class TestHpAlmConnector method testInitWithoutProjectParameter.

@Test(groups = { "ut" }, expectedExceptions = ConfigurationException.class)
public void testInitWithoutProjectParameter() {
    JSONObject connect = new JSONObject();
    connect.put(HpAlmConnector.TMS_SERVER_URL, "http://myServer");
    connect.put(HpAlmConnector.TMS_DOMAIN, "domain");
    connect.put(HpAlmConnector.TMS_USER, "user");
    connect.put(HpAlmConnector.TMS_PASSWORD, "password");
    String config = "{'tmsType': 'hp', 'tmsRun': '3'}";
    HpAlmConnector hp = new HpAlmConnector(new JSONObject(config));
    hp.init(connect);
}
Also used : JSONObject(org.json.JSONObject) HpAlmConnector(com.seleniumtests.connectors.tms.hpalm.HpAlmConnector) Test(org.testng.annotations.Test) GenericTest(com.seleniumtests.GenericTest)

Example 5 with HpAlmConnector

use of com.seleniumtests.connectors.tms.hpalm.HpAlmConnector in project seleniumRobot by bhecquet.

the class TestHpAlmConnector method testInitWithAllParameters.

@Test(groups = { "ut" })
public void testInitWithAllParameters() {
    JSONObject connect = new JSONObject();
    connect.put(HpAlmConnector.TMS_SERVER_URL, "http://myServer");
    connect.put(HpAlmConnector.TMS_DOMAIN, "domain");
    connect.put(HpAlmConnector.TMS_PROJECT, "project");
    connect.put(HpAlmConnector.TMS_USER, "user");
    connect.put(HpAlmConnector.TMS_PASSWORD, "password");
    String config = "{'tmsType': 'hp', 'tmsRun': '3'}";
    HpAlmConnector hp = new HpAlmConnector(new JSONObject(config));
    hp.init(connect);
    Assert.assertTrue(hp.getInitialized());
}
Also used : JSONObject(org.json.JSONObject) HpAlmConnector(com.seleniumtests.connectors.tms.hpalm.HpAlmConnector) Test(org.testng.annotations.Test) GenericTest(com.seleniumtests.GenericTest)

Aggregations

GenericTest (com.seleniumtests.GenericTest)9 HpAlmConnector (com.seleniumtests.connectors.tms.hpalm.HpAlmConnector)9 JSONObject (org.json.JSONObject)9 Test (org.testng.annotations.Test)9 TestManager (com.seleniumtests.connectors.tms.TestManager)1