类org.testng.internal.IResultListener源码实例Demo

下面列出了怎么用org.testng.internal.IResultListener的API类实例代码及写法,或者点击链接到github查看源代码。

源代码1 项目: selenium   文件: SeleneseTestNgHelper.java
@BeforeSuite
@Parameters({"selenium.host", "selenium.port"})
public void attachScreenshotListener(@Optional("localhost") String host,
    @Optional("4444") String port, ITestContext context) {
  if (!"localhost".equals(host)) {
    return;
  }
  Selenium screenshotTaker = new DefaultSelenium(host, Integer.parseInt(port),
      "", "");
  TestRunner tr = (TestRunner) context;
  File outputDirectory = new File(context.getOutputDirectory());
  tr.addListener((IResultListener) new ScreenshotListener(outputDirectory,
      screenshotTaker));
}
 
 类所在包
 类方法
 同包方法