use of com.seleniumtests.reporter.logger.TestStep in project seleniumRobot by bhecquet.
the class TestTestStep method testIsTestEndStep2.
@Test(groups = { "ut" })
public void testIsTestEndStep2() {
TestStep step = new TestStep("Test end", null, new ArrayList<>(), true);
Assert.assertTrue(step.isTestEndStep());
}
use of com.seleniumtests.reporter.logger.TestStep in project seleniumRobot by bhecquet.
the class TestTestStep method testTestSubCapturePositionAndParent.
@Test(groups = { "ut" })
public void testTestSubCapturePositionAndParent() throws IOException {
TestStep step = new TestStep("step1", null, new ArrayList<>(), true);
TestStep subStep = new TestStep("subStep1", null, new ArrayList<>(), true);
step.addStep(subStep);
Har har = new Har(new HarLog());
har.getLog().addPage(new HarPage("title", "a title"));
HarCapture capture = new HarCapture(har, "main");
step.addNetworkCapture(capture);
Assert.assertEquals(capture.getPosition(), 1);
Assert.assertEquals(capture.getParent(), step);
}
use of com.seleniumtests.reporter.logger.TestStep in project seleniumRobot by bhecquet.
the class TestTestStep method testTestStepNoreencodeXml.
/**
* check we do not re-encode an already encoded message
*/
@Test(groups = { "ut" })
public void testTestStepNoreencodeXml() {
TestStep step = new TestStep("step1 \"'<>&", null, new ArrayList<>(), true);
TestStep encodedTestStep = step.encode("xml");
TestStep encodedTestStep2 = encodedTestStep.encode("xml");
Assert.assertEquals(encodedTestStep2.toString(), "Step step1 "'<>&");
}
use of com.seleniumtests.reporter.logger.TestStep in project seleniumRobot by bhecquet.
the class TestTestStep method testPasswordMaskingWithEmptyPassword.
/**
* Check that password masking does not work with empty strings
*/
@Test(groups = { "ut" })
public void testPasswordMaskingWithEmptyPassword() {
List<String> toReplace = new ArrayList<>();
toReplace.add("");
TestStep step = new TestStep("step1 with args: (bar, to)", null, toReplace, true);
Assert.assertEquals(step.getName(), "step1 with args: (bar, to)");
}
use of com.seleniumtests.reporter.logger.TestStep in project seleniumRobot by bhecquet.
the class TestTestStep method testTestSubActionPositionAndParent.
@Test(groups = { "ut" })
public void testTestSubActionPositionAndParent() {
TestStep step = new TestStep("step1", null, new ArrayList<>(), true);
TestStep subStep = new TestStep("subStep1", null, new ArrayList<>(), true);
step.addStep(subStep);
TestAction action = new TestAction("subStep2", null, new ArrayList<>());
step.addAction(action);
Assert.assertEquals(action.getPosition(), 1);
Assert.assertEquals(action.getParent(), step);
}
Aggregations