Search in sources :

Example 36 with BeforeSuite

use of org.testng.annotations.BeforeSuite in project oxAuth by GluuFederation.

the class ConfigurableTest method initTestSuite.

@BeforeSuite
public void initTestSuite(ITestContext context) throws FileNotFoundException, IOException {
    String propertiesFile = context.getCurrentXmlTest().getParameter("propertiesFile");
    if (StringHelper.isEmpty(propertiesFile)) {
        propertiesFile = "target/test-classes/testng.properties";
    }
    // Load test parameters
    // propertiesFile =
    // "/Users/JAVIER/IdeaProjects/oxAuth/Client/target/test-classes/testng.properties";
    FileInputStream conf = new FileInputStream(propertiesFile);
    Properties prop = new Properties();
    prop.load(conf);
    Map<String, String> parameters = new HashMap<String, String>();
    for (Entry<Object, Object> entry : prop.entrySet()) {
        Object key = entry.getKey();
        Object value = entry.getValue();
        if (StringHelper.isEmptyString(key) || StringHelper.isEmptyString(value)) {
            continue;
        }
        parameters.put(key.toString(), value.toString());
    }
    // Overrided test paramters
    context.getSuite().getXmlSuite().setParameters(parameters);
}
Also used : HashMap(java.util.HashMap) Properties(java.util.Properties) FileInputStream(java.io.FileInputStream) BeforeSuite(org.testng.annotations.BeforeSuite)

Example 37 with BeforeSuite

use of org.testng.annotations.BeforeSuite in project midpoint by Evolveum.

the class TestFind method setupDebug.

@BeforeSuite
public void setupDebug() throws SchemaException, SAXException, IOException {
    PrettyPrinter.setDefaultNamespacePrefix(DEFAULT_NAMESPACE_PREFIX);
    PrismTestUtil.resetPrismContext(new PrismInternalTestUtil());
}
Also used : PrismInternalTestUtil(com.evolveum.midpoint.prism.PrismInternalTestUtil) BeforeSuite(org.testng.annotations.BeforeSuite)

Example 38 with BeforeSuite

use of org.testng.annotations.BeforeSuite in project midpoint by Evolveum.

the class TestPath method setupDebug.

@BeforeSuite
public void setupDebug() throws SchemaException, SAXException, IOException {
    PrettyPrinter.setDefaultNamespacePrefix(DEFAULT_NAMESPACE_PREFIX);
    PrismTestUtil.resetPrismContext(new PrismInternalTestUtil());
}
Also used : PrismInternalTestUtil(com.evolveum.midpoint.prism.PrismInternalTestUtil) BeforeSuite(org.testng.annotations.BeforeSuite)

Example 39 with BeforeSuite

use of org.testng.annotations.BeforeSuite in project midpoint by Evolveum.

the class TestDelta method setupDebug.

@BeforeSuite
public void setupDebug() throws SchemaException, SAXException, IOException {
    PrettyPrinter.setDefaultNamespacePrefix(DEFAULT_NAMESPACE_PREFIX);
    PrismTestUtil.resetPrismContext(new PrismInternalTestUtil());
}
Also used : PrismInternalTestUtil(com.evolveum.midpoint.prism.PrismInternalTestUtil) BeforeSuite(org.testng.annotations.BeforeSuite)

Example 40 with BeforeSuite

use of org.testng.annotations.BeforeSuite in project midpoint by Evolveum.

the class TestDiff method setupDebug.

@BeforeSuite
public void setupDebug() throws SchemaException, SAXException, IOException {
    PrettyPrinter.setDefaultNamespacePrefix(DEFAULT_NAMESPACE_PREFIX);
    PrismTestUtil.resetPrismContext(new PrismInternalTestUtil());
}
Also used : PrismInternalTestUtil(com.evolveum.midpoint.prism.PrismInternalTestUtil) BeforeSuite(org.testng.annotations.BeforeSuite)

Aggregations

BeforeSuite (org.testng.annotations.BeforeSuite)65 PrismInternalTestUtil (com.evolveum.midpoint.prism.PrismInternalTestUtil)12 HashMap (java.util.HashMap)12 File (java.io.File)11 WebDriverWait (org.openqa.selenium.support.ui.WebDriverWait)6 FileInputStream (java.io.FileInputStream)5 Properties (java.util.Properties)5 ChromeDriver (org.openqa.selenium.chrome.ChromeDriver)5 DesiredCapabilities (org.openqa.selenium.remote.DesiredCapabilities)5 ZNRecordSerializer (org.apache.helix.manager.zk.ZNRecordSerializer)4 ZkClient (org.apache.helix.manager.zk.ZkClient)4 ChromeOptions (org.openqa.selenium.chrome.ChromeOptions)4 Actions (org.openqa.selenium.interactions.Actions)4 IOException (java.io.IOException)3 ArrayList (java.util.ArrayList)3 Random (java.util.Random)3 SubscriptionManagerTasks (rhsm.cli.tasks.SubscriptionManagerTasks)3 SSHCommandResult (com.redhat.qe.tools.SSHCommandResult)2 CloudbreakClient (com.sequenceiq.cloudbreak.client.CloudbreakClient)2 InputStream (java.io.InputStream)2