(Using BDD approach, build a small automation framework)
- Search for a valid post code (should_be_able_to_search_a_postcode_and_see_weather_details)
- Valid all the manditory field (should_be_able_to_search_a_postcode_and_see_weather_details)
- Valid all the optional field (should_be_able_to_search_a_postcode_and_see_weather_details)
- Search Non existing post code (should_be_able_to_see_error_message_for_invalid_postcode)
- Search invalid post code (should_be_able_to_see_error_message_for_non_existing_postcode)
This project is test automation of Weather Cherker app ("https://serene-mountain-14043.herokuapp.com") using serenity automation framework with Screen Play Design Pattern
Clone the repo Make sure you have maven
$ geckodriver &
$ mvn clean verify
This will enable us to run automation in CI tools like Jenkins , GO .
Install Phantomjs
$ brew install phantomjs
Run following command
$ mvn clean -Dwebdriver.driver=phantomjs verify
After running the test serenity reports will be generated at following location
<ProjectDir>/target/site/serenity/index.html
Q : Suppose you want to run some of these test in a development pipeline thats independent from the backend pipeline. Explain how you could approach this:
- What techniques,framework or tools you might thing using
- How you would go abount integrating this framework with a CI pipeline.
- To run few of the test in development pipeline one can use following approach
- cucumber supports tags e.g. “@SmokeTests" can be associated with a scenario in feature file
- Junit tags e.g. @WithTag("SmokeTests") can be associate to junit test.
- As I have already used maven we can trigger above annoted test cases from command line arguments of junit or cucumber tags can be used
- Cucumber : -Dcucumber.options="--tags @SmokeTests"
- Junit : -Dtags="color:blue"
- And then one can trigger above test with command line arguments with maven on CI [Jenkins add a downstream job/ pipleline step ]
- mvn clean verify -Dtags="color:blue"