Search in sources :

Example 11 with BeforeSuite

use of org.testng.annotations.BeforeSuite in project gatk by broadinstitute.

the class GermlineCNVCallerIntegrationTest method init.

@BeforeSuite
public void init() throws IOException {
    LEARNING_SEX_GENOTYPES_DATA = new SexGenotypeDataCollection(TEST_LEARNING_SAMPLE_SEX_GENOTYPES_FILE);
    CALLING_SEX_GENOTYPES_DATA = new SexGenotypeDataCollection(TEST_CALLING_SAMPLE_SEX_GENOTYPES_FILE);
    GERMLINE_PLOIDY_ANNOTATIONS = new GermlinePloidyAnnotatedTargetCollection(ContigGermlinePloidyAnnotationTableReader.readContigGermlinePloidyAnnotationsFromFile(TEST_CONTIG_PLOIDY_ANNOTATIONS_FILE), TargetTableReader.readTargetFile(TEST_TARGETS_FILE));
}
Also used : SexGenotypeDataCollection(org.broadinstitute.hellbender.tools.exome.sexgenotyper.SexGenotypeDataCollection) GermlinePloidyAnnotatedTargetCollection(org.broadinstitute.hellbender.tools.exome.sexgenotyper.GermlinePloidyAnnotatedTargetCollection) BeforeSuite(org.testng.annotations.BeforeSuite)

Example 12 with BeforeSuite

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

the class ConfigurableTest method initTestSuite.

@BeforeSuite
public void initTestSuite(ITestContext context) throws FileNotFoundException, IOException {
    Reporter.log("Invoked init test suite method \n", true);
    String propertiesFile = context.getCurrentXmlTest().getParameter("propertiesFile");
    if (StringHelper.isEmpty(propertiesFile)) {
        propertiesFile = "target/test-classes/testng.properties";
    }
    // Load test parameters
    FileInputStream conf = new FileInputStream(propertiesFile);
    Properties prop;
    try {
        prop = new Properties();
        prop.load(conf);
    } finally {
        IOUtils.closeQuietly(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 parameters
    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 13 with BeforeSuite

use of org.testng.annotations.BeforeSuite in project incubator-gobblin by apache.

the class CouchbaseWriterTest method startServers.

@BeforeSuite
public void startServers() {
    _couchbaseTestServer = new CouchbaseTestServer(TestUtils.findFreePort());
    _couchbaseTestServer.start();
    _couchbaseEnvironment = DefaultCouchbaseEnvironment.builder().bootstrapHttpEnabled(true).bootstrapHttpDirectPort(_couchbaseTestServer.getPort()).bootstrapCarrierDirectPort(_couchbaseTestServer.getServerPort()).bootstrapCarrierEnabled(false).kvTimeout(10000).build();
}
Also used : CouchbaseTestServer(org.apache.gobblin.couchbase.CouchbaseTestServer) BeforeSuite(org.testng.annotations.BeforeSuite)

Example 14 with BeforeSuite

use of org.testng.annotations.BeforeSuite in project selenified by Coveros.

the class SelenifiedTest method beforeSuite.

@BeforeSuite(alwaysRun = true)
public void beforeSuite() throws InvalidBrowserException {
    // add some extra capabilities
    extraCapabilities = new DesiredCapabilities();
    extraCapabilities.setCapability("ignoreProtectedModeSettings", true);
    extraCapabilities.setCapability("unexpectedAlertBehaviour", "ignore");
    // save the passed in information
    if (System.getProperty("appURL") != null) {
        setAppURL = System.getProperty("appURL");
        System.clearProperty("appURL");
    }
    if (System.getProperty("browser") != null) {
        setBrowser = System.getProperty("browser");
        System.clearProperty("browser");
    }
    if (System.getProperty("hub") != null) {
        setHub = System.getProperty("hub");
        System.clearProperty("hub");
    }
    if (System.getProperty("proxy") != null) {
        setProxy = System.getProperty("proxy");
        System.clearProperty("proxy");
    }
    super.beforeSuite();
}
Also used : DesiredCapabilities(org.openqa.selenium.remote.DesiredCapabilities) BeforeSuite(org.testng.annotations.BeforeSuite)

Example 15 with BeforeSuite

use of org.testng.annotations.BeforeSuite in project selenium_java by sergueik.

the class TestWithData method beforeSuite.

@BeforeSuite
public void beforeSuite() {
    System.setProperty("webdriver.chrome.driver", (new File("c:/java/selenium/chromedriver.exe")).getAbsolutePath());
    DesiredCapabilities capabilities = DesiredCapabilities.chrome();
    ChromeOptions options = new ChromeOptions();
    Map<String, Object> chromePrefs = new HashMap<>();
    chromePrefs.put("profile.default_content_settings.popups", 0);
    String downloadFilepath = System.getProperty("user.dir") + System.getProperty("file.separator") + "target" + System.getProperty("file.separator");
    chromePrefs.put("download.default_directory", downloadFilepath);
    chromePrefs.put("enableNetwork", "true");
    options.setExperimentalOption("prefs", chromePrefs);
    options.addArguments("allow-running-insecure-content");
    options.addArguments("allow-insecure-localhost");
    options.addArguments("enable-local-file-accesses");
    options.addArguments("disable-notifications");
    // options.addArguments("start-maximized");
    options.addArguments("browser.download.folderList=2");
    options.addArguments("--browser.helperApps.neverAsk.saveToDisk=image/jpg,text/csv,text/xml,application/xml,application/vnd.ms-excel,application/x-excel,application/x-msexcel,application/excel,application/pdf");
    options.addArguments("browser.download.dir=" + downloadFilepath);
    // options.addArguments("user-data-dir=/path/to/your/custom/profile");
    capabilities.setBrowserName(DesiredCapabilities.chrome().getBrowserName());
    capabilities.setCapability(ChromeOptions.CAPABILITY, options);
    capabilities.setCapability(CapabilityType.ACCEPT_SSL_CERTS, true);
    driver = new ChromeDriver(capabilities);
    actions = new Actions(driver);
    driver.manage().timeouts().setScriptTimeout(scriptTimeout, TimeUnit.SECONDS);
    wait = new WebDriverWait(driver, flexibleWait);
    wait.pollingEvery(pollingInterval, TimeUnit.MILLISECONDS);
    screenshot = ((TakesScreenshot) driver);
    js = ((JavascriptExecutor) driver);
    mySheet = getSpreadSheet();
}
Also used : JavascriptExecutor(org.openqa.selenium.JavascriptExecutor) HashMap(java.util.HashMap) Actions(org.openqa.selenium.interactions.Actions) DesiredCapabilities(org.openqa.selenium.remote.DesiredCapabilities) WebDriverWait(org.openqa.selenium.support.ui.WebDriverWait) ChromeOptions(org.openqa.selenium.chrome.ChromeOptions) ChromeDriver(org.openqa.selenium.chrome.ChromeDriver) File(java.io.File) TakesScreenshot(org.openqa.selenium.TakesScreenshot) 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