net.thucydides.junit.pipeline.TestPipeline Maven / Gradle / Ivy
package net.thucydides.junit.pipeline;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.Lists;
import com.google.inject.Injector;
import net.thucydides.core.Thucydides;
import net.thucydides.core.annotations.Fields;
import net.thucydides.core.annotations.Managed;
import net.thucydides.core.annotations.ManagedPages;
import net.thucydides.core.guice.Injectors;
import net.thucydides.core.pages.Pages;
import net.thucydides.core.steps.FilePathParser;
import net.thucydides.core.util.EnvironmentVariables;
import net.thucydides.junit.pipeline.converters.TypeConverter;
import net.thucydides.junit.pipeline.converters.TypeConverters;
import org.junit.Test;
import org.openqa.selenium.WebDriver;
import java.io.IOException;
import java.lang.annotation.Annotation;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.Map;
import java.util.Set;
public class TestPipeline {
private final static Object[] NO_ARGS = new Object[0];
private final FilePathParser filePathParser;
List pipelines = Lists.newArrayList();
public TestPipeline() {
filePathParser = new FilePathParser(Injectors.getInjector().getInstance(EnvironmentVariables.class));
}
@Managed
protected WebDriver webDriver;
@ManagedPages
protected Pages pages;
protected int number = 0;
@Test
public void pipeline(){
initializePipelines();
for (Method stageMethod : getStagedMethods()) {
for (TestPipeline pipeline: pipelines) {
execute(stageMethod).inPipeline(pipeline);
}
}
}
protected List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy