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 ...