GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing testng.org — Altering suites (or) tests Table of Contents
Altering suites (or) testsSometimes you may need to just want to alter a suite (or) a test tag in a suite xml in runtime without having to change the contents of a suite file. A classic example for this would be to try and leverage your existing suite file and try using it for simulating a load test on your "Application under test". At the minimum you would end up duplicating the contents of your <test> tag multiple times and create a new suite xml file and work with. But this doesn’t seem to scale a lot. TestNG allows you to alter a suite (or) a test tag in your suite xml file at runtime via listeners. You achieve this by providing a listener that implements {javadocs-base-url}/org/testng/IAlterSuiteListener.html[IAlterSuiteListener]. Please refer to Listeners section to learn about listeners. Here is an example that shows how the suite name is getting altered in runtime:
This listener can only be added with either of the following ways:
This listener cannot be added to execution using the |
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |