How would I use Response interface?
Reporting
● Mvn Verify will run tests even if it fails (it ignores the failure)
○ Waits for all the test to finish
○ It ignores failure b.c we have this in our build configuration
<testFailureIgnore>true</testFailureIgnore>
○ Verify is a Maven lifecycle that comes after test
● Mvn test will stop running the test if something fails
● The original html report we get is not that great, we need statistical data
● Ex; "html:target/cucumber-report" → Like how many test are pass/failing percentages
● We going to use Cucumber Sandwich (this is a dependency file in pom xml) for more statistical data reporting
● In cukesrunner add; "json:target/cucumber.json"
○ It's a html report from a JSON file → How this report works is the Json file is used to generate the report
○ Version 3.15 (from the vid)
○ Add a new build xml in pom (its already in your pom file, the one called TestProject)
■ You will only get this json reporting(cucumber report with graphs and statistics. This report will
be only local for YOU to see, not for Jenkins) ONLY if you execute MVN Verify
■ BUT YOU WILL ALWAYS GET A JSON FILE(different from cucumber report) AFTER RUNNING
THE TEST, EVEN W.O VERIFY
● This JSON file is very important for Jenkins - for the cucumber report plugin
● TestProject build:
○ <id>execution</id>
○ <phase>verify</phase> - this is why html (json) report will only generate when using verify
○ <goals>
○ <goal>generate</goal> </goals>
○ The report will also give you a json file
○ To run tests using verify, right click pom file and click on maven build…
■ You can also add parameters (like runner variable and value which is the xml file) - Type in goals: verify
● To run this in the command line
○ Go to location of pom file and type mvn verify
○ Syntax is mvn<lifecycle/goal>
● Order of Execution using mvn verify
1. Run against the pom file
2. Pom file runs the xml file
3. Xml runs the cukesrunner file
4. Cukesrunner runs the cucumber feature file/test
● Does json cucumber report show screenshot?