当前位置: 首页>>代码示例>>Java>>正文


Java BeforeSuite类代码示例

本文整理汇总了Java中org.testng.annotations.BeforeSuite的典型用法代码示例。如果您正苦于以下问题:Java BeforeSuite类的具体用法?Java BeforeSuite怎么用?Java BeforeSuite使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


BeforeSuite类属于org.testng.annotations包,在下文中一共展示了BeforeSuite类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setupForEclipse

import org.testng.annotations.BeforeSuite; //导入依赖的package包/类
@BeforeSuite
public static synchronized void setupForEclipse() {
    String runInEclipse = System.getenv("RUN_IN_ECLIPSE");
    if (StringUtils.isEmpty(runInEclipse) || !runInEclipse.equalsIgnoreCase("true")) {
        return;
    }
    if (!acsStarted) {
        System.out.println("*** Setting up test for Eclipse ***");
        String springProfilesActive = System.getenv("SPRING_PROFILES_ACTIVE");
        if (StringUtils.isEmpty(springProfilesActive)) {
            springProfilesActive = "h2,public,simple-cache";
        }
        System.setProperty("spring.profiles.active", springProfilesActive);
        AccessControlService.main(new String[] {});
        acsStarted = true;
    }
}
 
开发者ID:eclipse,项目名称:keti,代码行数:18,代码来源:TestConfig.java

示例2: beforeSuite

import org.testng.annotations.BeforeSuite; //导入依赖的package包/类
@Parameters({"baseURL"})
@BeforeSuite
public void beforeSuite(String baseURL) {
	try {

		rpr = ReadPropertyFile.getInstance("./TestResources/TestConfig/test.properties");

		reportFile = rpr.getKey("reportFile");
		emailConfigFile = rpr.getKey("emailConfigFile");
		sendEmail = rpr.getKey("sendEmail");
		
		// If the we are testing single Web Application. Mention the same in 
		//test.properties file and uncomment below line.
		
		//baseURL = rpr.getKey("baseURL");
		
		// Commnet this line if previous line is uncommented
		BaseClass.baseURL = baseURL;
		browserName = rpr.getKey("browserName");
		reporter = ReportManager.getReporter(reportFile, true);
		
	} catch (Exception e) {
		e.printStackTrace();
		System.out.println("Error occured in @BeforeSuite");
	}
}
 
开发者ID:anilpandeykiet,项目名称:POM_HYBRID_FRAMEOWRK,代码行数:27,代码来源:BaseClass.java

示例3: setup

import org.testng.annotations.BeforeSuite; //导入依赖的package包/类
@BeforeSuite
public void setup() {
    communoteWebServiceController = new CommunoteWebServiceController();
    communoteWebServiceController.setServletContext(new MockServletContext());

    communoteWebServiceDefinition = new CommunoteWebServiceDefinition();

    communoteWebServiceDefinition.setEndpointName("HelloWorldImpl");
    communoteWebServiceDefinition.setLocalPartName("HelloWorldImpl");
    communoteWebServiceDefinition.setNameSpaceUri("http://www.examples.com/wsdl/HelloService");
    communoteWebServiceDefinition.setPluginName(PLUGIN_NAME);
    communoteWebServiceDefinition.setRelativeUrlPattern(REL_URL_PATTERN);
    communoteWebServiceDefinition.setServiceClass(HelloWorldImpl.class);

    communoteWebServiceController.registerService(communoteWebServiceDefinition);
}
 
开发者ID:Communote,项目名称:communote-server,代码行数:17,代码来源:WebserviceExtensionPointTest.java

示例4: setup

import org.testng.annotations.BeforeSuite; //导入依赖的package包/类
@BeforeSuite
public void setup() throws IOException {
    defaultAttributes = new Attributes();
    defaultAttributes.putValue("Manifest-Version", "1.0");
    defaultAttributes.putValue("Created-By", "1.8.0-internal");

    mrjar1   = Paths.get("mrjar1.jar");
    mrjar2   = Paths.get("mrjar2.jar");
    nonMRjar = Paths.get("nonMRjar.jar");
    mrjarAllCaps = Paths.get("mrjarAllCaps.jar");

    Attributes mrJarAttrs = new Attributes(defaultAttributes);
    mrJarAttrs.putValue(MRJAR_ATTR, "true");

    build(mrjar1, mrJarAttrs);
    build(mrjar2, mrJarAttrs);
    build(nonMRjar, defaultAttributes);

    // JEP 238 - "Multi-Release JAR Files" states that the attribute name
    // and value are case insensitive.  Try with all caps to ensure that
    // jdeps still recognizes a multi-release jar.
    Attributes allCapsAttrs = new Attributes(defaultAttributes);
    allCapsAttrs.putValue(MRJAR_ATTR.toUpperCase(), "TRUE");
    build(mrjarAllCaps, allCapsAttrs);
}
 
