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


Java AfterGroups类代码示例

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


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

示例1: tearDownAllDrivers

import org.testng.annotations.AfterGroups; //导入依赖的package包/类
@AfterGroups(groups={"2drivers_android","1driver_android","1driver_ios","2drivers_ios"})
public void tearDownAllDrivers() throws Exception{
	if(null!=appiumFactory.getAndroidDriver1()){
		appiumFactory.getAndroidDriver1().quit();
		System.out.println("Android DRIVER 1 quitted on ANDROID device "+ReadConfigFile.getInstance().getDevicesMap().get("androiddevice1").get("deviceName") +", closing application "+Constant.APPLICATION_NAME+".");	
	}
	if(null!=appiumFactory.getAndroidDriver2()){
		appiumFactory.getAndroidDriver2().quit();
		System.out.println("Android DRIVER 2 quitted on ANDROID device "+ReadConfigFile.getInstance().getDevicesMap().get("androiddevice2").get("deviceName") +", closing application "+Constant.APPLICATION_NAME+".");	
	}
	if(null!=appiumFactory.getiOsDriver1()){
		appiumFactory.getiOsDriver1().quit();
		System.out.println("Ios DRIVER 1 quitted on iOS device "+ReadConfigFile.getInstance().getDevicesMap().get("iosdevice1").get("deviceName") +", closing application "+Constant.APPLICATION_NAME+".");	
	}
	if(null!=appiumFactory.getiOsDriver2()){
		appiumFactory.getiOsDriver2().quit();
		System.out.println("Ios DRIVER 2 quitted on iOS device "+ReadConfigFile.getInstance().getDevicesMap().get("iosdevice2").get("deviceName") +", closing application "+Constant.APPLICATION_NAME+".");	
	}
	//Stop the two appium's servers.
	stop2AppiumServers();
}
 
开发者ID:vector-im,项目名称:riot-automated-tests,代码行数:22,代码来源:RiotParentTest.java

示例2: afterExternalBlogMemberTestsGroup

import org.testng.annotations.AfterGroups; //导入依赖的package包/类
/**
 * Cleanup after group externalGroupBlogMemberTestsGroup.
 *
 * @throws Exception
 *             in case clean up failed
 */
@AfterGroups(groups = { "externalBlogMemberTestsGroup" })
public void afterExternalBlogMemberTestsGroup() throws Exception {
    AuthenticationHelper.removeAuthentication();
    // remove group from other blog
    AuthenticationTestUtils.setSecurityContext(UserAndGroupTestUtils.findNthUser(
            BLOG_MANAGER_ALIAS_PATTERN_PREFIX, 2));
    Long blogId = getBlogManagement().findBlogByIdentifier(BLOG_2_ALIAS).getId();
    Long groupId2 = UserAndGroupTestUtils.findGroup(GROUP_2_ALIAS).getId();
    getBlogRightsManagement().removeMemberByEntityId(blogId, groupId2);
    Long userId = UserAndGroupTestUtils.findNthUser(USER_GROUP_1A2_ALIAS_PATTERN_PREFIX, 1)
            .getId();
    Set<Long> usersToSkip = new HashSet<Long>(1);
    usersToSkip.add(userId);
    assertGroupBlogAccess(blogId, groupId2, null, false, usersToSkip);
    // user must be unaffected
    assertBlogAccess(blogId, userId, BlogRole.MANAGER, false, true);
    getBlogRightsManagement().removeMemberByEntityId(blogId, userId);
    assertBlogAccess(blogId, userId, null, false, false);
    AuthenticationHelper.removeAuthentication();
}
 
开发者ID:Communote,项目名称:communote-server,代码行数:27,代码来源:BlogRightsTest.java

示例3: afterXGroupBlogMemberTestsGroup

import org.testng.annotations.AfterGroups; //导入依赖的package包/类
/**
 * Cleanup after group xGroupBlogMemberTestsGroup.
 *
 * @throws Exception
 *             in case clean up failed
 */
