Search in sources :

Example 46 with ErrorCause

use of com.seleniumtests.core.testanalysis.ErrorCause in project seleniumRobot by bhecquet.

the class TestErrorCause method testEqualsNullDescription3.

@Test(groups = { "ut" })
public void testEqualsNullDescription3() {
    ErrorCause cause1 = new ErrorCause(ErrorType.APPLICATION_CHANGED, null, new TestStep("step1", null, new ArrayList<>(), true));
    ErrorCause cause2 = new ErrorCause(ErrorType.APPLICATION_CHANGED, null, new TestStep("step1", null, new ArrayList<>(), true));
    Assert.assertEquals(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 47 with ErrorCause

use of com.seleniumtests.core.testanalysis.ErrorCause in project seleniumRobot by bhecquet.

the class TestErrorCause method testToStringNoStep.

@Test(groups = { "ut" })
public void testToStringNoStep() {
    String desc = new ErrorCause(ErrorType.APPLICATION_CHANGED, "some changes", null).toString();
    Assert.assertEquals(desc, "The application has been modified: some changes");
}
Also used : ErrorCause(com.seleniumtests.core.testanalysis.ErrorCause) Test(org.testng.annotations.Test) GenericTest(com.seleniumtests.GenericTest)

Example 48 with ErrorCause

use of com.seleniumtests.core.testanalysis.ErrorCause in project seleniumRobot by bhecquet.

the class TestErrorCause method testToStringNoRootCause.

@Test(groups = { "ut" })
public void testToStringNoRootCause() {
    String desc = new ErrorCause(ErrorType.ERROR_MESSAGE, "some changes", new TestStep("step1", null, new ArrayList<>(), true)).toString();
    Assert.assertEquals(desc, "Error message displayed: some changes on step 'step1'");
}
Also used : TestStep(com.seleniumtests.reporter.logger.TestStep) ErrorCause(com.seleniumtests.core.testanalysis.ErrorCause) Test(org.testng.annotations.Test) GenericTest(com.seleniumtests.GenericTest)

Example 49 with ErrorCause

use of com.seleniumtests.core.testanalysis.ErrorCause in project seleniumRobot by bhecquet.

the class TestErrorCause method testToStringWithRootCauseNone.

@Test(groups = { "ut" })
public void testToStringWithRootCauseNone() {
    TestStep step = new TestStep("step1", null, new ArrayList<>(), true, RootCause.NONE, "Error from system X", false);
    step.setFailed(true);
    String desc = new ErrorCause(ErrorType.APPLICATION_CHANGED, "some changes", step).toString();
    Assert.assertEquals(desc, "The application has been modified: some changes on step 'step1'");
}
Also used : TestStep(com.seleniumtests.reporter.logger.TestStep) ErrorCause(com.seleniumtests.core.testanalysis.ErrorCause) Test(org.testng.annotations.Test) GenericTest(com.seleniumtests.GenericTest)

Aggregations

ErrorCause (com.seleniumtests.core.testanalysis.ErrorCause)49 GenericTest (com.seleniumtests.GenericTest)48 Test (org.testng.annotations.Test)48 ErrorCauseFinder (com.seleniumtests.core.testanalysis.ErrorCauseFinder)28 ITestResult (org.testng.ITestResult)28 MockitoTest (com.seleniumtests.MockitoTest)27 PrepareForTest (org.powermock.core.classloader.annotations.PrepareForTest)27 File (java.io.File)25 TestStep (com.seleniumtests.reporter.logger.TestStep)18 ArrayList (java.util.ArrayList)16 Field (com.seleniumtests.connectors.selenium.fielddetector.Field)8 Label (com.seleniumtests.connectors.selenium.fielddetector.Label)8 StepReferenceComparator (com.seleniumtests.util.imaging.StepReferenceComparator)8 ConfigurationException (com.seleniumtests.customexception.ConfigurationException)3 Color (java.awt.Color)2 BufferedImage (java.awt.image.BufferedImage)2 SeleniumRobotServerException (com.seleniumtests.customexception.SeleniumRobotServerException)1