In the preceding example, there were parameters added at the <test> section level. Parameters can also be added elsewhere, such as at the suite or class levels. These TestNG parameters can be processed using one of the setup or teardown methods and the @Parameters annotation. Any number of parameters can be added, and it's useful for processing system properties or environment variables, default settings, browser or mobile preferences, and so on.
Suite parameters
@Parameters
Let's say you want to run a test suite against a specific browser, platform, and environment, then re-run it on a different browser and platform. Using TestNG's @Parameters allows you to change the settings in the suite XML file and process...