Skip to content

Latest commit

 

History

History
38 lines (31 loc) · 2.21 KB

README.md

File metadata and controls

38 lines (31 loc) · 2.21 KB

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