Build Tools - Using maven to run tests

Maven works both as build tool and a dependency management tool.

What that means is you can use maven to do build tasks like compiling the test code, running the functional tests etc and at the same time use it to manage all the dependent jars that are needed for our project.

If you look back into the 1st chapter where we created the current maven project, we had started with a pom.xml which had all the dependencies defined. That helped us to get all the dependent jars for cucumber and all other related jars.

Now we will use the same pom file to create a build task that will run our cucumber tests.

Earlier, in the begining we learned about 2 different ways to run tests.

  • using the cucumber-cli, through edit configuration
  • using the cucumber-junit runner, through the runner class.

Both of these were used to run the tests from the IDE.

The following chapters will try doing the same from command line using a maven build task.

results matching ""

    No results matching ""