Java Java TestNG

Java TestNG

Catalog: Java
Short name: TestNG
Course start date: 2023-02-19
Paystack

Description

TestNG is a testing framework developed in the lines of JUnit and NUnit. TestNG is designed to cover all categories of tests: unit, functional, end-to-end, integration, etc., and it requires JDK 5 or higher. This course provides a good understanding on TestNG framework needed to test an enterprise level application to deliver it with robustness and reliability.


TestNG is a testing framework inspired with some new functionalities that make it more powerful and easier to use, such as:


Annotations.

Run your tests in arbitrarily big thread pools with various policies available (all methods in their own thread, one thread per test class, etc…).

Test that your code is multithread safe.

Flexible test configuration.

Support for data-driven testing (with @DataProvider).

Support for parameters.

Powerful execution model (no more TestSuite).

Supported by a variety of tools and plug-ins (Eclipse, IDEA, Maven, etc…).

Embeds BeanShell for further flexibility.

Default JDK functions for runtime and logging (no dependencies).

Dependent methods for application server testing.

TestNG is distributed as a single JAR file, which must be available in the classpath in order to execute tests. It integrates very well with the most popular build tools: Ant, Maven (via Maven Surefire Plugin) and Gradle. TestNG is also supported by all major IDEs (in some cases the installation of additional plugin is required), can be used with different JVM languages (e.g. Java, Groovy, Scala) and cooperates with many quality and testing tools (e.g. code coverage tools, mocking libraries, matchers libraries). Some popular solutions – e.g. Spring Framework – provide means to facilitate testing with TestNG.


Data Provider


A data provider in TestNG is a method in a test class, which provides an array of varied actual values to dependent test methods.


Tool Support


TestNG is supported, out-of-the-box or via plug-ins, by each of the three major Java IDEs – Eclipse, IntelliJ IDEA, and NetBeans. It also comes with a custom task for Apache Ant and is supported by the Maven build system. The Hudson continuous integration server has built-in support for TestNG and is able to track and chart test results over time. Most Java code coverage tools, such as Cobertura, work seamlessly with TestNG.


Reporting


TestNG generates test reports in HTML and XML formats. The XML output can be transformed by the Ant JUnitReport task to generate reports similar to those obtained when using JUnit. Since version 4.6, TestNG also provides a reporter API that permits third-party report generators, such as ReportNG, PDFngreport and TestNG-XSLT, to be used.

(Duration:- 2h)

Sections

General
0 activities

What is TestNG
Features of TestNG
Example- Creating TestNG Class
Example- Cresting TestNG Class- Employee Details
Example- Running & Analyzing the details
TestNG Annotations example
TestNg Dependency Test
TestNG Exception test
TestNG test suites part 1
TestNG test suites part 2
TestNG executing groups - part 1
TestNG executing groups - part 2
TestNG Ignore test example
Parameter test using data providers
Parameter test using testing
Course Certificate

Secure Video
15
Certificate
1
Cost: 5000