@AfterGroups(groups = { "xGroupBlogMemberTestsGroup" })
public void afterXGroupBlogMemberTestsGroup() throws Exception {
    // remove the group and user from the blog
    Long blogId2 = getBlogManagement().findBlogByIdentifier(BLOG_2_ALIAS).getId();
    Long groupId1 = UserAndGroupTestUtils.findGroup(GROUP_1_ALIAS).getId();
    getBlogRightsManagement().removeMemberByEntityId(blogId2, groupId1);
    Long userId = UserAndGroupTestUtils.findNthUser(USER_GROUP_1A2_ALIAS_PATTERN_PREFIX, 1)
            .getId();
    Set<Long> usersToSkip = new HashSet<Long>();
    usersToSkip.add(userId);
    assertGroupBlogAccess(blogId2, groupId1, null, false, usersToSkip);
    getBlogRightsManagement().removeMemberByEntityId(blogId2, userId);
    assertBlogAccess(blogId2, userId, null, false, true);
    AuthenticationHelper.removeAuthentication();
    // remove group from other blog
    AuthenticationTestUtils.setSecurityContext(UserAndGroupTestUtils.findNthUser(
            BLOG_MANAGER_ALIAS_PATTERN_PREFIX, 1));
    Long blogId1 = getBlogManagement().findBlogByIdentifier(BLOG_1_ALIAS).getId();
    Long groupId2 = UserAndGroupTestUtils.findGroup(GROUP_2_ALIAS).getId();
    getBlogRightsManagement().removeMemberByEntityId(blogId1, groupId2);
    AuthenticationHelper.removeAuthentication();
}
 
开发者ID:Communote,项目名称:communote-server,代码行数:29,代码来源:BlogRightsTest.java

示例4: afterGroups

import org.testng.annotations.AfterGroups; //导入依赖的package包/类
@AfterGroups(groups = "sharedHBase")
public void afterGroups(ITestContext context) throws Exception {
    LOG.info("Tearing down OmidTestBase...");
    if (hbaseCluster != null) {
        hBaseUtils.shutdownMiniCluster();
    }

    getClient(context).close().get();
    getTSO(context).stopAndWait();
    TestUtils.waitForSocketNotListening("localhost", 1234, 1000);
}
 
开发者ID:apache,项目名称:incubator-omid,代码行数:12,代码来源:OmidTestBase.java

示例5: cleanupDeleteUserByManagerTests

import org.testng.annotations.AfterGroups; //导入依赖的package包/类
/**
 * Cleanup method for the test group DeleteTestUserByManager
 */
@AfterGroups(groups = { "DeleteTestUserByManager" })
public void cleanupDeleteUserByManagerTests() {
    try {
        if (userManagement.findUserByAlias(TEST_DEL_USER_ALIAS) != null) {
            internalTestAnonymizeUser(TEST_DEL_USER_EMAIL, TEST_DEL_USER_ALIAS);
        }
    } catch (Exception e) {
        Assert.fail("Cleanup operation failed.", e);
    } finally {
        AuthenticationTestUtils.setAuthentication(null);
    }
}
 
开发者ID:Communote,项目名称:communote-server,代码行数:16,代码来源:UserManagementTest.java

示例6: afterGroupBlogMemberTestsGroup

import org.testng.annotations.AfterGroups; //导入依赖的package包/类
/**
 * Cleanup after group userBlogMemberTestsGroup.
 *
 * @throws Exception
 *             in case clean up failed
 */
@AfterGroups(groups = { "groupBlogMemberTestsGroup" })
public void afterGroupBlogMemberTestsGroup() throws Exception {
    // remove the user from the blog
    Long userId = UserAndGroupTestUtils.findNthUser(USER_GROUP_1_ALIAS_PATTERN_PREFIX, 1)
            .getId();
    AuthenticationTestUtils.setSecurityContext(UserAndGroupTestUtils.findNthUser(
            BLOG_MANAGER_ALIAS_PATTERN_PREFIX, 2));
    Long blogId = getBlogManagement().findBlogByIdentifier(BLOG_2_ALIAS).getId();
    getBlogRightsManagement().removeMemberByEntityId(blogId, userId);
    assertBlogAccess(blogId, userId, null, false, true);
    AuthenticationHelper.removeAuthentication();
}
 
