- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我正在编写测试以在 sauce-labs 上运行。该测试在 sauce-labs 上运行完美,但它没有设置测试状态(通过/失败)。会是什么原因呢?
public class AndroidSauceTest
{
private SauceOnDemandAuthentication authentication = new SauceOnDemandAuthentication(
"username", "apikey");
private SauceREST client = new SauceREST(authentication.getUsername(), authentication.getAccessKey());
private WebDriver driver;
private String sessionId;
@BeforeMethod
public void setUp(Method method) throws Exception
{
DesiredCapabilities caps = new DesiredCapabilities();
this.driver = new RemoteWebDriver(
new URL("http://" + authentication.getUsername() + ":" + authentication.getAccessKey() + "@ondemand.saucelabs.com:80/wd/hub"),
caps);
this.sessionId = (((RemoteWebDriver) driver).getSessionId()).toString();
}
@Test(enabled = false)
public void androidExampleTest() throws Exception {
try
{
//code block
client.jobPassed(this.sessionId);
} catch (Exception e) {
client.jobFailed(this.sessionId);
throw e;
}
}
@AfterMethod
public void tearDown() throws Exception {
driver.quit();
}
}
运行测试时出现以下错误。测试状态(通过/失败)不会在 saucelabs 上更新。此行显示错误
client.jobPassed(this.sessionId);
3 Feb, 2015 4:34:33 PM com.saucelabs.saucerest.SauceREST updateJobInfo
WARNING: Error updating Sauce Results
javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:902)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1208)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1235)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1219)
at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:440)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:979)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:250)
at com.saucelabs.saucerest.SauceREST.updateJobInfo(SauceREST.java:318)
at com.saucelabs.saucerest.SauceREST.jobPassed(SauceREST.java:131)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:622)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:673)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:842)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1166)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:701)
Caused by: java.io.EOFException: SSL peer shut down incorrectly
at sun.security.ssl.InputRecord.read(InputRecord.java:482)
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:883)
... 23 more
3 Feb, 2015 4:34:34 PM com.saucelabs.saucerest.SauceREST updateJobInfo
WARNING: Error closing result stream
javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:902)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1208)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1235)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1219)
at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:440)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1139)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254)
at com.saucelabs.saucerest.SauceREST.updateJobInfo(SauceREST.java:325)
at com.saucelabs.saucerest.SauceREST.jobPassed(SauceREST.java:131)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:622)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:673)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:842)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1166)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:701)
Caused by: java.io.EOFException: SSL peer shut down incorrectly
at sun.security.ssl.InputRecord.read(InputRecord.java:482)
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:883)
... 23 more
3 Feb, 2015 4:35:41 PM com.saucelabs.saucerest.SauceREST updateJobInfo
WARNING: Error updating Sauce Results
javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:902)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1208)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1235)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1219)
at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:440)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:979)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:250)
at com.saucelabs.saucerest.SauceREST.updateJobInfo(SauceREST.java:318)
at com.saucelabs.saucerest.SauceREST.jobPassed(SauceREST.java:131)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:622)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:673)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:842)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1166)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:701)
Caused by: java.io.EOFException: SSL peer shut down incorrectly
at sun.security.ssl.InputRecord.read(InputRecord.java:482)
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:883)
... 23 more
3 Feb, 2015 4:35:42 PM com.saucelabs.saucerest.SauceREST updateJobInfo
WARNING: Error closing result stream
javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:902)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1208)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1235)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1219)
at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:440)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1139)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254)
at com.saucelabs.saucerest.SauceREST.updateJobInfo(SauceREST.java:325)
at com.saucelabs.saucerest.SauceREST.jobPassed(SauceREST.java:131)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:622)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:673)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:842)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1166)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:701)
Caused by: java.io.EOFException: SSL peer shut down incorrectly
at sun.security.ssl.InputRecord.read(InputRecord.java:482)
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:883)
... 23 more
3 Feb, 2015 4:37:09 PM com.saucelabs.saucerest.SauceREST updateJobInfo
WARNING: Error updating Sauce Results
javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:902)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1208)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1235)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1219)
at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:440)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:979)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:250)
at com.saucelabs.saucerest.SauceREST.updateJobInfo(SauceREST.java:318)
at com.saucelabs.saucerest.SauceREST.jobPassed(SauceREST.java:131)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:622)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:673)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:842)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1166)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:701)
Caused by: java.io.EOFException: SSL peer shut down incorrectly
at sun.security.ssl.InputRecord.read(InputRecord.java:482)
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:883)
... 23 more
3 Feb, 2015 4:37:10 PM com.saucelabs.saucerest.SauceREST updateJobInfo
WARNING: Error closing result stream
javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:902)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1208)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1235)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1219)
at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:440)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1139)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254)
at com.saucelabs.saucerest.SauceREST.updateJobInfo(SauceREST.java:325)
at com.saucelabs.saucerest.SauceREST.jobPassed(SauceREST.java:131)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:622)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:673)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:842)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1166)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:701)
Caused by: java.io.EOFException: SSL peer shut down incorrectly
at sun.security.ssl.InputRecord.read(InputRecord.java:482)
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:883)
... 23 more
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 233.156 sec
最佳答案
更新作业的调用应该是代码中的最后一个 Activity 。尝试在 AfterTest/AfterSuite 方法中更新作业状态。
关于java - 未在 saucelabs 上设置测试状态,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28315149/
如何从“酱汁实验室”的“测试”页面清除旧测试? 我尝试了一些东西之后就发出了噪音,我想整理一下。 从长远来看,会有很多有趣的构建,我希望能够对其进行存档/删除,这样就不难发现重要的测试运行。 最佳答案
我将从 Jenkins 转向使用 Concourse CI 来运行我的 Sauce 实验室 e2e 测试。 Sauce 实验室将具有相同内部版本号字符串的测试分组在一起: name:
我正在通过 TeamCity 在 Saucelabs 上并行运行 JUnit Selenium 测试。我有 4 个并发 session 和 125 个测试。当我运行构建时,一开始一切似乎都很好。有 4
我正在 Sauce labs Simulator 中运行移动应用测试。 我正在为 Saucelabs 上运行的每个测试上传 Android 文件 (.apk)。运行单个测试需要更多时间。 我的代码 c
我正在编写测试以在 sauce-labs 上运行。该测试在 sauce-labs 上运行完美,但它没有设置测试状态(通过/失败)。会是什么原因呢? public class AndroidSauceT
我有 UI 组件: 我想使用 Appium ID 定位器找到它:driver.findElement(By.id("fireEvent"))。它在本地运行良好,但 Appium 在 Saucelab
我想使用 saucelabs 隧道运行我的 testcafe 脚本。我尝试搜索文档以执行相同的操作,但没有找到任何内容。 我尝试在 testcafe github 和 saucelabs 文档上搜索文
我一直在尝试对移动 Protractor 测试进行自动化。我阅读了网络上的大部分博客,我读到了这篇博客,它是 Appium 与 Saucelabs 的“官方”博客: https://docs.sauc
我有一个项目有 Protractor 测试,由 TravisCI 通过 SauceLabs 执行。 其中一项测试涉及“上传”文件: it('should not allow "image/jpeg"
我正在尝试在 Travis CI 中启动并运行我的开源项目测试。我让他们使用 Selenium 服务器在本地工作。 看似一个相对简单的过程,但我缺乏完成任务的一些基本知识。 我有我的 .travis.
我正在使用 Protractor 测试 AngularJS 项目。我有一个图像文件上传测试,该测试在我的本地 Mac 计算机上正常工作并通过。然而,当我通过 Saucelabs 运行相同的测试时,测试
我正在尝试让 Java“入门”应用程序正常工作,我在 POM 中注意到了这一点: com.saucelabs sauce_testng [1.0.0,) test
以下内容是根据https://saucelabs.com/platforms中列出的配置进行配置的. DesiredCapabilities capabilities = new DesiredCap
这是我尝试自动化的工作流程(它是一个 Java 网络应用程序): 开发人员在 Selenium IDE(带 Firefox)中创建/编辑测试套件 该套件作为 HTML 文件的集合在项目存储库中维护 在
我们正在尝试使用 SauceLabs 来验证我们基于浏览器的 QUnit 测试是否通过了流行的设备/浏览器组合...... 当我们在浏览器中查看时,测试通过:https://ordenado.hero
我有一个带有 Protractor 测试的网络服务器,我想用 saucelabs 设置无尽的测试。他们说只需将 sauceLabs 用户和 key 添加到 Protractor 的 conf.js 文
我有一个 selenium 自动化框架,它使用 junit 在我选择的浏览器上本地运行测试。我目前使用 junitparams 来参数化我的一些测试。例如 @RunWith(JUnitParamsRu
我在与 Saucelabs 连接时遇到一些问题。当我尝试连接它时,它显示一个错误:参数不正确。我们想要 {"required":["desiredCapabilities"],"optional":[
从 Jenkins 作业运行的 Protractor 规范,连接到 SauceLabs。它单击按钮下载 PDF,并检查文件是否已成功下载。我无法让 Chrome 浏览器不使用绝对路径打开“另存为”提示
我正在尝试在 saucelab 真实设备上运行 Appium 测试。但这是抛出错误“没有符合您条件的设备。”所有带有控制台日志的配置文件都粘贴在这里:https://paste.gg/p/anonym
我是一名优秀的程序员,十分优秀!