O'Reilly logo

Next Generation Java™ Testing: TestNG and Advanced Concepts by Hani Suleiman, Cédric Beust

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Appendix C. testng.xml

testng.xml is an XML file that describes the runtime definition of a test suite. While its syntax is fairly simple (the DTD is less than 150 lines, most of them comments), it can describe complex test definitions while still remaining legible and easy to edit. In this appendix, we’ll examine the structure of this file in detail, and we’ll show how changing certain parameters affects how tests are run.

TestNG enforces a strict separation between the static model (the business logic of your tests) and its runtime (which tests get run). For example, you should be able to run front-end tests and then back-end tests without having to recompile anything in the code base in between.

TestNG offers the following mechanisms to enforce ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required