开发者ID:Communote,项目名称:communote-server,代码行数:19,代码来源:BlogRightsTest.java

示例7: AfterClass

import org.testng.annotations.AfterGroups; //导入依赖的package包/类
@AfterGroups(groups = "Test")
public void AfterClass(){
    try{
        webDriverDecorator.getDriver().quit();
    }catch (Exception e){

    }
}
 
开发者ID:HarrisChu,项目名称:webUIAuto,代码行数:9,代码来源:BaseElementTest.java

示例8: afterGroups1

import org.testng.annotations.AfterGroups; //导入依赖的package包/类
@AfterGroups
public void afterGroups1() throws IOException {
    addImgAttachment();
    addStringAttachment();
}
 
开发者ID:allure-framework,项目名称:allure-java,代码行数:6,代码来源:AllFeatures.java

示例9: afterGroups2

import org.testng.annotations.AfterGroups; //导入依赖的package包/类
@AfterGroups
public void afterGroups2() throws IOException {
    addImgAttachment();
    addStringAttachment();
}
 
开发者ID:allure-framework,项目名称:allure-java,代码行数:6,代码来源:AllFeatures.java

示例10: restoreFilePermissions

import org.testng.annotations.AfterGroups; //导入依赖的package包/类
/**
 * Restore the system property.
 */
@AfterGroups (groups = {"readLocalFiles"})
public void restoreFilePermissions() {
    setPermissions();
}
 
开发者ID:campolake,项目名称:openjdk9,代码行数:8,代码来源:JAXPFileReadOnlyBaseTest.java

示例11: afterDefaultGroup

import org.testng.annotations.AfterGroups; //导入依赖的package包/类
@AfterGroups (groups = DEFAULT_CONFIG_MANAGER_REQUIRED)
public void afterDefaultGroup() {
    LOGGER.info("Testing done with default config manager....");
}
 
开发者ID:Technolords,项目名称:microservice-mock,代码行数:5,代码来源:ConfigurationManagerTest.java

示例12: afterTestGroup

import org.testng.annotations.AfterGroups; //导入依赖的package包/类
@AfterGroups (groups = TEST_CONFIG_MANAGER_REQUIRED)
public void afterTestGroup() {
    LOGGER.info("Testing done with test config manager....");
}
 
开发者ID:Technolords,项目名称:microservice-mock,代码行数:5,代码来源:ConfigurationManagerTest.java

示例13: afterTestQueryGroup

import org.testng.annotations.AfterGroups; //导入依赖的package包/类
@AfterGroups (groups = TEST_QUERY_GROUP_CONFIG_MANAGER_REQUIRED)
public void afterTestQueryGroup() {
    LOGGER.info("Testing done with test queryGroup config manager....");
}
 
开发者ID:Technolords,项目名称:microservice-mock,代码行数:5,代码来源:ConfigurationManagerTest.java

示例14: afterGroup

import org.testng.annotations.AfterGroups; //导入依赖的package包/类
@AfterGroups(alwaysRun = true)
final public void afterGroup(ITestContext testContext) {
	tearDownPrrallelThreads(testContext, "groups");
}
 
开发者ID:qmetry,项目名称:qaf,代码行数:5,代码来源:AbstractTestCase.java

示例15: cleanupDeleteUserByUserTests

import org.testng.annotations.AfterGroups; //导入依赖的package包/类
/**
 * Cleanup method for the test group DeleteTestUserByUser
 */
@AfterGroups(groups = { "DeleteTestUserByUser" })
public void cleanupDeleteUserByUserTests() {
    AuthenticationTestUtils.setAuthentication(null);
}
 
开发者ID:Communote,项目名称:communote-server,代码行数:8,代码来源:UserManagementTest.java


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