use of com.seleniumtests.reporter.logger.TestStep in project seleniumRobot by bhecquet.
the class StubTestClassforTestDescription method testWithParamCreatedInTest.
@Test(groups = "stub", description = "a test on ${client} account ${account}")
public void testWithParamCreatedInTest() 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", true, new ArrayList<>()));
TestStepManager.logTestStep(step1);
createOrUpdateLocalParam("account", "account-12345");
createOrUpdateParam("client", "Bob");
}
use of com.seleniumtests.reporter.logger.TestStep in project seleniumRobot by bhecquet.
the class TestTestStepManager method testGetNoLastStep.
/**
* Check we get null if the "Test end" step does not exist
*/
@Test(groups = { "ut" })
public void testGetNoLastStep() {
TestStep step1 = new TestStep("step", Reporter.getCurrentTestResult(), new ArrayList<>(), true);
TestStepManager.logTestStep(step1);
Assert.assertNull(TestStepManager.getInstance().getLastTestStep());
}
use of com.seleniumtests.reporter.logger.TestStep in project seleniumRobot by bhecquet.
the class TestTestStepManager method testCurrentRootTestStepWithVideoTimeStamp.
@Test(groups = { "ut" })
public void testCurrentRootTestStepWithVideoTimeStamp() {
TestStepManager.setVideoStartDate();
// wait a bit so that step video timestamp is not 0
WaitHelper.waitForSeconds(1);
TestStep step1 = new TestStep("step 1", Reporter.getCurrentTestResult(), new ArrayList<>(), true);
TestStepManager.setCurrentRootTestStep(step1);
Assert.assertEquals(TestStepManager.getCurrentRootTestStep(), step1);
Assert.assertTrue(step1.getVideoTimeStamp() > 0);
}
use of com.seleniumtests.reporter.logger.TestStep in project seleniumRobot by bhecquet.
the class TestTestStepManager method testGetLastStep.
/**
* Check we get the "Test end" step if it exists
*/
@Test(groups = { "ut" })
public void testGetLastStep() {
TestStep step1 = new TestStep("Test end", Reporter.getCurrentTestResult(), new ArrayList<>(), true);
TestStepManager.logTestStep(step1);
Assert.assertEquals(TestStepManager.getInstance().getLastTestStep(), step1);
}
use of com.seleniumtests.reporter.logger.TestStep in project seleniumRobot by bhecquet.
the class TestLogActions method testPassworkMasking2.
/**
* Same as above but parameter name is 'pwd'
*/
@Test(groups = { "ut" })
public void testPassworkMasking2() {
testPage._setPassword2("someText");
TestStep step = SeleniumTestsContextManager.getThreadContext().getTestStepManager().getTestSteps().get(2);
// all occurences of the password have been replaced
Assert.assertFalse(step.toString().contains("someText"));
Assert.assertEquals(StringUtils.countMatches(step.toString(), "******"), 2);
}
Aggregations