org.testng.xml.XmlPackage源码实例Demo

类org.testng.xml.XmlPackage源码实例Demo

下面列出了org.testng.xml.XmlPackage 类实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: dockerfile-image-update   文件: TestStarter.java
/**
 * This will provide a test suite for TestNG which will be based on the package.
 * It delegates any class inspection / reflection to TestNG.
 *
 * @return the XmlSuite for com.salesforce.dockerfileimageupdate.itest.tests.*
 */
private List<XmlSuite> getXmlSuites() {
    XmlSuite suite = new XmlSuite();
    suite.setName("Full Integration Test");
    XmlTest test = new XmlTest(suite);
    test.setName("all-tests");
    XmlRun xmlRun = new XmlRun();
    xmlRun.onInclude(test.getName());
    List<XmlPackage> packages = new ArrayList<>();
    packages.add(new XmlPackage("com.salesforce.dockerfileimageupdate.itest.tests.*"));
    test.setXmlPackages(packages);
    List<XmlSuite> suites = new ArrayList<>();
    suites.add(suite);
    return suites;
}
 
源代码2 项目: AppiumTestDistribution   文件: MyTestExecutor.java
private static List<XmlPackage> getPackages() {
    List<XmlPackage> allPackages = new ArrayList<>();
    XmlPackage eachPackage = new XmlPackage();
    eachPackage.setName("output");
    allPackages.add(eachPackage);
    return allPackages;
}
 
源代码3 项目: qaf   文件: TestRunner.java
private void init(IConfiguration configuration,
                  ISuite suite,
                  XmlTest test,
                  String outputDirectory,
                  IAnnotationFinder annotationFinder,
                  boolean skipFailedInvocationCounts,
                  Collection<IInvokedMethodListener> invokedMethodListeners,
                  List<IClassListener> classListeners)
{
  m_configuration = configuration;
  m_xmlTest= test;
  m_suite = suite;
  m_testName = test.getName();
  m_host = suite.getHost();
  m_testClassesFromXml= test.getXmlClasses();
  m_skipFailedInvocationCounts = skipFailedInvocationCounts;
  setVerbose(test.getVerbose());


  boolean preserveOrder = test.getPreserveOrder();
  m_methodInterceptors = new ArrayList<IMethodInterceptor>();
  builtinInterceptor = preserveOrder ? new PreserveOrderMethodInterceptor() : new InstanceOrderingMethodInterceptor();

  m_packageNamesFromXml= test.getXmlPackages();
  if(null != m_packageNamesFromXml) {
    for(XmlPackage xp: m_packageNamesFromXml) {
      m_testClassesFromXml.addAll(xp.getXmlClasses());
    }
  }

  m_annotationFinder= annotationFinder;
  m_invokedMethodListeners = invokedMethodListeners;
  m_classListeners.clear();
  for (IClassListener classListener : classListeners) {
    m_classListeners.put(classListener.getClass(), classListener);
  }
  m_invoker = new Invoker(m_configuration, this, this, m_suite.getSuiteState(),
      m_skipFailedInvocationCounts, invokedMethodListeners, classListeners);

  if (test.getParallel() != null) {
    log(3, "Running the tests in '" + test.getName() + "' with parallel mode:" + test.getParallel());
  }

  setOutputDirectory(outputDirectory);

  // Finish our initialization
  init();
}
 
如果文章对您有帮助,请点击页面广告。以鼓励作者做出的努力。
 类所在包
 类方法
 同包方法