@Override public String getOwner(ISuite suite) { String owner = suite.getParameter("suiteOwner"); LOGGER.debug("owner: " + owner); return owner != null ? owner : ""; }
default int getQTestProjectId(ITestContext context) { String id = context.getSuite().getParameter(SpecialKeywords.QTEST_PROJECT_ID); if (id != null) { return Integer.valueOf(id.trim()); } else { return -1; } }
public static String getSuiteOwner(ITestContext context) { String owner = context.getSuite().getParameter("suiteOwner"); if (owner == null) { owner = ""; } return owner; } }
default int getTestRailSuiteId(ITestContext context) { String id = context.getSuite().getParameter(SpecialKeywords.TESTRAIL_SUITE_ID); if (id != null) { return Integer.valueOf(id.trim()); } else { return -1; } }
private static String getSuitePriority(ITestContext context) { String priority = context.getSuite().getParameter("suitePriority"); LOGGER.debug("suitePriority is: " + priority); if (priority == null) { priority = ""; } return priority; }
default int getQTestProjectId(ITestContext context) { String id = context.getSuite().getParameter(SpecialKeywords.QTEST_PROJECT_ID); if (id != null) { return Integer.valueOf(id.trim()); } else { return -1; } }
@SuppressWarnings("unchecked") public Object get(Configuration config, ISuite suiteConfig) { return this.canOverride && suiteConfig.getParameter(this.configName) != null ? suiteConfig.getParameter(this.configName) : config.get(getDefaultClassValue(), this.configName, this.defaultValue); }
default int getTestRailProjectId(ITestContext context) { String id = context.getSuite().getParameter(SpecialKeywords.TESTRAIL_PROJECT_ID); if (id != null) { return Integer.valueOf(id.trim()); } else { return -1; } }
@Override public void onStart(ISuite iSuite) { String logLevel = iSuite.getParameter(LOG_LEVEL_PARAM_NAME); if (StringUtils.isNotEmpty(logLevel)) { LogUtil.configureLogLevel(logLevel); } }
public static String getSuiteOwner(ITestContext context) { String owner = context.getSuite().getParameter("suiteOwner"); if (owner == null) { owner = ""; } return owner; } }
private static String getSuitePriority(ITestContext context) { String priority = context.getSuite().getParameter("suitePriority"); LOGGER.debug("suitePriority is: " + priority); if (priority == null) { priority = ""; } return priority; }
default int getTestRailSuiteId(ITestContext context) { String id = context.getSuite().getParameter(SpecialKeywords.TESTRAIL_SUITE_ID); if (id != null) { return Integer.valueOf(id.trim()); } else { return -1; } }
default int getTestRailProjectId(ITestContext context) { String id = context.getSuite().getParameter(SpecialKeywords.TESTRAIL_PROJECT_ID); if (id != null) { return Integer.valueOf(id.trim()); } else { return -1; } }
@SuppressWarnings("unchecked") public Object get(Configuration config, ISuite suiteConfig) { return this.canOverride && suiteConfig.getParameter(this.configName) != null ? suiteConfig.getParameter(this.configName) : config.get(getDefaultClassValue(), this.configName, this.defaultValue); }
@Override public void onStart(ISuite iSuite) { String logLevel = iSuite.getParameter(LOG_LEVEL_PARAM_NAME); if (StringUtils.isNotEmpty(logLevel)) { LogUtil.configureLogLevel(logLevel); } }
/** * * @param iTestContext * @return run mode corresponding to the given test context */ private static String setRunMode(final ITestContext iTestContext){ String runMode; if (System.getProperty(SeleniumTestsContext.RUN_MODE) != null) { runMode = System.getProperty(SeleniumTestsContext.RUN_MODE); } else if (iTestContext.getSuite().getParameter(SeleniumTestsContext.RUN_MODE) != null) { runMode = iTestContext.getSuite().getParameter(SeleniumTestsContext.RUN_MODE); } else { runMode = "LOCAL"; } return runMode; }
private boolean isWiremockTest(ITestContext iTestContext, String wmTestsParamName) { boolean isWiremockTest = false; String wiremockTests = iTestContext.getSuite().getParameter(wmTestsParamName); if (wiremockTests != null && !"".equals(wiremockTests)) { List<String> wmTests = Arrays.asList(wiremockTests.split(",")); wmTests = wmTests.stream().map(t -> t.trim()).collect(Collectors.toList()); String currentTest = iTestContext.getCurrentXmlTest().getName(); isWiremockTest = wmTests.contains(currentTest); } return isWiremockTest; }
/** * Get TestNG suite parameter from testng.xml. Return System value for CI job. * * @param key name of the parameter * * @return value of the parameter */ public String getSuiteParameter(final String key) { if (System.getProperty(key) != null) { return System.getProperty(key); } else { return getTestNGContext().getSuite().getParameter(key); } }
/** * Get TestNG suite parameter from testng.xml. Return System value for CI job. * * @param key * * @return */ public String getSuiteParameter(final String key) { if (System.getProperty(key) != null) { return System.getProperty(key); } else { return getTestNGContext().getSuite().getParameter(key); } }
public void onStart(ISuite suite) { mailerConfigurator = MailerConfigurator.getInstance(); // getting recipients from testng suite xml as a parameter ArrayList<String> suiteRecipients = mailerConfigurator.readRecipients(suite.getParameter("recipients")); if (suiteRecipients != null && suiteRecipients.size()>0) mailerConfigurator.setSuiteRecipients(suiteRecipients); if (mailerConfigurator.getAutoMail()) session = getSession(); }