maven run code example
Example 1: what is pom.xml
- pom.xml file allows us to add, remove, manage dependencies
and versions from one single location.
- POM stands for project object model
- .xml -> stands for: extensible markup language
Example 2: maven vs runner
What is the different between running a test from maven
and cucumber test runner class?
In my project I use cucumber + Junit. to generate reports,
I use maven-cucumber-reporting.
This report is only generated when I run my test as a maven
lifecycle verify. Becuase this is how it works according to
its configuration.
So if I run my test from runner file, it does not trigger
the maven lifecycle. It only runs that test. In order to
run any maven lifecycle we have to run as a maven command
which starts with 'mvn'.