Search in sources :

Example 81 with TestStep

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

the class StubTestClass method testWithInfo2.

@Test(groups = "stub", description = "a test with infos")
public void testWithInfo2() throws IOException {
    TestStep step1 = new TestStep("step 1", Reporter.getCurrentTestResult(), new ArrayList<>(), maskPassword);
    step1.addAction(new TestAction("click button", false, new ArrayList<>()));
    step1.addAction(new TestAction("sendKeys to text field", true, new ArrayList<>()));
    TestStepManager.logTestStep(step1);
    addTestInfo("user ID", new HyperlinkInfo("12345", "http://foo/bar/12345"));
}
Also used : TestStep(com.seleniumtests.reporter.logger.TestStep) ArrayList(java.util.ArrayList) TestAction(com.seleniumtests.reporter.logger.TestAction) HyperlinkInfo(com.seleniumtests.reporter.info.HyperlinkInfo) Test(org.testng.annotations.Test)

Example 82 with TestStep

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

the class StubTestClass method testWithInfo1.

@Test(groups = "stub", description = "a test with infos")
public void testWithInfo1() throws IOException {
    TestStep step1 = new TestStep("step 1", Reporter.getCurrentTestResult(), new ArrayList<>(), maskPassword);
    step1.addAction(new TestAction("click button", false, new ArrayList<>()));
    step1.addAction(new TestAction("sendKeys to text field", true, new ArrayList<>()));
    TestStepManager.logTestStep(step1);
    addTestInfo("bugé <\"ID\">", new StringInfo("12"));
}
Also used : TestStep(com.seleniumtests.reporter.logger.TestStep) StringInfo(com.seleniumtests.reporter.info.StringInfo) ArrayList(java.util.ArrayList) TestAction(com.seleniumtests.reporter.logger.TestAction) Test(org.testng.annotations.Test)

Example 83 with TestStep

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

the class StubTestClassForEncoding method testWithException.

@Test(groups = "stub")
public void testWithException() {
    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>");
}
Also used : TestStep(com.seleniumtests.reporter.logger.TestStep) DriverExceptions(com.seleniumtests.customexception.DriverExceptions) ArrayList(java.util.ArrayList) TestAction(com.seleniumtests.reporter.logger.TestAction) Test(org.testng.annotations.Test)

Example 84 with TestStep

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

the class StubTestClassForEncoding method testAndSubActions.

@Test(groups = "stub", description = "a test with steps")
public void testAndSubActions() throws IOException {
    TestStep step1 = new TestStep("step 1 <>\"'&/", Reporter.getCurrentTestResult(), new ArrayList<>(), true);
    step1.addAction(new TestAction("click button  <>\"'&", false, new ArrayList<>()));
    step1.addMessage(new TestMessage("a message <>\"'&", MessageType.LOG));
    TestStepManager.logTestStep(step1);
}
Also used : TestStep(com.seleniumtests.reporter.logger.TestStep) ArrayList(java.util.ArrayList) TestMessage(com.seleniumtests.reporter.logger.TestMessage) TestAction(com.seleniumtests.reporter.logger.TestAction) Test(org.testng.annotations.Test)

Example 85 with TestStep

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

the class StubTestClassforTestDescription method testNoDescription.

@Test(groups = "stub")
public void testNoDescription() throws IOException {
    TestStep step1 = new TestStep("step 1", Reporter.getCurrentTestResult(), new ArrayList<>(), true);
    step1.addAction(new TestAction("click button", false, new ArrayList<>()));
    step1.addAction(new TestAction("sendKeys to text field", false, new ArrayList<>()));
    TestStepManager.logTestStep(step1);
}
Also used : TestStep(com.seleniumtests.reporter.logger.TestStep) ArrayList(java.util.ArrayList) TestAction(com.seleniumtests.reporter.logger.TestAction) Test(org.testng.annotations.Test)

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