Esempio n. 1
0
 private static void initStepListener() {
   Configuration configuration = Injectors.getInjector().getInstance(Configuration.class);
   File outputDirectory = configuration.getOutputDirectory();
   StepListener listener = new BaseStepListener(outputDirectory, getPages());
   stepListenerThreadLocal.set(listener);
   StepEventBus.getEventBus().registerListener(getStepListener());
 }
Esempio n. 2
0
 /** A test outcome should relate to a particular test class or user story class. */
 protected TestOutcome(final String methodName, final Class<?> testCase, final Story userStory) {
   startTime = System.currentTimeMillis();
   this.methodName = methodName;
   this.testCase = testCase;
   this.additionalIssues = new HashSet<String>();
   this.userStory = userStory;
   this.issueTracking = Injectors.getInjector().getInstance(IssueTracking.class);
 }
Esempio n. 3
0
 public TestOutcome(final String methodName, final Class<?> testCase) {
   startTime = System.currentTimeMillis();
   this.methodName = methodName;
   this.testCase = testCase;
   this.additionalIssues = new HashSet<String>();
   this.issueTracking = Injectors.getInjector().getInstance(IssueTracking.class);
   if (testCase != null) {
     initializeStoryFrom(testCase);
   }
 }
 public WebElementFacadeImpl(
     final WebDriver driver,
     final ElementLocator locator,
     final WebElement webElement,
     final long implicitTimeoutInMilliseconds,
     final long waitForTimeoutInMilliseconds) {
   this.webElement = webElement;
   this.driver = driver;
   this.locator = locator;
   this.webdriverClock = new org.openqa.selenium.support.ui.SystemClock();
   this.sleeper = Sleeper.SYSTEM_SLEEPER;
   this.javascriptExecutorFacade = new JavascriptExecutorFacade(driver);
   this.environmentVariables =
       Injectors.getInjector().getProvider(EnvironmentVariables.class).get();
   this.implicitTimeoutInMilliseconds = implicitTimeoutInMilliseconds;
   this.waitForTimeoutInMilliseconds =
       (waitForTimeoutInMilliseconds >= 0)
           ? waitForTimeoutInMilliseconds
           : defaultWaitForTimeout();
 }
 public EventualConsequence(Consequence<T> consequenceThatMightTakeSomeTime) {
   this(
       consequenceThatMightTakeSomeTime,
       Injectors.getInjector().getInstance(Configuration.class).getElementTimeout() * 1000);
 }
Esempio n. 6
0
 public static TestOutcomes withNoResults() {
   return new TestOutcomes(
       Collections.EMPTY_LIST,
       Injectors.getInjector().getInstance(Configuration.class).getEstimatedAverageStepCount());
 }
Esempio n. 7
0
 public static TestOutcomes of(List<? extends TestOutcome> outcomes) {
   return new TestOutcomes(
       outcomes,
       Injectors.getInjector().getInstance(Configuration.class).getEstimatedAverageStepCount());
 }
 public BuildInfoProvider(EnvironmentVariables environmentVariables) {
   this.environmentVariables = environmentVariables;
   this.driverCapabilityRecord = Injectors.getInjector().getInstance(DriverCapabilityRecord.class);
 }
Esempio n. 9
0
 public PageUrls(final Object pageObject) {
   this(pageObject, Injectors.getInjector().getInstance(Configuration.class));
 }
 public QuietThucydidesLoggingRule() {
   environmentVariables = Injectors.getInjector().getInstance(EnvironmentVariables.class);
   originalValue = environmentVariables.getProperty("thucydides.logging");
   environmentVariables.setProperty("thucydides.logging", "QUIET");
 }
 private static void setupWebdriverManager() {
   setupWebdriverManager(Injectors.getInjector().getInstance(WebdriverManager.class));
 }
Esempio n. 12
0
 private static DependencyInjectorService getDependencyInjectorService() {
   return Injectors.getInjector().getInstance(DependencyInjectorService.class);
 }
Esempio n. 13
0
 private static void setupWebDriverFactory() {
   factoryThreadLocal.set(Injectors.getInjector().getInstance(WebDriverFactory.class));
 }
Esempio n. 14
0
 /** Create a new acceptance test run instance. */
 public StoryTestResults(final Story story) {
   this(
       story,
       Injectors.getInjector().getInstance(Configuration.class),
       Injectors.getInjector().getInstance(IssueTracking.class));
 }
Esempio n. 15
0
 private static HibernateTestStatisticsProvider defaultTestStatisticsProvider() {
   return Injectors.getInjector().getInstance(HibernateTestStatisticsProvider.class);
 }
 protected AbstractRequirementsTagProvider(EnvironmentVariables environmentVariables) {
   this.environmentVariables = environmentVariables;
   this.requirementsConfiguration = new RequirementsConfiguration(environmentVariables);
   this.requirementsService = Injectors.getInjector().getInstance(RequirementsService.class);
   this.rootDirectory = getDefaultRootDirectory();
 }
 public AnnotationBasedTagProvider() {
   this(Injectors.getInjector().getInstance(EnvironmentVariables.class));
 }