Testing with Selenium, Java, TestNG
On this page you will find, in order, the steps to take and things to learn in order to have an efficient, fully functional set of tests with Selenium, Java, TestNG, Maven. These tests are meant for testing webpages.
What is not covered in the steps below: how to install and setup Java, Maven, the IDE.
The prerequisites for creating the test project are:
- Have a working Java version on your machine. (Follow these instructions for installation: http://www.java.com/en/download/help/index_installing.xml)
- Have Maven installed and configured properly. (Follow these instructions for installation: http://maven.apache.org/guides/getting-started/maven-in-five-minutes.html)
- Be connected to a Maven repository, to be able to use external libraries, including Selenium and TestNG (http://search.maven.org/)
- Have a VCS (versioning control system) location to put your code into, so that everyone working on the project can commit code to a single repository. Perforce, Git or SVN will do the trick.
- Have a working IDE installed on your computer. Eclipse (free, get it at http://www.eclipse.org/downloads/) or IntelliJ (free community edition, comes with paid utlimate edition, get it at http://www.jetbrains.com/idea/download/) will do the trick. Make sure you install the VCS, Maven, TestNG plugins for your IDEs.
1.Create and configure the test project.