【问题标题】:Running remote selenium tests throws error: '[testng] Unknown option: -sourcedir'运行远程 selenium 测试会引发错误:'[testng] Unknown option: -sourcedir'
【发布时间】:2011-11-16 09:37:37
【问题描述】:

我有一个虚拟机集群(所有 Windows 7),我试图用它来运行来自 Jenkins 的一些持续集成。这些测试是用 Java 编写的,在我的本地环境(Windows 7)中,我可以远程连接到 VM 并毫无问题地运行我的测试。

当我安排测试在 Jenkins 中运行时,我使用相同的命令行参数,但在执行期间我得到:

...

start-server:

doTest:
   [testng] Usage: <main class> [options]
   [testng]  The XML suite files to run
   [testng] Unknown option: -sourcedir
   [testng]   Options:
   [testng]     -configfailurepolicy               Configuration failure policy (skip or
   [testng]                                        continue)
   [testng]     -d                                 Output directory
   [testng]     -dataproviderthreadcount           Number of threads to use when running
   [testng]                                        data providers
   [testng]     -excludegroups                     Comma-separated list of group names to 
   [testng]                                        exclude
   [testng]     -groups                            Comma-separated list of group names to be
   [testng]                                        run
   [testng]     -junit                             JUnit mode
   [testng]                                        Default: false
   [testng]     -listener                          List of .class files or list of class
   [testng]                                        names implementing ITestListener or
   [testng]                                        ISuiteListener
   [testng]     -methods                           Comma separated of test methods
   [testng]                                        Default: []
   [testng]     -methodselectors                   List of .class files or list of class
   [testng]                                        names implementing IMethodSelector
   [testng]     -objectfactory                     List of .class files or list of class
   [testng]                                        names implementing ITestRunnerFactory
   [testng]     -parallel                          Parallel mode (methods, tests or classes)
   [testng]     -port                              The port
   [testng]     -reporter                          Extended configuration for custom report
   [testng]                                        listener
   [testng]     -suitename                         Default name of test suite, if not
   [testng]                                        specified in suite definition file or
   [testng]                                        source code
   [testng]     -suitethreadpoolsize               Size of the thread pool to use to run
   [testng]                                        suites
   [testng]                                        Default: 1
   [testng]     -testclass                         The list of test classes
   [testng]     -testjar                           A jar file containing the tests
   [testng]     -testname                          Default name of test, if not specified in
   [testng]                                        suitedefinition file or source code
   [testng]     -testnames                         The list of test names to run
   [testng]     -testrunfactory, -testRunFactory   The factory used to create tests
   [testng]     -threadcount                       Number of threads to use when running
   [testng]                                        tests in parallel
   [testng]     -usedefaultlisteners               Whether to use the default listeners
   [testng]                                        Default: true
   [testng]     -log, -verbose                     Level of verbosity
   [testng]

停止服务器: [selenium-shutdown] 获取:http://localhost:4444/selenium-server/driver/?cmd=shutDown [selenium-shutdown] 到:/var/lib/jenkins/jobs/HomePage/workspace/result.txt [selenium-shutdown] 关机期间会出现 DGF 错误

我的 Jenkins 实例在不同的盒子 (ubuntu) 上运行。我刚刚在那个盒子上升级到 Ant 1.8.2。这可能是一个测试问题吗?我已经在几个地方看到了这个问题,但还没有具体的答案,感谢任何帮助,谢谢。

【问题讨论】:

    标签: ant selenium vmware jenkins testng


    【解决方案1】:

    出于某种原因,Jenkins 正在将“-sourcedir”传递给 TestNG,这不是一个公认的选项。

    【讨论】:

    猜你喜欢
    • 2017-12-22
    • 1970-01-01
    • 1970-01-01
    • 2021-06-12
    • 1970-01-01
    • 2021-04-18
    • 1970-01-01
    • 2017-07-22
    • 2016-04-25
    相关资源
    最近更新 更多