Search in sources :

Example 71 with TestVariable

use of com.seleniumtests.core.TestVariable in project seleniumRobot by bhecquet.

the class TestStringUtility method testInterpolateString2.

@Test(groups = { "ut" })
public void testInterpolateString2() {
    SeleniumTestsContextManager.getThreadContext().getConfiguration().put("url", new TestVariable("url", "http://mysite"));
    Assert.assertEquals(StringUtility.interpolateString("connect to ${url} ${url2} correctly", SeleniumTestsContextManager.getThreadContext()), "connect to http://mysite ${url2} correctly");
}
Also used : TestVariable(com.seleniumtests.core.TestVariable) Test(org.testng.annotations.Test) GenericTest(com.seleniumtests.GenericTest)

Example 72 with TestVariable

use of com.seleniumtests.core.TestVariable in project seleniumRobot by bhecquet.

the class TestStringUtility method testInterpolateStringMaskPassword2.

@Test(groups = { "ut" })
public void testInterpolateStringMaskPassword2() {
    SeleniumTestsContextManager.getThreadContext().setMaskPassword(true);
    SeleniumTestsContextManager.getThreadContext().getConfiguration().put("passwd", new TestVariable("passwd", "abc"));
    Assert.assertEquals(StringUtility.interpolateString("connect with ${passwd}", SeleniumTestsContextManager.getThreadContext()), "connect with ****");
}
Also used : TestVariable(com.seleniumtests.core.TestVariable) Test(org.testng.annotations.Test) GenericTest(com.seleniumtests.GenericTest)

Aggregations

TestVariable (com.seleniumtests.core.TestVariable)72 Test (org.testng.annotations.Test)66 GenericTest (com.seleniumtests.GenericTest)53 PrepareForTest (org.powermock.core.classloader.annotations.PrepareForTest)38 XmlTest (org.testng.xml.XmlTest)34 ConnectorsTest (com.seleniumtests.ConnectorsTest)19 MockitoTest (com.seleniumtests.MockitoTest)19 ITestResult (org.testng.ITestResult)14 HashMap (java.util.HashMap)13 SeleniumRobotVariableServerConnector (com.seleniumtests.connectors.selenium.SeleniumRobotVariableServerConnector)12 ArgumentMatchers.anyString (org.mockito.ArgumentMatchers.anyString)10 SeleniumTestsContext (com.seleniumtests.core.SeleniumTestsContext)7 File (java.io.File)3 ArrayList (java.util.ArrayList)3 JSONObject (kong.unirest.json.JSONObject)3 BrowserExtension (com.seleniumtests.browserfactory.BrowserExtension)2 ConfigReader (com.seleniumtests.core.config.ConfigReader)2 ConfigurationException (com.seleniumtests.customexception.ConfigurationException)2 IOException (java.io.IOException)2 HttpRequest (kong.unirest.HttpRequest)2