Search in sources :

Example 26 with Uft

use of com.seleniumtests.connectors.extools.Uft in project seleniumRobot by bhecquet.

the class TestUft method testPrepareLoadArgumentsWithAlmTestMissingUserValues.

@Test(groups = { "ut" }, expectedExceptions = ConfigurationException.class)
public void testPrepareLoadArgumentsWithAlmTestMissingUserValues() {
    Uft uft = new Uft("http://almserver/qcbin", null, "pwd", "dom", "proj", "[QualityCenter]Subject\\Tools\\Tests\\test1");
    uft.setKillUftOnStartup(false);
    uft.prepareArguments(true, false);
}
Also used : Uft(com.seleniumtests.connectors.extools.Uft) Test(org.testng.annotations.Test) PrepareForTest(org.powermock.core.classloader.annotations.PrepareForTest) GenericTest(com.seleniumtests.GenericTest) MockitoTest(com.seleniumtests.MockitoTest)

Example 27 with Uft

use of com.seleniumtests.connectors.extools.Uft in project seleniumRobot by bhecquet.

the class TestUft method testPrepareArgumentsForGrid.

/**
 * Check that in grid mode, we load the file to grid node
 */
@Test(groups = { "ut" })
public void testPrepareArgumentsForGrid() {
    SeleniumTestsContextManager.getThreadContext().setSeleniumGridConnector(connector);
    SeleniumTestsContextManager.getThreadContext().setRunMode("grid");
    when(connector.uploadFileToNode(anyString(), eq(true))).thenReturn("D:\\file");
    Uft uft = new Uft("D:\\Subject\\Tools\\Tests\\test1");
    uft.setKillUftOnStartup(false);
    List<String> args = uft.prepareArguments(true, true);
    Assert.assertEquals(args.size(), 4);
    Assert.assertTrue(args.get(0).equals("D:\\file\\uft.vbs"));
    Assert.assertTrue(args.get(1).equals("D:\\Subject\\Tools\\Tests\\test1"));
    Assert.assertTrue(args.get(2).equals("/execute"));
    Assert.assertTrue(args.get(3).equals("/load"));
}
Also used : Uft(com.seleniumtests.connectors.extools.Uft) ArgumentMatchers.anyString(org.mockito.ArgumentMatchers.anyString) Test(org.testng.annotations.Test) PrepareForTest(org.powermock.core.classloader.annotations.PrepareForTest) GenericTest(com.seleniumtests.GenericTest) MockitoTest(com.seleniumtests.MockitoTest)

Aggregations

Uft (com.seleniumtests.connectors.extools.Uft)27 MockitoTest (com.seleniumtests.MockitoTest)26 PrepareForTest (org.powermock.core.classloader.annotations.PrepareForTest)26 Test (org.testng.annotations.Test)26 GenericTest (com.seleniumtests.GenericTest)25 ArgumentMatchers.anyString (org.mockito.ArgumentMatchers.anyString)20 TestStep (com.seleniumtests.reporter.logger.TestStep)8 TestTasks (com.seleniumtests.core.TestTasks)7 HashMap (java.util.HashMap)7 SeleniumRobotTestPlan (com.seleniumtests.core.runner.SeleniumRobotTestPlan)1