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));
}
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);
}
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();
}
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();
}
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();
}
Aggregations