1 package org.testng; 2 3 import org.testng.xml.XmlSuite; 4 5 import java.util.List; 6 7 /** 8 * Implementations of this interface will gain access to the {@link XmlSuite} object and thus let users be able to 9 * alter a suite or a test based on their own needs. 10 * This listener can be added ONLY via the following two ways : 11 * <ol> 12 * <li><<code>listeners</code>> tag in a suite file.</li> 13 * <li>via Service loaders</li> 14 * </ol> 15 * <p/> 16 * <b>Note: </b>This listener <b><u>will NOT be invoked</u></b> if it is wired in via the @<code>Listeners</code> 17 * annotation. 18 */ 19 public interface IAlterSuiteListener extends ITestNGListener { 20 /** 21 * @param suites - The list of {@link XmlSuite}s that are part of the current execution. 22 */ alter(List<XmlSuite> suites)23 void alter(List<XmlSuite> suites); 24 25 } 26