Jenkins

How To Generate TestNG Reports In Jenkins?

QAutomation News / By  Piyusha

TestNG is an open-source automated testing framework, where ‘NG’ of TestNG is Next Generation. It is similar to JUnit but designed to be better than JUnit, especially when testing integrated classes. With the help of simple annotations, grouping, sequencing & parametrization, TestNG overcomes most of the older system’s limitations and gives the developer the ability to write more versatile and efficient tests.

In our previous blogs, we have seen how to run tests in TestNG using an XML file, Parameterisation in TestNG, TestNG listeners, and much more. In this blog, we will find out how to generate a TestNG report in Jenkins. This will be particularly useful if you are into Selenium test automation.

Why Use TestNG in the First Place?

TestNG is quite popular among developers and testers for test creation. It offers several practical features like grouping, dependence, prioritization, ease of using multiple annotations, etc. If you are not a fan of TestNG, allow me to introduce you to a few of the several benefits offered by it, especially from Selenium perspective-

  1. It supports annotations.
  2. It has a flexible test configuration, ensuring that the code is multithread safe.
  3. Support for data-driven testing (with @DataProvider).
  4. Support for parameters.
  5. No more need for TestSuite and accompanies a powerful execution model.
  6. Supports a variety of tools and plugins, which include Jenkins, Eclipse, Maven, etc.
  7. Embeds BeanShell for further flexibility.
  8. It is designed to cover tests (almost all): Unit tests, Functional tests, End-to-end tests, Integration tests, etc.
  9. It uses more Java and OO concepts and features.

Continue reading from source link

Categories: Jenkins, qautomation news

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s