This project basically provides an archetype/skeleton for working with Selenium,JUnit TestNG and ReportNG. You can use it for new projects or previous projects.
This project can be run from command line or from an IDE,as per your choice.
If you want to run your proejct from command line you would need to setup one of the following build tools. This project currently supports Maven and Gradle for build and running. I presonally prefer gradle as it generate aesthetic reports for JUnit test cases.
Gradle : http://www.gradle.org/installation
Maven : http://maven.apache.org/download.cgi#Installation
Follow the following steps to generatre repots of your test cases:
- Place your scripts (old or new) in the following directory "src\test\java" with appropriate package structure.
- Open shell and navigate to project root.
- Run the test cases with following command. You can use Maven or Gradle as per your choice.
- For Gradle : gradle test
- For Maven : mvn test
- After the test run is complete your reports would be present at the following location:
- For Gradle : "build/reports/tests"
- For Maven : "target"
- Enjoy !
You can convert this project to open it in IDE of your choice. For converting your maven project to IDE run the following command on project root folder.
-
For IntelliJ IDEA use "mvn idea:idea".
-
For Eclipse use "mvn eclipse:eclipse".
You would need maven for above task.
Waleed Bin Dawood ([email protected])