Posts

Showing posts with the label Cucumber

Serenity Maven Cucumber - Only run specific scenarios

Image
Problem: While using the serenity cucumber framework with maven run only specific scenarios or feature files Solution:  To run only individual feature, run a specific tag say @wip Work In Progress tag @wip mvn verify -Dcucumber.options="--tags @wip" mvn  verify  -Dcucumber.options="--tags @wip @debug2" More -DCucumber.options here:  http://cucumber.github.io/api/cucumber/jvm/javadoc/cucumber/api/CucumberOptions.html#tags-- You can also do this by creating test runner class for each .feature file: @RunWith (CucumberWithSerenity. class ) @CucumberOptions ( features = "src/test/resources/features/search/search_by_keyword.feature" ) public class SearchByKeyword { } Triggering this as any other test class, would execute only the  SearchByKeyword .feature.

Complete list of Serenity properties

Image
The Serenity Reference Manual: http://thucydides.info/docs/serenity-staging/ Serenity properties Absolute path of the property file where Serenity system property defaults are defined. Defaults to ~/serenity.properties webdriver.driver What browser do you want your tests to run in, for example firefox, chrome, phantomjs or iexplorer. You can also use the  driver  property as a shortcut. webdriver.provided_type If using a provided driver, what type is it. The implementation class needs to be defined in the webdriver.provided.{type} system property. webdriver.base.url The default starting URL for the application, and base URL for relative paths. webdriver.remote.url The URL to be used for remote drivers (including a selenium grid hub or SauceLabs URL) phantomjs.webdriver.port What port to run PhantomJS on (used in conjunction with webdriver.remote.url to register with a Selenium hub, e.g. -Dphantomjs.webdriver=5555 -Dwebdriver.remote.url=http://loca...

Intellij Musing - Test Automation framework with Selenium Cucumber TestNG Maven Jenkins and GIT

Image
Pull the project from the scm repository in my case Git In IntelliJ File -> New -> Project from existing sources and navigate to the root directory Choose Import from external mode - Maven/Eclipse as need be  Update the pom.xml Maven clean run / Generate source and Update Folders Options to run: Right click and run the individual feature file Right click and run the TestNG.xml file - To run tests in parallel Right click and run the individual cucumber runner file - To run tagged tests Reports: Cucumber pretty format - Index.html Cucumber JSON report Customized html report

Intellij: javac: source release 1.7 requires target release 1.7

Image
Problem: javac: source release 1.7 requires target release 1.7 Solution: In IntelliJ 13 and 14, check the Settings > Compiler > Java Compiler UI to ensure you're not targeting a different bytecode version in your module. Happy BDDing :P