TestNG Introduction
TestNG is a testing framework
designed to simplify a broad range of testing needs, from unit testing to
integration testing, which is inspired
by Junit and Nunit, but TestNG has more number of annotations than other
frameworks.
TestNG is designed to cover all
categories of tests: unit, functional, end-to-end, integration, etc...
It is a Three Step Process
- Write
the business logic of your test and insert TestNG annotations in your
code.
- Add
the information about your test (e.g. the class name, the groups you wish
to run, etc...) in a
atestng.xml file or in build.xml.
- Run
TestNG
New Functionalities
in TestNG
- Run
your tests in arbitrarily big thread pools with various policies available
(all methods in their own thread, one thread per test class, etc...).
·
Annotations.
- 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.
Comments
Post a Comment