/** * Log the passed string to the HTML reports * @param s The message to log */ public static void log(String s) { log(s, getCurrentTestResult()); }
/** * Log the passed string to the HTML reports. If logToStandardOut * is true, the string will also be printed on standard out. * * @param s The message to log * @param logToStandardOut Whether to print this string on standard * out too */ public static void log(String s, boolean logToStandardOut) { log(s, getCurrentTestResult()); if (logToStandardOut) { System.out.println(s); } } /**
/** * Log the passed string to the HTML reports if the current verbosity * is equal or greater than the one passed in parameter * * @param s The message to log * @param level The verbosity of this message */ public static void log(String s, int level) { if (TestRunner.getVerbose() >= level) { log(s, getCurrentTestResult()); } }
/** * Log the passed string to the HTML reports if the current verbosity * is equal or greater than the one passed in parameter. If logToStandardOut * is true, the string will also be printed on standard out. * * @param s The message to log * @param level The verbosity of this message * @param logToStandardOut Whether to print this string on standard * out too */ public static void log(String s, int level, boolean logToStandardOut) { if (TestRunner.getVerbose() >= level) { log(s, getCurrentTestResult()); if (logToStandardOut) { System.out.println(s); } } }
@Test(dataProvider = "dp", timeOut = 10000) public void report(String p) { Reporter.log("IN THE REPORTER: " + p); } }
@Test public void testMethod() { Reporter.log("bar"); // This line is required. Else the log that was triggered from onStart() would never be // persisted at all. } }
@Test(groups = "Uncached") public void dataSuccessfullyReceivedFromWhapi() { Reporter.log("Uncached"); } }
@Test public void test() { Reporter.log(Integer.toString(num)); Assert.assertTrue(num > 0); } }
@Test public void aa() { Reporter.log(Long.toString(Thread.currentThread().getId())); } }
@Test public void a() { Reporter.log(Long.toString(Thread.currentThread().getId())); } }
@Override public void onTestFailure(ITestResult result) { Reporter.log("Listener: onTestFailure"); super.onTestFailure(result); }
@Test public void testMethod() { Reporter.log(toString()); Assert.assertNotNull(this.name); }
@Priority(3) @Test(description = "Test Multiple Day Absence Request flow", groups = "Test") public void Test3() { Reporter.log(getClass().getName() + ".Test3", true); }
@Test public void test() { Reporter.log(getFlag()); } }
@Priority(4) @Test(description = "Test Multiple Day Absence Request flow", groups = "Test") public void Test1() { Reporter.log(getClass().getName() + ".Test1", true); }
@Override public void onTestSuccess(ITestResult result) { Reporter.log("Listener: onTestSuccess"); super.onTestSuccess(result); }
@Override public void onTestSkipped(ITestResult result) { Reporter.log("Listener: onTestSkipped"); super.onTestSkipped(result); } }
@Parameters(value = "param") @Test (groups = {"g2"}) public void m3(String param) { System.out.println("3"); Reporter.log("M3 WAS CALLED"); } }
@Test(dataProvider="dp") public void f(String s, int n) { // if ("Alois".equals(s)) assert false; Reporter.log("CALL " + n); ppp("TEST : " + s); }
@Test public void birds() { String methodName = Reporter.getCurrentTestResult().getMethod().getMethodName(); Reporter.log(methodName); Assert.assertNotNull(methodName); }