Use in android studio

未关闭
#175 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
20/100
Issue 类型
功能
描述清晰度
需要澄清
活跃度
停滞
技术栈
android, java
领域
mobile, testing

调研方向

从 issue 中描述的 Android Studio/Robolectric 设置开始,包括新的 AndroidDriver URL 和 Gradle 依赖项。调查不完整的 Apache HTTP client 类和提议的 Jarjar 方案,然后将其与单独的 APK 测试项目进行比较。确定一种可复现的方案或记录一项限制,即视为完成。

由索引模型根据 Issue 内容生成。

描述

What I am trying to do is to use it directly as Robolectric unit tests in Android Studio. The problem comes when I create a new AndroidDriver():

new AndroidDriver(new URL("http://0.0.0.0:4723/wd/hub"), capabilities);

The selenium driver uses the apache-http client which in Android is not complete so there are missing classes from the preloaded one. My next step is to use Jarjar to stitch together a new version of http client in the Android SDK jar.

Not sure if it worths the pain, but I would like to discuss if this sounds like a good idea (fake the UI tests as unit tests)?

A different option is of course to create a different project only to test the apk.

Fyi piece from my .gradle:

testApt 'com.squareup.dagger:dagger-compiler:1.2.2'
testCompile 'com.squareup.dagger:dagger:1.2.2'
testCompile ('io.appium:java-client:2.2.0'){
    exclude module: 'guava'
    exclude module: 'httpmime'
    exclude module: 'gson'
}
主要语言
Java
星标
1.3k
派生
752
平均合并
6 天 21 小时
30 天内合并 PR
8

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

appium/java-client 的其他 Issue

查看 appium/java-client 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。