APISonar


org.testng.Reporter.log

> org > testng > Reporter > log
org APIs testng APIs Reporter APIs log APIs

Example 1
public void m3(String param) {
  System.out.println("3");
  Reporter.log("M3 WAS CALLED");
 }
Example 2
public void angry() {
    String methodName = Reporter.getCurrentTestResult().getMethod().getMethodName();
    Reporter.log(methodName);
    Assert.assertNotNull(methodName);
  }
Example 3
public void f(String s, int n) {
//    if ("Alois".equals(s)) assert false;
    Reporter.log("CALL " + n);
    ppp("TEST : " + s);
  }
Example 4
protected void logEnv() {
        Properties props = System.getProperties();
        Enumeration<Object> keys = props.keys();
        while (keys.hasMoreElements()) {
            Object key = keys.nextElement();
            Reporter.log((key + " = " + props.get(key)));
        }
    }
Example 5
public void verify(String name) {
    m_testWasRun = true;
    Reporter.log("output from hook test.verify");
  }
Example 6
public void toStringToByteArray() {
		byte[] data = new byte[10];
		for (int i = 0; i < data.length; ++i) {
			data[i] = (byte)(Math.random()*256);
		}

		final String dataString = bit.toByteString(data);
		Reporter.log(dataString);

		final byte[] sdata = bit.fromByteString(dataString);
		Assert.assertEquals(sdata, data);
	}
Example 7
public void test() throws MalformedURLException, InterruptedException {
    DesiredCapabilities ff = DesiredCapabilities.firefox();
    WebDriver driver = null;
    try {
      driver = new RemoteWebDriver(new URL(hubURL + "/grid/driver"), ff);
      driver.get(hubURL + "/grid/console");
      Assert.assertEquals(driver.getTitle(), "Grid overview");
    } finally {
      Reporter.log("driver : " + driver);
      driver.quit();
    }
  }
Example 8
public void onStart (ITestContext testContext) {
        Reporter.log("foo");
        super.onStart(testContext);
    }
Example 9
public void onTestFailure(ITestResult result) {
    Reporter.log("Listener: onTestFailure");
    super.onTestFailure(result);
  }
Example 10
public void onTestSuccess(ITestResult result) {
    Reporter.log("Listener: onTestSuccess");
    super.onTestSuccess(result);
  }
Example 11
public void onTestSkipped(ITestResult result) {
    Reporter.log("Listener: onTestSkipped");
    super.onTestSkipped(result);
  }
Example 12
public static void handleManifestFailure(Manifest man) {
        String ec = GeneralUtils.getValueForTypeFromManifest(man, GeneralUtils.AsadminManifestKeyType.EXIT_CODE);
        if (ec != null && GeneralUtils.FAILURE.equalsIgnoreCase(ec.trim())) {
            //we have a failure
            String cause = GeneralUtils.getValueForTypeFromManifest(man, GeneralUtils.AsadminManifestKeyType.CAUSE);
            Reporter.log("Cause: " + cause);
            throw new RuntimeException("" + cause);
        }        
    }