Skip to content

it-agile ATDD Java example start project for cucumber and selenium with gradle

Notifications You must be signed in to change notification settings

it-agile/de.itagile.acceptance

Repository files navigation

it-agile ATDD Java example start project for cucumber and selenium with gradle

Update webdriver for Selenium

  1. Find out Browser Version
  2. Download suitable WebDriver for Chrome or Firefox
  3. Put the webdriver into src/test/resources
  4. Maybe you need to make the WebDriver-File executable

For Safari you need to find /usr/bin/safaridriver on your mac and execute safaridriver --enable

Using specific webdriver

  • Change the webdriver initialization in WebDriverWrapper.java
    • new ChromeDriver() (using chromedriver)
    • new FirefoxDriver() (using geckodriver)
    • new SafariDriver() (using safaridriver)

Running Cucumber Tests

  • From inside the IDE: RunAllFeatures.java as JUnit-Test
  • From inside the console: ./gradlew or gradlew.bat

Ignoring Cucumber Tests

  • Use the tag @ignore in the feature file, so that a scenario is not executed. You can specifiy your own tags
    • in the build.gradle and
    • in the RunAllFeatures.java

Generating Cucumber Reports

  • Cucumber reports are generated.
  • If a scenario fails, a screenshot of the current webpage is embeded into the report. See in Hooks.java at @After.
  • For changing, if reports should be generated when running from
    • console, look in build.gradle at '--plugin' = 'html:...'
    • within the IDE, look in RunAllFeatures.java at @CucumberOptions

IDE Cucumber Plugins

About

it-agile ATDD Java example start project for cucumber and selenium with gradle

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published