use of org.testng.annotations.BeforeSuite in project oxAuth by GluuFederation.
the class BaseTest method initTestSuite.
@BeforeSuite
public void initTestSuite(ITestContext context) throws IOException {
SecurityProviderUtility.installBCProvider();
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";
}
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);
}
use of org.testng.annotations.BeforeSuite in project killbill by killbill.
the class TestJaxrsBase method beforeSuite.
@BeforeSuite(groups = "slow")
public void beforeSuite() throws Exception {
if (hasFailed()) {
return;
}
super.beforeSuite();
// We need to setup these earlier than other tests because the server is started once in @BeforeSuite
final KillbillConfigSource configSource = getConfigSource(extraPropertiesForTestSuite);
final ConfigSource skifeConfigSource = new ConfigSource() {
@Override
public String getString(final String propertyName) {
return configSource.getString(propertyName);
}
};
final KillbillServerConfig serverConfig = new ConfigurationObjectFactory(skifeConfigSource).build(KillbillServerConfig.class);
listener = new TestKillbillGuiceListener(serverConfig, configSource);
config = new ConfigurationObjectFactory(System.getProperties()).build(HttpServerConfig.class);
server = new HttpServer();
server.configure(config, getListeners(), getFilters());
server.start();
callbackServlet = new CallbackServlet();
callbackServer = new CallbackServer(callbackServlet);
callbackServer.startServer();
}
use of org.testng.annotations.BeforeSuite in project orientdb by orientechnologies.
the class RunServerTest method before.
@BeforeSuite
public void before() throws Exception {
server = new OServer();
server.startup(RunServerTest.class.getClassLoader().getResourceAsStream("orientdb-server-config.xml"));
server.activate();
}
use of org.testng.annotations.BeforeSuite in project openstack4j by ContainX.
the class TelemetryDateDeserializerTest method setup.
@BeforeSuite
public void setup() {
mapper = new ObjectMapper();
deserializer = new TelemetryDateDeserializer();
}
use of org.testng.annotations.BeforeSuite in project OpenRefine by OpenRefine.
the class RefineTest method init.
@BeforeSuite
public void init() {
System.setProperty("log4j.configuration", "tests.log4j.properties");
try {
workspaceDir = TestUtils.createTempDirectory("openrefine-test-workspace-dir");
File jsonPath = new File(workspaceDir, "workspace.json");
FileUtils.writeStringToFile(jsonPath, "{\"projectIDs\":[]\n" + ",\"preferences\":{\"entries\":{\"scripting.starred-expressions\":" + "{\"class\":\"com.google.refine.preference.TopList\",\"top\":2147483647," + "\"list\":[]},\"scripting.expressions\":{\"class\":\"com.google.refine.preference.TopList\",\"top\":100,\"list\":[]}}}}", // JSON is always UTF-8
"UTF-8");
FileProjectManager.initialize(workspaceDir);
} catch (IOException e) {
workspaceDir = null;
e.printStackTrace();
}
// This just keeps track of any failed test, for cleanupWorkspace
testFailed = false;
}
Aggregations