本文整理汇总了Java中org.spockframework.runtime.model.FeatureInfo类的典型用法代码示例。如果您正苦于以下问题:Java FeatureInfo类的具体用法?Java FeatureInfo怎么用?Java FeatureInfo使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
FeatureInfo类属于org.spockframework.runtime.model包,在下文中一共展示了FeatureInfo类的18个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: findCorrespondingFeatureMethod
import org.spockframework.runtime.model.FeatureInfo; //导入依赖的package包/类
private MethodInfo findCorrespondingFeatureMethod(String featureMethodName)
{
MethodInfo methodInfo = NOT_FOUND;
if("setup".equalsIgnoreCase(featureMethodName)) {
return currentSpec.getSetupMethod();
}
if("cleanup".equalsIgnoreCase(featureMethodName)) {
return currentSpec.getCleanupMethod();
}
for (FeatureInfo feature : currentSpec.getAllFeatures())
{
MethodInfo featureMethod = feature.getFeatureMethod();
if (featureMethodName.equals(featureMethod.getName()))
{
methodInfo = featureMethod;
break;
}
}
return methodInfo;
}
开发者ID:gabehamilton,项目名称:jmeter-spock-sampler,代码行数:21,代码来源:SpockSpecificationFilter.java
示例2: visitSpecAnnotation
import org.spockframework.runtime.model.FeatureInfo; //导入依赖的package包/类
@Override
public void visitSpecAnnotation(InheritedUnroll unroll, SpecInfo spec) {
spec.getFeatures()
.stream()
.filter(FeatureInfo::isParameterized)
.forEach(feature -> visitFeatureAnnotation(unroll, feature));
}
开发者ID:drmaas,项目名称:ratpack-rx2,代码行数:8,代码来源:InheritedUnrollExtension.java
示例3: visitFeatureAnnotation
import org.spockframework.runtime.model.FeatureInfo; //导入依赖的package包/类
@Override
public void visitFeatureAnnotation(InheritedUnroll unroll, FeatureInfo feature) {
if (feature.isParameterized()) {
feature.setReportIterations(true);
feature.setIterationNameProvider(chooseNameProvider(unroll, feature));
}
}
开发者ID:drmaas,项目名称:ratpack-rx2,代码行数:8,代码来源:InheritedUnrollExtension.java
示例4: chooseNameProvider
import org.spockframework.runtime.model.FeatureInfo; //导入依赖的package包/类
private NameProvider<IterationInfo> chooseNameProvider(InheritedUnroll unroll, FeatureInfo feature) {
if (unroll.value().length() > 0) {
return new UnrollNameProvider(feature, unroll.value());
} else if (feature.getName().contains("#")) {
return new UnrollNameProvider(feature, feature.getName());
} else {
return null;
}
}
开发者ID:drmaas,项目名称:ratpack-rx2,代码行数:10,代码来源:InheritedUnrollExtension.java
示例5: visitSpecAnnotation
import org.spockframework.runtime.model.FeatureInfo; //导入依赖的package包/类
@Override
public void visitSpecAnnotation(InheritedTimeout timeout, SpecInfo spec) {
if (isDebuggerAttached()) {
return;
}
for (FeatureInfo feature : spec.getFeatures()) {
if (!feature.getFeatureMethod().getReflection().isAnnotationPresent(InheritedTimeout.class)) {
visitFeatureAnnotation(timeout, feature);
}
}
}
开发者ID:drmaas,项目名称:ratpack-rx2,代码行数:13,代码来源:InheritedTimeoutExtension.java
示例6: addRunningFeature
import org.spockframework.runtime.model.FeatureInfo; //导入依赖的package包/类
@Override
public void addRunningFeature(FeatureInfo featureInfo) {
SpecInfo specInfo = featureInfo.getSpec();
Specification specFootprint = findSpecFootprint(featureInfo.getSpec());
if (specFootprint != null) {
getRuntimePointerForSpec(specInfo).setFeatureInfo(featureInfo);
specFootprint.addRunningFeature(featureInfo);
}
}
开发者ID:reportportal,项目名称:agent-java-spock,代码行数:10,代码来源:LaunchContextImpl.java
示例7: findIterationFootprints
import org.spockframework.runtime.model.FeatureInfo; //导入依赖的package包/类
@Override
public Iterable<Iteration> findIterationFootprints(FeatureInfo featureInfo) {
Specification specFootprint = findSpecFootprint(featureInfo.getSpec());
if (specFootprint != null) {
return specFootprint.getFeature(featureInfo).getAllTrackedIteration();
}
return null;
}
开发者ID:reportportal,项目名称:agent-java-spock,代码行数:9,代码来源:LaunchContextImpl.java
示例8: getFeature
import org.spockframework.runtime.model.FeatureInfo; //导入依赖的package包/类
private Feature getFeature(final FeatureInfo featureInfo) {
return Iterables.find(getAllTrackedFeatures(), new Predicate<Feature>() {
@Override
public boolean apply(Feature input) {
return input != null && featureInfo.equals(input.featureInfo);
}
});
}
开发者ID:reportportal,项目名称:agent-java-spock,代码行数:9,代码来源:LaunchContextImpl.java
示例9: visitFeatureAnnotation
import org.spockframework.runtime.model.FeatureInfo; //导入依赖的package包/类
@Override
public void visitFeatureAnnotation(FailsWithMessage annotation, FeatureInfo feature) {
feature.getFeatureMethod().addInterceptor(new FailsWithMessageInterceptor(annotation));
}
开发者ID:lxxlxx888,项目名称:Reer,代码行数:5,代码来源:FailsWithMessageExtension.java
示例10: visitFeatureAnnotation
import org.spockframework.runtime.model.FeatureInfo; //导入依赖的package包/类
@Override
public void visitFeatureAnnotation(InheritedTimeout timeout, FeatureInfo feature) {
feature.getFeatureMethod().addInterceptor(new TimeoutInterceptor(adapt(timeout)));
}
开发者ID:drmaas,项目名称:ratpack-rx2,代码行数:5,代码来源:InheritedTimeoutExtension.java
示例11: beforeIteration
import org.spockframework.runtime.model.FeatureInfo; //导入依赖的package包/类
@Override
public void beforeIteration(final IterationInfo iteration) {
final String uuid = testResults.get();
final FeatureInfo feature = iteration.getFeature();
final SpecInfo spec = feature.getSpec();
final List<Parameter> parameters = getParameters(feature.getDataVariables(), iteration.getDataValues());
final SpecInfo subSpec = spec.getSubSpec();
final SpecInfo superSpec = spec.getSuperSpec();
final String packageName = spec.getPackage();
final String specName = spec.getName();
final String testClassName = feature.getDescription().getClassName();
final String testMethodName = iteration.getName();
final List<Label> labels = new ArrayList<>();
labels.addAll(Arrays.asList(
//Packages grouping
new Label().withName("package").withValue(packageName),
new Label().withName("testClass").withValue(testClassName),
new Label().withName("testMethod").withValue(testMethodName),
//xUnit grouping
new Label().withName("suite").withValue(specName),
//Timeline grouping
new Label().withName("host").withValue(getHostName()),
new Label().withName("thread").withValue(getThreadName())
));
if (Objects.nonNull(subSpec)) {
labels.add(new Label().withName("subSuite").withValue(subSpec.getName()));
}
if (Objects.nonNull(superSpec)) {
labels.add(new Label().withName("parentSuite").withValue(superSpec.getName()));
}
labels.addAll(getLabels(iteration));
final TestResult result = new TestResult()
.withUuid(uuid)
.withHistoryId(getHistoryId(getQualifiedName(iteration), parameters))
.withName(firstNonEmpty(
testMethodName,
feature.getDescription().getDisplayName(),
getQualifiedName(iteration)).orElse("Unknown"))
.withFullName(getQualifiedName(iteration))
.withStatusDetails(new StatusDetails()
.withFlaky(isFlaky(iteration))
.withMuted(isMuted(iteration)))
.withParameters(parameters)
.withLinks(getLinks(iteration))
.withLabels(labels);
processDescription(iteration, result);
getLifecycle().scheduleTestCase(result);
getLifecycle().startTestCase(uuid);
}
开发者ID:allure-framework,项目名称:allure-java,代码行数:52,代码来源:AllureSpock.java
示例12: Feature
import org.spockframework.runtime.model.FeatureInfo; //导入依赖的package包/类
Feature(FeatureInfo featureInfo) {
this.featureInfo = featureInfo;
}
开发者ID:reportportal,项目名称:agent-java-spock,代码行数:4,代码来源:LaunchContextImpl.java
示例13: setFeatureInfo
import org.spockframework.runtime.model.FeatureInfo; //导入依赖的package包/类
private void setFeatureInfo(FeatureInfo featureInfo) {
this.featureInfo = featureInfo;
}
开发者ID:reportportal,项目名称:agent-java-spock,代码行数:4,代码来源:LaunchContextImpl.java
示例14: getCurrentFeature
import org.spockframework.runtime.model.FeatureInfo; //导入依赖的package包/类
@Override
public FeatureInfo getCurrentFeature() {
return featureInfo;
}
开发者ID:reportportal,项目名称:agent-java-spock,代码行数:5,代码来源:LaunchContextImpl.java
示例15: BaseSpecRunnerMock
import org.spockframework.runtime.model.FeatureInfo; //导入依赖的package包/类
public BaseSpecRunnerMock() {
supervisor = mock(IRunSupervisor.class);
currentFeature = mock(FeatureInfo.class, RETURNS_DEEP_STUBS);
when(currentFeature.getFeatureMethod().getDescription().toString()).thenReturn(RunFeatureMethodInstrumenterTest.MOCKED_FEATURE_ID);
}
开发者ID:jVoid,项目名称:jVoid,代码行数:6,代码来源:BaseSpecRunnerMock.java
示例16: addRunningFeature
import org.spockframework.runtime.model.FeatureInfo; //导入依赖的package包/类
abstract void addRunningFeature(FeatureInfo featureInfo);
开发者ID:reportportal,项目名称:agent-java-spock,代码行数:2,代码来源:AbstractLaunchContext.java
示例17: findIterationFootprints
import org.spockframework.runtime.model.FeatureInfo; //导入依赖的package包/类
abstract Iterable<? extends NodeFootprint<IterationInfo>> findIterationFootprints(FeatureInfo featureInfo);
开发者ID:reportportal,项目名称:agent-java-spock,代码行数:2,代码来源:AbstractLaunchContext.java
示例18: getCurrentFeature
import org.spockframework.runtime.model.FeatureInfo; //导入依赖的package包/类
FeatureInfo getCurrentFeature();
开发者ID:reportportal,项目名称:agent-java-spock,代码行数:2,代码来源:AbstractLaunchContext.java
注:本文中的org.spockframework.runtime.model.FeatureInfo类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论