use of com.seleniumtests.reporter.logger.TestAction in project seleniumRobot by bhecquet.
the class StubTestClass method testWithException.
@Test(groups = "stub")
public void testWithException() {
count++;
TestStep step1 = new TestStep("step 1", Reporter.getCurrentTestResult(), new ArrayList<>(), maskPassword);
step1.addAction(new TestAction(String.format("played %d times", count), false, new ArrayList<>()));
step1.addAction(new TestAction("click button", false, new ArrayList<>()));
TestStepManager.logTestStep(step1);
throw new DriverExceptions("some exception");
}
use of com.seleniumtests.reporter.logger.TestAction in project seleniumRobot by bhecquet.
the class StubTestClass method testWithExceptionAndMaxRetryIncreasedWithLimit.
/**
* Increase max retry above limit
*/
@Test(groups = "stub")
public void testWithExceptionAndMaxRetryIncreasedWithLimit() {
count++;
TestStep step1 = new TestStep("step 1", Reporter.getCurrentTestResult(), new ArrayList<>(), maskPassword);
step1.addAction(new TestAction(String.format("played %d times", count), false, new ArrayList<>()));
step1.addAction(new TestAction("click button", false, new ArrayList<>()));
TestStepManager.logTestStep(step1);
try {
throw new DriverExceptions("some exception");
} finally {
if (count < 4) {
increaseMaxRetry();
}
}
}
use of com.seleniumtests.reporter.logger.TestAction in project seleniumRobot by bhecquet.
the class StubTestClass method testOkWithOneStepFailed.
/**
* Issue #229: test with a step in error but test OK
*/
@Test(groups = "stub")
public void testOkWithOneStepFailed() {
TestStep step1 = new TestStep("step 1", Reporter.getCurrentTestResult(), new ArrayList<>(), maskPassword);
step1.addAction(new TestAction("first action failed", true, new ArrayList<>()));
step1.addAction(new TestAction("click button", false, new ArrayList<>()));
TestStepManager.logTestStep(step1);
}
use of com.seleniumtests.reporter.logger.TestAction in project seleniumRobot by bhecquet.
the class StubTestClassForEncoding method testWithChainedException.
@Test(groups = "stub")
public void testWithChainedException() {
TestStep step1 = new TestStep("step 1", Reporter.getCurrentTestResult(), new ArrayList<>(), true);
step1.addAction(new TestAction("click button", false, new ArrayList<>()));
TestStepManager.logTestStep(step1);
throw new DriverExceptions("& some exception \"with \" <strong><a href='http://someurl/link' style='background-color: red;'>HTML to encode</a></strong>", new DriverExceptions("root <error>"));
}
use of com.seleniumtests.reporter.logger.TestAction in project seleniumRobot by bhecquet.
the class StubTestClassforTestDescription method testWithLineBreaksInDescription.
@Test(groups = "stub", description = "a test with param ${url}\nand line breaks")
public void testWithLineBreaksInDescription() throws IOException {
TestStep step1 = new TestStep("step 1", Reporter.getCurrentTestResult(), new ArrayList<>(), true);
step1.setFailed(true);
step1.addAction(new TestAction("click button", false, new ArrayList<>()));
step1.addAction(new TestAction("sendKeys to text field", true, new ArrayList<>()));
TestStepManager.logTestStep(step1);
throw new IndexOutOfBoundsException();
}
Aggregations