开发者ID:ojdkbuild,项目名称:lookaside_java-1.8.0-openjdk,代码行数:26,代码来源:MRJarWarning.java

示例5: installationStep1InitializeDatabase

import org.testng.annotations.BeforeSuite; //导入依赖的package包/类
/**
 * Installation test that creates the DB schema.
 *
 * @throws Exception
 *             in case the test fails
 */
@BeforeSuite(dependsOnMethods = "prepareDatabase")
public void installationStep1InitializeDatabase() throws Exception {
    CommunoteInstaller installer = CommunoteRuntime.getInstance().getInstaller();

    Map<CoreConfigurationPropertyConstant, String> settings = new HashMap<CoreConfigurationPropertyConstant, String>();

    settings.put(CorePropertyDatabase.DATABASE_HOST, databaseHost);
    settings.put(CorePropertyDatabase.DATABASE_PORT, databasePort);
    settings.put(CorePropertyDatabase.DATABASE_NAME, databaseName);
    settings.put(CorePropertyDatabase.DATABASE_USER_NAME, databaseUsername);
    settings.put(CorePropertyDatabase.DATABASE_USER_PASSWORD, databasePassword);

    StartupProperties newSettings = installer.updateDatabaseSettings(this.databaseType,
            settings);
    String url = newSettings.getDatabaseUrl();
    Assert.assertNotNull(url);
    LOGGER.info("Database Url: {}", url);
    boolean success = installer.initializeDatabase(new LogDatabaseInstallationCallback());
    Assert.assertTrue(success, "DB-setup failed");
}
 
开发者ID:Communote,项目名称:communote-server,代码行数:27,代码来源:InstallerTest.java

示例6: beforeSuite

import org.testng.annotations.BeforeSuite; //导入依赖的package包/类
@BeforeSuite(groups = { "simple" }, timeOut = SETUP_TIMEOUT)
public static void beforeSuite() throws Exception {
    houseKeepingClient = createRxWrapperDocumentClient().build();
    Database d = new Database();
    d.setId(DATABASE_ID);
    createdDatabase = safeCreateDatabase(houseKeepingClient, d);
    createdCollection = safeCreateCollection(houseKeepingClient, createdDatabase.getSelfLink(), getCollectionDefinition());
    for(int i = 0; i < 5; i++) {
        createDocument(houseKeepingClient, i);
    }
}
 
开发者ID:Azure,项目名称:azure-documentdb-rxjava,代码行数:12,代码来源:DocumentQueryTest.java

示例7: beforeSuite

import org.testng.annotations.BeforeSuite; //导入依赖的package包/类
@BeforeSuite(groups = { "simple" }, timeOut = SETUP_TIMEOUT)
public static void beforeSuite() {
    houseKeepingClient = createGatewayRxDocumentClient().build();
    Database d = new Database();
    d.setId(DATABASE_ID);
    createdDatabase = safeCreateDatabase(houseKeepingClient, d);
    createdCollection = safeCreateCollection(houseKeepingClient, createdDatabase.getSelfLink(), getCollectionDefinition());
}
 
开发者ID:Azure,项目名称:azure-documentdb-rxjava,代码行数:9,代码来源:DocumentCrudTest.java

示例8: beforeSuiteHtmlEngineBaseTest

import org.testng.annotations.BeforeSuite; //导入依赖的package包/类
@BeforeSuite
public void beforeSuiteHtmlEngineBaseTest() throws Exception {

    UiEngineConfigurator configurator = UiEngineConfigurator.getInstance();

    // set the base folder with the map files
    // configurator.setMapFilesBaseDir( "resources/com/axway/ats/uiengine/maps" );

    // overwrite some configuration properties for faster test execution
    configurator.setCommandDelay(-1);
    configurator.setElementStateChangeDelay(2000);
    configurator.setHighlightElements(false);
}
 
开发者ID:Axway,项目名称:ats-framework,代码行数:14,代码来源:HtmlEngineBaseTest.java

示例9: setupProxy

