本文整理汇总了Java中cucumber.runtime.model.CucumberTagStatement类的典型用法代码示例。如果您正苦于以下问题:Java CucumberTagStatement类的具体用法?Java CucumberTagStatement怎么用?Java CucumberTagStatement使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
CucumberTagStatement类属于cucumber.runtime.model包,在下文中一共展示了CucumberTagStatement类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: filterOnTags
import cucumber.runtime.model.CucumberTagStatement; //导入依赖的package包/类
private static void filterOnTags(CucumberFeature feature) throws TagFilterException {
final List<CucumberTagStatement> featureElements = feature.getFeatureElements();
ServiceLoader<TagFilter> loader = ServiceLoader.load(TagFilter.class);
for (Iterator<CucumberTagStatement> iterator = featureElements.iterator(); iterator.hasNext();) {
CucumberTagStatement cucumberTagStatement = iterator.next();
for (TagFilter implClass : loader) {
logger.info("Tag filter found: {}", implClass.getClass().getSimpleName());
final boolean isFiltered = implClass.filter(feature, cucumberTagStatement);
if (isFiltered) {
logger.info("skipping feature element {} of feature {} due to feature-tag-filter {} ",
cucumberTagStatement.getVisualName(),
feature.getPath(), implClass.getClass().getSimpleName());
iterator.remove();
break;
}
}
}
}
开发者ID:intuit,项目名称:karate,代码行数:19,代码来源:CucumberRunner.java
示例2: setFeatures
import cucumber.runtime.model.CucumberTagStatement; //导入依赖的package包/类
public static void setFeatures(List<CucumberFeature> cucumberFeatures) {
int numberOfScenarios = 0;
for (CucumberFeature feature : cucumberFeatures) {
for (CucumberTagStatement scenario : feature.getFeatureElements()) {
if (scenario instanceof CucumberScenario) {
numberOfScenarios++;
} else if (scenario instanceof CucumberScenarioOutline) {
for (CucumberExamples examples : ((CucumberScenarioOutline) scenario).getCucumberExamplesList()) {
numberOfScenarios += examples.getExamples().getRows().size() - 1;
}
}
}
}
ExecutionProgress currentContextProgress = getCurrent().getProgress();
currentContextProgress.setNumberOfFeatures(cucumberFeatures.size());
currentContextProgress.setNumberOfScenarios(numberOfScenarios);
}
开发者ID:viltgroup,项目名称:minium,代码行数:18,代码来源:CucumberContext.java
示例3: filter
import cucumber.runtime.model.CucumberTagStatement; //导入依赖的package包/类
@Override
public boolean filter(CucumberFeature feature, CucumberTagStatement cucumberTagStatement) throws TagFilterException {
String path = feature.getPath();
if(path.endsWith(TAG_FILTER_FEATURE)) {
throw new TagFilterException("Feature: "+TAG_FILTER_FEATURE+" failed due to tag filtering");
}
return false;
}
开发者ID:intuit,项目名称:karate,代码行数:9,代码来源:TagFilterTestImpl.java
示例4: addFeatureElements
import cucumber.runtime.model.CucumberTagStatement; //导入依赖的package包/类
private void addFeatureElements(CucumberFeature feature) {
for (CucumberTagStatement tagStatement : feature.getFeatureElements()) {
if (tagStatement instanceof CucumberScenarioOutline)
addScenarioOutline((CucumberScenarioOutline) tagStatement);
else if (tagStatement instanceof CucumberScenario)
addScenario((CucumberScenario) tagStatement);
}
}
开发者ID:djb61,项目名称:parallel-cucumber-jvm,代码行数:9,代码来源:RerunFileBuilder.java
示例5: RestExecutionUnitRunner
import cucumber.runtime.model.CucumberTagStatement; //导入依赖的package包/类
public RestExecutionUnitRunner(RestRuntime runtime,
CucumberTagStatement cucumberScenario, RestJUnitReporter jUnitReporter,
CucumberFeature cucumberFeature) throws InitializationError {
super(runtime.getRuntime(), (CucumberScenario) cucumberScenario, jUnitReporter);
this.runtime = Validate.notNull(runtime);
this.cucumberFeature = Validate.notNull(cucumberFeature);
}
开发者ID:LiamHayes1,项目名称:rest-cucumber,代码行数:8,代码来源:RestExecutionUnitRunner.java
示例6: convert
import cucumber.runtime.model.CucumberTagStatement; //导入依赖的package包/类
public Feature convert(CucumberFeature cucumberFeature) {
Feature feature = new Feature(cucumberFeature.getUri());
for (CucumberTagStatement featureElement : cucumberFeature.getFeatureElements()) {
if (featureElement instanceof CucumberScenario) {
feature.add(convert((CucumberScenario) featureElement));
} else if (featureElement instanceof CucumberScenarioOutline) {
feature.add(convert((CucumberScenarioOutline) featureElement));
}
}
return feature;
}
开发者ID:Arnauld,项目名称:cucumber-contrib,代码行数:12,代码来源:CucumberConverter.java
示例7: filter
import cucumber.runtime.model.CucumberTagStatement; //导入依赖的package包/类
/**
* Method to be over-ridden to evaluate if a feature/scenario
* should be skipped for execution
*
* @param feature
* @param cucumberTagStatement
* @return true - indicates feature should be skipped from
* execution, otherwise false
* @throws TagFilterException - when thrown, stops
* execution of all features
*/
boolean filter(CucumberFeature feature, CucumberTagStatement cucumberTagStatement) throws TagFilterException;
开发者ID:intuit,项目名称:karate,代码行数:13,代码来源:TagFilter.java
注:本文中的cucumber.runtime.model.CucumberTagStatement类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论