Search in sources :

Example 31 with TestStep

use of com.seleniumtests.reporter.logger.TestStep in project seleniumRobot by bhecquet.

the class TestErrorCause method testEqualsDifferentStep.

@Test(groups = { "ut" })
public void testEqualsDifferentStep() {
    ErrorCause cause1 = new ErrorCause(ErrorType.APPLICATION_CHANGED, "some changes", new TestStep("step1", null, new ArrayList<>(), true));
    ErrorCause cause2 = new ErrorCause(ErrorType.APPLICATION_CHANGED, "some changes", new TestStep("step2", null, new ArrayList<>(), true));
    Assert.assertNotEquals(cause1, cause2);
}
Also used : TestStep(com.seleniumtests.reporter.logger.TestStep) ErrorCause(com.seleniumtests.core.testanalysis.ErrorCause) ArrayList(java.util.ArrayList) Test(org.testng.annotations.Test) GenericTest(com.seleniumtests.GenericTest)

Example 32 with TestStep

use of com.seleniumtests.reporter.logger.TestStep in project seleniumRobot by bhecquet.

the class TestErrorCause method testEqualsNullDescription1.

@Test(groups = { "ut" })
public void testEqualsNullDescription1() {
    ErrorCause cause1 = new ErrorCause(ErrorType.APPLICATION_CHANGED, null, new TestStep("step1", null, new ArrayList<>(), true));
    ErrorCause cause2 = new ErrorCause(ErrorType.APPLICATION_CHANGED, "some changes2", new TestStep("step1", null, new ArrayList<>(), true));
    Assert.assertNotEquals(cause1, cause2);
}
Also used : TestStep(com.seleniumtests.reporter.logger.TestStep) ErrorCause(com.seleniumtests.core.testanalysis.ErrorCause) ArrayList(java.util.ArrayList) Test(org.testng.annotations.Test) GenericTest(com.seleniumtests.GenericTest)

Example 33 with TestStep

use of com.seleniumtests.reporter.logger.TestStep in project seleniumRobot by bhecquet.

the class TestErrorCause method testEqualsNullStep2.

@Test(groups = { "ut" })
public void testEqualsNullStep2() {
    ErrorCause cause1 = new ErrorCause(ErrorType.APPLICATION_CHANGED, "some changes", new TestStep("step2", null, new ArrayList<>(), true));
    ErrorCause cause2 = new ErrorCause(ErrorType.APPLICATION_CHANGED, "some changes", null);
    Assert.assertNotEquals(cause1, cause2);
}
Also used : TestStep(com.seleniumtests.reporter.logger.TestStep) ErrorCause(com.seleniumtests.core.testanalysis.ErrorCause) ArrayList(java.util.ArrayList) Test(org.testng.annotations.Test) GenericTest(com.seleniumtests.GenericTest)

Example 34 with TestStep

use of com.seleniumtests.reporter.logger.TestStep in project seleniumRobot by bhecquet.

the class TestErrorCause method testEqualsNullDescription2.

@Test(groups = { "ut" })
public void testEqualsNullDescription2() {
    ErrorCause cause1 = new ErrorCause(ErrorType.APPLICATION_CHANGED, "some changes", new TestStep("step1", null, new ArrayList<>(), true));
    ErrorCause cause2 = new ErrorCause(ErrorType.APPLICATION_CHANGED, null, new TestStep("step1", null, new ArrayList<>(), true));
    Assert.assertNotEquals(cause1, cause2);
}
Also used : TestStep(com.seleniumtests.reporter.logger.TestStep) ErrorCause(com.seleniumtests.core.testanalysis.ErrorCause) ArrayList(java.util.ArrayList) Test(org.testng.annotations.Test) GenericTest(com.seleniumtests.GenericTest)

Example 35 with TestStep

use of com.seleniumtests.reporter.logger.TestStep in project seleniumRobot by bhecquet.

the class TestSeleniumRobotTestPlan method testExecuteUftScriptFailure.

@Test(groups = { "ut" }, expectedExceptions = ScenarioException.class, expectedExceptionsMessageRegExp = "UFT execution failed on script null")
public void testExecuteUftScriptFailure() throws Exception {
    Map<String, String> params = new HashMap<>();
    params.put("foo", "bar");
    TestStep step = new TestStep("step", null, new ArrayList<String>(), false);
    step.setFailed(true);
    when(uft.executeScript(5, params)).thenReturn(Arrays.asList(step));
    new SeleniumRobotTestPlan().executeUftScript(uft, 5, params);
}
Also used : TestStep(com.seleniumtests.reporter.logger.TestStep) HashMap(java.util.HashMap) SeleniumRobotTestPlan(com.seleniumtests.core.runner.SeleniumRobotTestPlan) Test(org.testng.annotations.Test) MockitoTest(com.seleniumtests.MockitoTest) PrepareForTest(org.powermock.core.classloader.annotations.PrepareForTest)

Aggregations

TestStep (com.seleniumtests.reporter.logger.TestStep)190 Test (org.testng.annotations.Test)148 GenericTest (com.seleniumtests.GenericTest)120 ArrayList (java.util.ArrayList)80 TestAction (com.seleniumtests.reporter.logger.TestAction)47 File (java.io.File)37 ScreenShot (com.seleniumtests.driver.screenshots.ScreenShot)25 Snapshot (com.seleniumtests.reporter.logger.Snapshot)24 ErrorCause (com.seleniumtests.core.testanalysis.ErrorCause)19 TestMessage (com.seleniumtests.reporter.logger.TestMessage)16 GenericFile (com.seleniumtests.reporter.logger.GenericFile)15 MockitoTest (com.seleniumtests.MockitoTest)12 HashMap (java.util.HashMap)12 PrepareForTest (org.powermock.core.classloader.annotations.PrepareForTest)12 ITestResult (org.testng.ITestResult)10 ArgumentMatchers.anyString (org.mockito.ArgumentMatchers.anyString)9 Uft (com.seleniumtests.connectors.extools.Uft)8 DriverExceptions (com.seleniumtests.customexception.DriverExceptions)8 ConfigurationException (com.seleniumtests.customexception.ConfigurationException)7 SeleniumRobotServerException (com.seleniumtests.customexception.SeleniumRobotServerException)6