import org.testng.annotations.BeforeSuite; //导入依赖的package包/类
@BeforeSuite
public void setupProxy(ITestContext testContext)
{
	testContext.getSuite().setAttribute("cleanups", Lists.newArrayList());
	String proxyHost = testConfig.getProperty("proxy.host");
	String proxyPortString = testConfig.getProperty("proxy.port");
	if( proxyPortString != null )
	{
		System.setProperty("http.proxyHost", proxyHost);
		System.setProperty("http.proxyPort", proxyPortString);
	}
}
 
开发者ID:equella,项目名称:Equella,代码行数:13,代码来源:AbstractRestAssuredTest.java

示例10: setupTestSuite

import org.testng.annotations.BeforeSuite; //导入依赖的package包/类
/**
 * @author wasiq.bhamla
 * @since 13-Apr-2017 10:10:45 PM
 */
@BeforeSuite (alwaysRun = true)
public void setupTestSuite () {
	this.androidServer = new AppiumServer ("android");
	this.androidServer.start ();

	this.androidDevice = new AndroidDevice (this.androidServer, "test");
	this.androidDevice.start ();
}
 
开发者ID:WasiqB,项目名称:coteafs-appium,代码行数:13,代码来源:DefaultTest.java

示例11: beforeSuite

import org.testng.annotations.BeforeSuite; //导入依赖的package包/类
@BeforeSuite
public void beforeSuite(){
	System.out.println("BaseCase: beforeSuite");
	initConfig();
	TestReport.startTime = DateUtil.getNow("yyyy-MM-dd HH:mm:ss");
	TestReport.startMsTime = DateUtil.getNow("yyyy-MM-dd HH:mm:ss.SSS");
}
 
开发者ID:AlanYangs,项目名称:Log4Reports,代码行数:8,代码来源:BaseCase.java

示例12: beforeTestSuite

import org.testng.annotations.BeforeSuite; //导入依赖的package包/类
/**
 * Method that takes test suites parameters and sets some environment properties.
 * @param propFilePath path of the property file data
 * @param inputWebappName name of the service to test (optional parameter)
 * @param context testNG context
 */
@BeforeSuite
@Override
@Parameters(value = {ENV_PROP_FILE_PATH, WEBAPP_NAME})
public void beforeTestSuite(String propFilePath,
                            @Optional(NO_INPUT_WEBAPP_NAME) String inputWebappName,
                            ITestContext context) {
    TestSuiteHandler testSuiteHandler = TestSuiteHandler.getInstance();
    testSuiteHandler.setPropertyFilePath(propFilePath);
    testSuiteHandler.populateEnvironmentHandler();
    testSuiteHandler.populateTestCaseUtils();

}
 
开发者ID:HotelsDotCom,项目名称:heat,代码行数:19,代码来源:TestBaseRunner.java

示例13: beforeTestSuite

import org.testng.annotations.BeforeSuite; //导入依赖的package包/类
/**
 * Method that takes test suites parameters and sets some environment properties.
 * @param propFilePath path of the property file data
 * @param inputWebappName name of the service to test (optional parameter)
 * @param context testNG context
 */
@BeforeSuite
@Override
@Parameters(value = {ENV_PROP_FILE_PATH, WEBAPP_NAME})
public void beforeTestSuite(String propFilePath,
                            @Optional(NO_INPUT_WEBAPP_NAME) String inputWebappName,
                            ITestContext context) {
    super.beforeTestSuite(propFilePath, inputWebappName, context);
    TestSuiteHandler.getInstance().setWebappName(inputWebappName);
}
 
开发者ID:HotelsDotCom,项目名称:heat,代码行数:16,代码来源:SingleMode.java

示例14: setup

import org.testng.annotations.BeforeSuite; //导入依赖的package包/类
@BeforeSuite
public static synchronized void setup() {
    if (!acsStarted) {
        AccessControlService.main(new String[] {});
        acsStarted = true;
    }
}
 
开发者ID:eclipse,项目名称:keti,代码行数:8,代码来源:TestConfig.java

示例15: setupRegistry

import org.testng.annotations.BeforeSuite; //导入依赖的package包/类
@BeforeSuite
static void setupRegistry() {
    try {
        impl = TestLibrary.createRegistryOnEphemeralPort();
        port = TestLibrary.getRegistryPort(impl);
        registry = LocateRegistry.getRegistry("localhost", port);
    } catch (RemoteException ex) {
        Assert.fail("initialization of registry", ex);
    }

    System.out.printf("RMI Registry filter: %s%n", registryFilter);
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:13,代码来源:RegistryFilterTest.java


注:本文中的org.testng.annotations.BeforeSuite类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。