运行远程Selenium测试会引发错误:'[testng] Unknown option: -sourcedir'



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

当我安排测试在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]

停止服务器:[硒关闭]获取: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。这是测试问题吗?我已经看到这个问题的几个地方,但没有具体的答案,任何帮助是感激的,谢谢。

由于某些原因,Jenkins将"-sourcedir"传递给TestNG,而这不是一个可识别的选项。

相关内容

  • 没有找到相关文章

最新更新