本文整理汇总了Java中org.testng.ISuite.getParameter方法的典型用法代码示例。如果您正苦于以下问题:Java ISuite.getParameter方法的具体用法?Java ISuite.getParameter怎么用?Java ISuite.getParameter使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.testng.ISuite
的用法示例。
在下文中一共展示了ISuite.getParameter方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onStart
import org.testng.ISuite; //导入方法依赖的package包/类
@Override
public void onStart(ISuite suite) {
String healthCheckClass = Configuration.get(Parameter.HEALTH_CHECK_CLASS);
if (suite.getParameter(Parameter.HEALTH_CHECK_CLASS.getKey()) != null) {
// redefine by suite arguments as they have higher priority
healthCheckClass = suite.getParameter(Parameter.HEALTH_CHECK_CLASS.getKey());
}
String healthCheckMethods = Configuration.get(Parameter.HEALTH_CHECK_METHODS);
if (suite.getParameter(Parameter.HEALTH_CHECK_METHODS.getKey()) != null) {
// redefine by suite arguments as they have higher priority
healthCheckMethods = suite.getParameter(Parameter.HEALTH_CHECK_METHODS.getKey());
}
String[] healthCheckMethodsArray = null;
if (!healthCheckMethods.isEmpty()) {
healthCheckMethodsArray = healthCheckMethods.split(",");
}
checkHealth(suite, healthCheckClass, healthCheckMethodsArray);
}
示例2: onStart
import org.testng.ISuite; //导入方法依赖的package包/类
@Override
public void onStart(ISuite iSuite) {
String logLevel = iSuite.getParameter(LOG_LEVEL_PARAM_NAME);
if (StringUtils.isNotEmpty(logLevel)) {
LogUtil.configureLogLevel(logLevel);
}
}
示例3: getOwner
import org.testng.ISuite; //导入方法依赖的package包/类
@Override
public String getOwner(ISuite suite)
{
String owner = suite.getParameter("suiteOwner");
return owner != null ? owner : "";
}