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


Java ITestNGMethod.isAfterMethodConfiguration方法代码示例

本文整理汇总了Java中org.testng.ITestNGMethod.isAfterMethodConfiguration方法的典型用法代码示例。如果您正苦于以下问题:Java ITestNGMethod.isAfterMethodConfiguration方法的具体用法?Java ITestNGMethod.isAfterMethodConfiguration怎么用?Java ITestNGMethod.isAfterMethodConfiguration使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.testng.ITestNGMethod的用法示例。


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

示例1: ifMethodFixtureStarted

import org.testng.ITestNGMethod; //导入方法依赖的package包/类
private void ifMethodFixtureStarted(final ITestNGMethod testMethod) {
    currentTestContainer.remove();
    Current current = currentTestResult.get();
    final FixtureResult fixture = getFixtureResult(testMethod);
    final String uuid = currentExecutable.get();
    if (testMethod.isBeforeMethodConfiguration()) {
        if (current.isStarted()) {
            currentTestResult.remove();
            current = currentTestResult.get();
        }
        getLifecycle().startPrepareFixture(createFakeContainer(testMethod, current), uuid, fixture);
    }

    if (testMethod.isAfterMethodConfiguration()) {
        getLifecycle().startTearDownFixture(createFakeContainer(testMethod, current), uuid, fixture);
    }
}
 
开发者ID:allure-framework,项目名称:allure-java,代码行数:18,代码来源:AllureTestNg.java

示例2: afterInvocation

import org.testng.ITestNGMethod; //导入方法依赖的package包/类
@Override
public void afterInvocation(final IInvokedMethod method, final ITestResult testResult,
                            final ITestContext context) {
    final ITestNGMethod testMethod = method.getTestMethod();
    if (isSupportedConfigurationFixture(testMethod)) {
        final String executableUuid = currentExecutable.get();
        currentExecutable.remove();
        if (testResult.isSuccess()) {
            getLifecycle().updateFixture(executableUuid, result -> result.withStatus(Status.PASSED));
        } else {
            getLifecycle().updateFixture(executableUuid, result -> result
                    .withStatus(getStatus(testResult.getThrowable()))
                    .withStatusDetails(getStatusDetails(testResult.getThrowable()).orElse(null)));
        }
        getLifecycle().stopFixture(executableUuid);

        if (testMethod.isBeforeMethodConfiguration() || testMethod.isAfterMethodConfiguration()) {
            final String containerUuid = currentTestContainer.get();
            validateContainerExists(getQualifiedName(testMethod), containerUuid);
            currentTestContainer.remove();
            getLifecycle().stopTestContainer(containerUuid);
            getLifecycle().writeTestContainer(containerUuid);
        }
    }
}
 
开发者ID:allure-framework,项目名称:allure-java,代码行数:26,代码来源:AllureTestNg.java

示例3: isSupportedConfigurationFixture

import org.testng.ITestNGMethod; //导入方法依赖的package包/类
@SuppressWarnings("BooleanExpressionComplexity")
private boolean isSupportedConfigurationFixture(final ITestNGMethod testMethod) {
    return testMethod.isBeforeMethodConfiguration() || testMethod.isAfterMethodConfiguration()
            || testMethod.isBeforeTestConfiguration() || testMethod.isAfterTestConfiguration()
            || testMethod.isBeforeClassConfiguration() || testMethod.isAfterClassConfiguration()
            || testMethod.isBeforeSuiteConfiguration() || testMethod.isAfterSuiteConfiguration();
}
 
开发者ID:allure-framework,项目名称:allure-java,代码行数:8,代码来源:AllureTestNg.java

示例4: onConfigurationFailure

import org.testng.ITestNGMethod; //导入方法依赖的package包/类
public synchronized void onConfigurationFailure(ITestResult result) {
	ITestNGMethod method = result.getMethod();
	if (method.isAfterMethodConfiguration()
			&& parallelMode.equals("classes")) {
		quitWebDriver();
	}
	log.info(LoggerUtil.testFormat() + "(FAIL)	-> Config Name : {} ",
			result.getMethod().getMethodName());
}
 
开发者ID:adi4test,项目名称:WebAuto,代码行数:10,代码来源:ListenerHelper.java

示例5: onConfigurationSkip

import org.testng.ITestNGMethod; //导入方法依赖的package包/类
public synchronized void onConfigurationSkip(ITestResult result) {
	ITestNGMethod method = result.getMethod();
	if (method.isAfterMethodConfiguration()
			&& parallelMode.equals("classes")) {
		quitWebDriver();
	}
	log.info(LoggerUtil.testFormat() + "(SKIPPED)	-> Config Name : {} ",
			result.getMethod().getMethodName());
}
 
开发者ID:adi4test,项目名称:WebAuto,代码行数:10,代码来源:ListenerHelper.java

示例6: onConfigurationSuccess

import org.testng.ITestNGMethod; //导入方法依赖的package包/类
public synchronized void onConfigurationSuccess(ITestResult result) {
	ITestNGMethod method = result.getMethod();
	if (method.isAfterMethodConfiguration()
			&& parallelMode.equals("classes")) {
		quitWebDriver();
	}
	log.info(LoggerUtil.testFormat() + "(SUCCESS)	-> Config Name : {} ",
			result.getMethod().getMethodName());
}
 
开发者ID:adi4test,项目名称:WebAuto,代码行数:10,代码来源:ListenerHelper.java


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