Tag Archives: TestNG

Maven – A simple Maven project

I would like to setup the TestNG in Maven so i take this chance to revise the Maven basics.

1. The project should have the following folder structure.

- testng-example (project root folder)
  - src
    - main
      - java
        - info/ykyuen/eureka <folders for package name>
          - Addition.java
      - resources
        - <any resource files like .properties>
  - pom.xml

Continue reading Maven – A simple Maven project

Selenium – Integrate the Selenium Tests into Maven Build

In this article, i will show you how to integrate the Selenium tests into a Maven webapp project using the selenium-maven-plugin and cargo-maven2-plugin.

In this example, i used JUnit as the testing framework. There is no problem if you use TestNG to replace JUnit. This example is a simple Java webapp Maven project which only shows a simple html page (index.jsp). During the build, a Selenium Server is started with the webapp deployed in the Embedded Jetty. It then runs an Unit Test (Selenium Test) during the Maven integration-test life cycle. Here comes to the code.
Continue reading Selenium – Integrate the Selenium Tests into Maven Build