【问题标题】:Automated Testing issue自动化测试问题
【发布时间】:2020-11-29 18:31:33
【问题描述】:

使用 Selenium 和 Appium 进行自动化测试非常新。
整个设置是由某个供应商很久以前完成的。
现在我运行了我的测试,但第一个测试本身失败了,我得到了以下错误。

报错如下图
但我有我的 api 密钥,如下所示。

错误:

[ERROR] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 12.048 s <<< FAILURE! - in TestSuite
[ERROR] runner.RunWebScenario.runScenario["Login Mode - General and Appointment Notifications Retrieval @Device:Mobile", "HAGo-NC"](1)  Time elapsed: 2.437 s  <<< FAILURE!
org.openqa.selenium.WebDriverException: 
No Sauce Connect tunnel found for identifier 'act-rdc'
Command duration or timeout: 1.81 seconds
Caused by: org.openqa.selenium.WebDriverException: 
No Sauce Connect tunnel found for identifier 'act-rdc'
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'pd2macbook1.local', ip: 'fe80:0:0:0:c5a:9e1a:d4fb:a12a%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.15.4', java.version: '13.0.1'
Driver info: driver.version: unknown

[INFO] 
[INFO] Results:
[INFO] 
[ERROR] Failures: 
[ERROR]   RunWebScenario>AbstractTestNGCucumberTests.runScenario:22 » WebDriver No Sauce...
[INFO] 
[ERROR] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0
[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  56.735 s
[INFO] Finished at: 2020-08-11T10:37:19+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M5:test (default-test) on project ha-go-test-plan: There are test failures.
[ERROR] 
[ERROR] Please refer to /Users/raksha/auto/notif-center-act/ha-go-test-plan/target/surefire-reports for the individual test results.
[ERROR] Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

是什么导致了这个问题?
自动化测试非常混乱。这里真的需要一些指导!!

问题是“无法执行目标 org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M5:test (default-test) on project ha-go-test-plan: 有测试失败。”

“无酱连接隧道……”??

如果需要任何进一步的测试数据或截图,请评论,我会提供。

【问题讨论】:

    标签: java selenium maven appium saucelabs


    【解决方案1】:

    该错误意味着您的测试请求了一个标识符为“act-rdc”的隧道,但它找不到。

    可能有以下几个原因:

    1. 您尚未使用该标识符手动启动隧道
    2. 您的工具通常会启动隧道,但在您的本地环境中无法这样做
    3. 您已启动隧道,但运行测试的用户无法访问它

    猜测你的 GitLab 环境可能会为你建立隧道,或者有一个不断运行的隧道,而在 Eclipse 中你正在运行不同的设置。

    【讨论】:

      【解决方案2】:

      您的测试中的某些断言语句失败(AbstractTestNGCucumberTests 中的第 22 行):

      RunWebScenario>AbstractTestNGCucumberTests.runScenario:22
      

      显然你有参数化测试

      runner.RunWebScenario.runScenario["Login Mode - General and Appointment Notifications Retrieval @Device:Mobile", "HAGo-NC"](1)
      

      有两个参数:

      1. “登录模式 - 常规和约会通知检索@Device:Mobile”
      2. “HAGo-NC”

      这是第一个失败的参数组合 (1)。

      【讨论】:

      • 奇怪的是,当我们在 gitlab 中运行我们的管道时,测试运行成功。只有当我们尝试使用 SuaceLab 隧道在 Eclipse 中运行它时,我们才会遇到这个问题。 “No Sauce Connect tunnel found for identifier 'act-rdc'”失败并出现此错误。无法弄清楚是酱隧道问题还是某个 maven 插件/文件有问题。
      • Maven 和插件都不会打印此日志。您应该从 Selenium、配置和您的测试开始。因为似乎与您所说的隧道问题有关。一种网络问题。
      • 迪伦的一个好观点。我也确信这与隧道的连接或环境配置有关。
      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2010-09-06
      • 2015-05-14
      • 1970-01-01
      • 2014-12-11
      • 1970-01-01
      相关资源
      最近更新 更多