with JBehave-core, JBehave-spring, SpringAnnotatedEmbedderRunner.class, fluentSelenium (https://github.com/SeleniumHQ/fluent-selenium) and drivers provider (Selenium WebDriver) for:
- gradle
- JBehave Support plugin for IntelliJ
- JBehave Step Generator for IntelliJ
- chromedriver.exe (put it into project root)- chrome is set as default browser
- geckodriver.exe (put it into project root)- is needed for newer FF versions
- IEDriverServer.exe (put it into project root)- is needed for newer FF versions
- clone repository
- open build.gradle file in IDE (IntelliJ)
- import dependencies with gradle
- add your .story files with scenarios
- create custom steps class / steps classes with @Component and @Autowired annotations for page objects class / classes
- generate steps- in .story file press 'alt+enter' shortcut and choose 'Generate BDD step into class' option into created steps class / steps classes
- create custom page objects classes with methods and with @Component and @Autowired annotations for driver provider
- create assertions classes with methods and @Component annotation
- add created custom steps classes into StepsContext class with @Autowired annotations
- delete example .story files, steps classes, page objects classes and assertion classes
- 'runTests'
- '-Dbrowser=chrome runTests'
- '-Dbrowser=firefox runTests'
- '-Dbrowser=chromeHeadless runTests'
- '-Dbrowser=iexplorer runTests'
- 'clean test'
- 'clean -Dbrowser=chrome test'
- 'clean -Dbrowser=firefox test'
- 'clean -Dbrowser=chromeHeadless test'
- 'clean -Dbrowser=iexplorer test'
- run StoriesRunner class
- or run only method with @Test annotation in StoriesRunner class
Reports are placed in 'reports' directory, including screenshots of failed scenarios. To run report in browser, open 'reports\jbehave\view\reports.html' file and choose browser. To see screenshots locally, go to 'reports\jbehave\screenshots directory
- runTests
- copyStylesForReports
- deleteJBehaveReports