Home | History | Annotate | Download | only in reports
      1 package test.reports;
      2 
      3 import org.testng.Reporter;
      4 import org.testng.annotations.DataProvider;
      5 import org.testng.annotations.Test;
      6 
      7 /**
      8  * Regression test:  if a timeOut is provided, getReporter(testResult) returns
      9  * null.
     10  *
     11  * Created on Sep 21, 2006
     12  * @author <a href="mailto:cedric (at) beust.com">Cedric Beust</a>
     13  */
     14 public class ReporterSampleTest {
     15 
     16   @DataProvider(name = "dp")
     17   public Object[][] createParameters() {
     18     return new Object[][] {
     19         new Object[] { "param1"},
     20         new Object[] {"param2"}
     21     };
     22   }
     23 
     24   @Test(dataProvider = "dp", timeOut = 10000)
     25   public void report(String p) {
     26     Reporter.log("IN THE REPORTER: " + p);
     27   }
     28 
     29 }
     30