01: package test.reports;
02:
03: import org.testng.Reporter;
04: import org.testng.annotations.BeforeClass;
05: import org.testng.annotations.DataProvider;
06: import org.testng.annotations.Test;
07:
08: /**
09: * Regression test: if a timeOut is provided, getReporter(testResult) returns
10: * null.
11: *
12: * Created on Sep 21, 2006
13: * @author <a href="mailto:cedric@beust.com">Cedric Beust</a>
14: */
15: public class ReporterSampleTest {
16:
17: @DataProvider(name="dp")
18: public Object[][] createParameters() {
19: return new Object[][] { new Object[] { "param1" },
20: new Object[] { "param2" } };
21: }
22:
23: @Test(dataProvider="dp",timeOut=10000)
24: public void report(String p) {
25: Reporter.log("IN THE REPORTER: " + p);
26: }
27:
28: }
|