• 个人理解:
    前台流量:是应用在前台运行即用户使用过程中消耗的流量;
    后台流量:是应用在后台运行时所消耗的流量;
    流量测试中,除了被测应用,有一些后台的应用也会消耗流量。

  • 《我们仨》——杨绛先生 at 2016年12月19日

    已拿到,感谢分享。左手边的小伙伴~

  • 已经付款~ 上次没去成,希望这次能够参加~

  • TesterHome 北京神秘专场 at 2015年11月23日

    报名。我猜是 monkey👏

  • 期待北京有更多的会可以参加~

  • @lihuazhang 提个小建议可以吗?
    关注某人之后,能收到他发表的回复等所有信息。
    我认为,大家关注的是他发表的帖子,如果他给他人的回复全部提醒给我,信息量过于多。
    能否在此逻辑上做个修改?

  • 1、你运行 “appium-doctor” 的结果是否通过?
    2、你的 jdk 路径是否存在中文?

  • @alex_sheng @lihuazhang 每拿到一本新书,都与自己进行一个约定,两周或更长时间看完,那么看下书的页数,除以天数,约束自己每天看的页码,基本上都会把书看完,除非特别晦涩难懂的需要时间长点。从别处学来的经验,自己也在践行当中。

  • info: --> POST /wd/hub/session/8265b651-40cf-cb83-2919-28e85c16ffd4/element/d2246795-7cf1-6cc8-8834-
    a1db4ceddfcf/click {"id":"d2246795-7cf1-6cc8-8834-a1db4ceddfcf"}
    info: [debug] Proxying command to localhost:8080
    info: [debug] Making http request with opts: {"url":"http://localhost:8080/wd/hub/session/8265b651-4
    0cf-cb83-2919-28e85c16ffd4/element/d2246795-7cf1-6cc8-8834-a1db4ceddfcf/click","method":"POST","json
    ":{"id":"d2246795-7cf1-6cc8-8834-a1db4ceddfcf"}}
    info: [debug] Proxied response received with status 200: {"value":"","status":0,"sessionId":"8265b65
    1-40cf-cb83-2919-28e85c16ffd4"}
    info: <-- POST /wd/hub/session/8265b651-40cf-cb83-2919-28e85c16ffd4/element/d2246795-7cf1-6cc8-8834-
    a1db4ceddfcf/click 200 637.581 ms - 74
    info: --> POST /wd/hub/session/8265b651-40cf-cb83-2919-28e85c16ffd4/touch/perform {"actions":[{"acti
    on":"press","options":{"x":75,"y":200}},{"action":"wait","options":{"ms":1000}},{"action":"moveTo","
    options":{"x":80,"y":800}},{"action":"release","options":{}}]}
    info: [debug] Proxying command to localhost:8080
    info: [debug] Making http request with opts: {"url":"http://localhost:8080/wd/hub/session/8265b651-4
    0cf-cb83-2919-28e85c16ffd4/touch/perform","method":"POST","json":{"actions":[{"action":"press","opti
    ons":{"x":75,"y":200}},{"action":"wait","options":{"ms":1000}},{"action":"moveTo","options":{"x":80,
    "y":800}},{"action":"release","options":{}}]}}
    info: [debug] Proxied response received with status 404: undefined
    info: <-- POST /wd/hub/session/8265b651-40cf-cb83-2919-28e85c16ffd4/touch/perform 404 47.564 ms - -
    

    现在出现的这个问题,可能是由于我执行 swipe 方法导致的,谁遇到过相同的?
    我的代码:

    driver.findElement(By.id("main_rbtn_course_me")).click();
    Thread.sleep(1000);
    driver.swipe(75, 200, 80, 800, 1000);//
    driver.findElement(By.id("user_exit_btn")).click();
    }
    
  • @chenhengjie123 appium 版本是 V1.4。
    我试了一下官方的 contactmanager.apk 及代码,测试通过。环境应该是没有问题。
    麻烦您了💋

  • @chenhengjie123 我在想,是不是我使用 appium 的方法不正确或者我的配置不正确。
    我先安装了 jdk,eclipse-adt、sdk,然后安装 node,然后在线安装了 appium,appium-doctor 检查没有问题,所以,我就直接开始写代码了。项目中 java-client 用的是 3.2,selenium 用的是 2.47。

  • 情况二:设备:魅族 3 系统版本: flyme os 3.7 对应 android 版本 4.4
    当我运行测试用例时,提示如下错误:

    info: <-- GET /wd/hub/session/d32056c7-ded5-9da4-9921-40316d9eb9a5 200 441.379 ms - 764
    info: [debug] [SELENDROID] 100000
    info: [debug] [SELENDROID] 100000
    info: [debug] [SELENDROID] 100000
    info: [debug] [SELENDROID] add task, s = 1
    info: [debug] [SELENDROID] rem task, s = 0
    info: [debug] [SELENDROID] 100000
    info: [debug] [SELENDROID] 100000
    info: [debug] [SELENDROID] add task, s = 1
    info: [debug] [SELENDROID] rem task, s = 0
    info: [debug] [SELENDROID] 100000
    info: [debug] [SELENDROID] 100000
    info: [debug] [SELENDROID] 100000
    info: [debug] [SELENDROID] 100000
    info: [debug] [SELENDROID] Setting airplane_mode_on has moved from android.provider.Settings.System
    to android.provider.Settings.Global, returning read-only value.
    info: [debug] [SELENDROID ERR] ENOENT (No such file or directory)
    info: [debug] [SELENDROID ERR]  at libcore.io.IoBridge.open(IoBridge.java:409)
    info: [debug] [SELENDROID ERR]  at java.io.FileOutputStream.<init>(FileOutputStream.java:88)
    info: [debug] [SELENDROID ERR]  at java.io.FileOutputStream.<init>(FileOutputStream.java:73)
    info: [debug] [SELENDROID ERR]  at java.io.FileWriter.<init>(FileWriter.java:42)
    info: [debug] [SELENDROID ERR]  at com.wandoujia.ads.sdk.legacy.util.p.run(SourceFile:241)
    info: [debug] [SELENDROID ERR]  at java.lang.Thread.run(Thread.java:841)
    info: [debug] [SELENDROID ERR] ENOENT (No such file or directory)
    info: [debug] [SELENDROID ERR]  at libcore.io.Posix.open(Native Method)
    info: [debug] [SELENDROID ERR]  at libcore.io.BlockGuardOs.open(BlockGuardOs.java:110)
    info: [debug] [SELENDROID ERR]  at libcore.io.IoBridge.open(IoBridge.java:393)
    info: [debug] [SELENDROID ERR]  ... 5 more
    info: [debug] [SELENDROID ERR] SELECT * FROM background_scan
    info: [debug] [SELENDROID ERR]  at android.database.sqlite.SQLiteConnection.nativePrepareStatement(N
    ative Method)
    info: [debug] [SELENDROID ERR]  at android.database.sqlite.SQLiteConnection.acquirePreparedStatement
    (SQLiteConnection.java:889)
    info: [debug] [SELENDROID ERR]  at android.database.sqlite.SQLiteConnection.prepare(SQLiteConnection
    .java:500)
    info: [debug] [SELENDROID ERR]  at android.database.sqlite.SQLiteSession.prepare(SQLiteSession.java:
    588)
    info: [debug] [SELENDROID ERR]  at android.database.sqlite.SQLiteProgram.<init>(SQLiteProgram.java:5
    8)
    info: [debug] [SELENDROID ERR]  at android.database.sqlite.SQLiteQuery.<init>(SQLiteQuery.java:37)
    info: [debug] [SELENDROID ERR]  at android.database.sqlite.SQLiteDirectCursorDriver.query(SQLiteDire
    ctCursorDriver.java:44)
    info: [debug] [SELENDROID ERR]  at android.database.sqlite.SQLiteDatabase.rawQueryWithFactory(SQLite
    Database.java:1314)
    info: [debug] [SELENDROID ERR]  at android.database.sqlite.SQLiteDatabase.queryWithFactory(SQLiteDat
    abase.java:1161)
    info: [debug] [SELENDROID ERR]  at android.database.sqlite.SQLiteDatabase.query(SQLiteDatabase.java:
    1032)
    info: [debug] [SELENDROID ERR]  at android.database.sqlite.SQLiteDatabase.query(SQLiteDatabase.java:
    1200)
    info: [debug] [SELENDROID ERR]  at com.tencent.assistant.db.helper.SQLiteDatabaseWrapper.query(ProGu
    ard:134)
    info: [debug] [SELENDROID ERR]  at com.tencent.assistant.db.table.f.b(ProGuard:112)
    info: [debug] [SELENDROID ERR]  at com.tencent.nucleus.manager.backgroundscan.d.c(ProGuard:189)
    info: [debug] [SELENDROID ERR]  at com.tencent.nucleus.manager.backgroundscan.BackgroundReceiver.onR
    eceive(ProGuard:17)
    info: [debug] [SELENDROID ERR]  at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:
    765)
    info: [debug] [SELENDROID ERR]  at android.os.Handler.handleCallback(Handler.java:733)
    info: [debug] [SELENDROID ERR]  at android.os.Handler.dispatchMessage(Handler.java:95)
    info: [debug] [SELENDROID ERR]  at android.os.Looper.loop(Looper.java:136)
    info: [debug] [SELENDROID ERR]  at android.app.ActivityThread.main(ActivityThread.java:5032)
    info: [debug] [SELENDROID ERR]  at java.lang.reflect.Method.invokeNative(Native Method)
    info: [debug] [SELENDROID ERR]  at java.lang.reflect.Method.invoke(Method.java:515)
    info: [debug] [SELENDROID ERR]  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(Zygote
    Init.java:785)
    info: [debug] [SELENDROID ERR]  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
    info: [debug] [SELENDROID ERR]  at dalvik.system.NativeStart.main(Native Method)
    info: [debug] [SELENDROID] add task, s = 1
    info: [debug] [SELENDROID] rem task, s = 0
    info: [debug] [SELENDROID] 100000
    info: [debug] [SELENDROID] 100000
    info: [debug] [SELENDROID] Setting adb_enabled has moved from android.provider.Settings.System to an
    droid.provider.Settings.Global, returning read-only value.
    info: [debug] [SELENDROID] Setting adb_enabled has moved from android.provider.Settings.System to an
    droid.provider.Settings.Global, returning read-only value.
    info: [debug] [SELENDROID] O1 begin scan directory /storage/emulated/0/.UTSystemConfig
    info: [debug] [SELENDROID] O1 end scan directory /storage/emulated/0/.UTSystemConfig
    info: [debug] [SELENDROID] O1 begin scan directory /storage/emulated/0/.SystemConfig
    info: [debug] [SELENDROID] O1 end scan directory /storage/emulated/0/.SystemConfig
    info: [debug] [SELENDROID] 100000
    info: [debug] [SELENDROID] 100000
    info: [debug] [SELENDROID] 100000
    info: [debug] [SELENDROID] 100000
    info: [debug] [SELENDROID ERR] Couldn't read row 0, col 0 from CursorWindow.  Make sure the Cursor i
    s initialized correctly before accessing data from it.
    info: [debug] [SELENDROID ERR]  at android.database.CursorWindow.nativeGetLong(Native Method)
    info: [debug] [SELENDROID ERR]  at android.database.CursorWindow.getLong(CursorWindow.java:507)
    info: [debug] [SELENDROID ERR]  at android.database.AbstractWindowedCursor.getLong(AbstractWindowedC
    ursor.java:75)
    info: [debug] [SELENDROID ERR]  at android.database.AbstractCursor.moveToPosition(AbstractCursor.jav
    a:220)
    info: [debug] [SELENDROID ERR]  at android.database.AbstractCursor.moveToNext(AbstractCursor.java:24
    5)
    info: [debug] [SELENDROID ERR]  at com.tencent.assistant.db.table.z.a(ProGuard:163)
    info: [debug] [SELENDROID ERR]  at com.tencent.assistantv2.st.k.a(ProGuard:76)
    info: [debug] [SELENDROID ERR]  at com.tencent.assistantv2.st.g.run(ProGuard:181)
    info: [debug] [SELENDROID ERR]  at android.os.Handler.handleCallback(Handler.java:733)
    info: [debug] [SELENDROID ERR]  at android.os.Handler.dispatchMessage(Handler.java:95)
    info: [debug] [SELENDROID ERR]  at android.os.Looper.loop(Looper.java:136)
    info: [debug] [SELENDROID ERR]  at android.os.HandlerThread.run(HandlerThread.java:61)
    info: [debug] [SELENDROID ERR] com.zj.learning
    info: [debug] [SELENDROID ERR]  at android.app.ApplicationPackageManager.getApplicationInfo(Applicat
    ionPackageManager.java:230)
    info: [debug] [SELENDROID ERR]  at com.android.server.AppOpsService$5.onReceive(AppOpsService.java:2
    062)
    info: [debug] [SELENDROID ERR]  at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:
    765)
    info: [debug] [SELENDROID ERR]  at android.os.Handler.handleCallback(Handler.java:733)
    info: [debug] [SELENDROID ERR]  at android.os.Handler.dispatchMessage(Handler.java:95)
    info: [debug] [SELENDROID ERR]  at android.os.Looper.loop(Looper.java:136)
    info: [debug] [SELENDROID ERR]  at com.android.server.ServerThread.initAndLoop(SystemServer.java:121
    7)
    info: [debug] [SELENDROID ERR]  at com.android.server.SystemServer.main(SystemServer.java:1307)
    info: [debug] [SELENDROID ERR]  at java.lang.reflect.Method.invokeNative(Native Method)
    info: [debug] [SELENDROID ERR]  at java.lang.reflect.Method.invoke(Method.java:515)
    info: [debug] [SELENDROID ERR]  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(Zygote
    Init.java:785)
    info: [debug] [SELENDROID ERR]  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
    info: [debug] [SELENDROID ERR]  at dalvik.system.NativeStart.main(Native Method)
    info: [debug] [SELENDROID] 100000
    info: [debug] [SELENDROID ERR] Couldn't read row 0, col 0 from CursorWindow.  Make sure the Cursor i
    s initialized correctly before accessing data from it.
    info: [debug] [SELENDROID ERR]  at android.database.CursorWindow.nativeGetLong(Native Method)
    info: [debug] [SELENDROID ERR]  at android.database.CursorWindow.getLong(CursorWindow.java:507)
    info: [debug] [SELENDROID ERR]  at android.database.AbstractWindowedCursor.getLong(AbstractWindowedC
    ursor.java:75)
    info: [debug] [SELENDROID ERR]  at android.database.AbstractCursor.moveToPosition(AbstractCursor.jav
    a:220)
    info: [debug] [SELENDROID ERR]  at android.database.AbstractCursor.moveToNext(AbstractCursor.java:24
    5)
    info: [debug] [SELENDROID ERR]  at com.tencent.assistant.db.table.z.a(ProGuard:163)
    info: [debug] [SELENDROID ERR]  at com.tencent.assistantv2.st.k.a(ProGuard:76)
    info: [debug] [SELENDROID ERR]  at com.tencent.assistantv2.st.g.run(ProGuard:181)
    info: [debug] [SELENDROID ERR]  at android.os.Handler.handleCallback(Handler.java:733)
    info: [debug] [SELENDROID ERR]  at android.os.Handler.dispatchMessage(Handler.java:95)
    info: [debug] [SELENDROID ERR]  at android.os.Looper.loop(Looper.java:136)
    info: [debug] [SELENDROID ERR]  at android.os.HandlerThread.run(HandlerThread.java:61)
    
  • @chenhengjie123 我尝试了一下 将 login 里的代码注释掉,然后进行测试。
    遇到了两种不同的情况:
    情况一:设备:联想 lepad,系统版本:android 2.3
    执行结果通过,但当我在 session 未被 shut down 进行登录后,会提示下面的错误。

    info: [debug] [SELENDROID] encode =  1
    info: [debug] [SELENDROID ERR] com.zj.learning.model.forum.Tag
    info: [debug] [SELENDROID ERR]  at java.lang.Class.classForName(Native Method)
    info: [debug] [SELENDROID ERR]  at java.lang.Class.forName(Class.java:234)
    info: [debug] [SELENDROID ERR]  at java.lang.Class.forName(Class.java:181)
    info: [debug] [SELENDROID ERR]  at com.zj.support.dao.b.a(Unknown Source)
    info: [debug] [SELENDROID ERR]  at com.zj.support.dao.a.onCreate(Unknown Source)
    info: [debug] [SELENDROID ERR]  at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLi
    teOpenHelper.java:126)
    info: [debug] [SELENDROID ERR]  at android.database.sqlite.SQLiteOpenHelper.getReadableDatabase(SQLi
    teOpenHelper.java:187)
    info: [debug] [SELENDROID ERR]  at com.zj.support.dao.c.a(Unknown Source)
    info: [debug] [SELENDROID ERR]  at com.zj.support.a.a.a(Unknown Source)
    info: [debug] [SELENDROID ERR]  at com.zj.support.a.b.a(Unknown Source)
    info: [debug] [SELENDROID ERR]  at com.zj.support.a.b.doInBackground(Unknown Source)
    info: [debug] [SELENDROID ERR]  at android.os.AsyncTask$2.call(AsyncTask.java:185)
    info: [debug] [SELENDROID ERR]  at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:306
    )
    info: [debug] [SELENDROID ERR]  at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    info: [debug] [SELENDROID ERR]  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecu
    tor.java:1088)
    info: [debug] [SELENDROID ERR]  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExec
    utor.java:581)
    info: [debug] [SELENDROID ERR]  at java.lang.Thread.run(Thread.java:1019)
    info: [debug] [SELENDROID ERR] com.zj.learning.model.forum.Tag
    info: [debug] [SELENDROID ERR]  ... 17 more
    info: [debug] [SELENDROID ERR] com.zj.learning.model.forum.Tag in loader dalvik.system.PathClassLoad
    er[/system/framework/android.test.runner.jar:/data/app/com.zj.learning.selendroid-1.apk:/data/app/co
    m.zj.learning-1.apk]
    info: [debug] [SELENDROID ERR]  at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:240)
    
    info: [debug] [SELENDROID ERR]  at java.lang.ClassLoader.loadClass(ClassLoader.java:551)
    info: [debug] [SELENDROID ERR]  at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
    info: [debug] [SELENDROID ERR]  ... 17 more
    
  • @wanglitingmitty 好的,我试试,谢谢

  • @chenhengjie123 sorry,着急发帖,没认真排版。
    开发打给我的 apk 直接安装没有问题,当我通过 appium 安装这个 apk 后,我在手机上使用就会报错。
    这个项目是有一个依赖包的,我们做了混淆,然后打成的包。可能就是您说的这个重签名导致的,如果是这样,有什么解决方案吗?

  • 没有人遇到过类似的问题吗?我现在主要是出现问题的原因不明确。

  • @sanlengjingvv 问题已解决,感谢。

  • @sanlengjingvv 好的,我重新下载 client 包试试,谢谢💋

  • 第一次参加行业大会,接触到很多新知识,有很多的想法却无法用语言表述,这篇文章写得很详细,全面,谢谢分享。
    同为 90 后,表示惭愧...