• 1

  • 课间作业1

    import requests


    def test_get():
    url = "https://testerhome.com/api/v3/topics.json?limit=3"
    r=requests.get(url)
    print(r.json())
    assert r.json()['topics'][0]['user']['login'] == 'liangqiangWang'

    课间作业2
    0

  • 第十期_接口测试_20190926 at September 28, 2019

    课后作业1
    跟百度发送请求,并把user-agent修改为你的个人署名
    请求
    $ curl "http://www.baidu.com/s?wd=testerhome" -H "User-Agent:tkndsg" -2>&1 -vv | less
    响应

    < HTTP/1.1 200 OK
    < Bdpagetype: 3
    < Bdqid: 0x857357e8000971cb
    < Cache-Control: private
    < Connection: Keep-Alive
    < Content-Type: text/html;charset=utf-8
    < Cxy_all: baidu+7cb259a7983046e1d0e5429ca955fbb2
    < Cxy_ex: 1570940690+4160584462+d41d8cd98f00b204e9800998ecf8427e
    < Date: Sun, 13 Oct 2019 04:24:50 GMT
    < P3p: CP=" OTI DSP COR IVA OUR IND COM "
    < Server: BWS/1.1
    < Set-Cookie: BAIDUID=9247D2CF82EB588FC28D7AAFB9BE32B5:FG=1; expires=Thu, 31-Dec-37 23:55:55 GMT; max-age=2147483647; path=/; domain=.baidu.com
    < Set-Cookie: BIDUPSID=9247D2CF82EB588FC28D7AAFB9BE32B5; expires=Thu, 31-Dec-37 23:55:55 GMT; max-age=2147483647; path=/; domain=.baidu.com
    < Set-Cookie: PSTM=1570940690; expires=Thu, 31-Dec-37 23:55:55 GMT; max-age=2147483647; path=/; domain=.baidu.com
    < Set-Cookie: delPer=0; path=/; domain=.baidu.com
    < Set-Cookie: BD_CK_SAM=1;path=/
    < Set-Cookie: PSINO=6; domain=.baidu.com; path=/
    < Set-Cookie: BDSVRTM=164; path=/
    < Set-Cookie: H_PS_PSSID=1425_21083_29721_29567_29221_26350; path=/; domain=.baidu.com
    < Vary: Accept-Encoding
    < X-Ua-Compatible: IE=Edge,chrome=1
    < Transfer-Encoding: chunked

    课后作业2
    发起一次雪球的股票搜索,搜索阿里巴巴
    请求

    curl 'https://xueqiu.com/k?q=%E9%98%BF%E9%87%8C%E5%B7%B4%E5%B7%B4' -H 'Connection: keep-alive' -H 'Cache-Control: max-age=0' -H 'Upgrade-Insecure-Requests: 1' -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36' -H 'Sec-Fetch-Mode: navigate' -H 'Sec-Fetch-User: ?1' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3' -H 'Sec-Fetch-Site: same-origin' -H 'Referer: https://xueqiu.com/k?q=%E9%98%BF%E9%87%8C%E5%B7%B4%E5%B7%B4' -H 'Accept-Encoding: gzip, deflate, br' -H 'Accept-Language: zh-CN,zh;q=0.9' -H 'Cookie: acw_tc=2760825515702484259006897ee844ddc70a3037b474165ba625d916aaaf7c; device_id=75dd6b7816cb6f82e1cb95badec9045a; aliyungf_tc=AQAAAIrTqm7q6AcA9/17DovI6iXSrQBd; xq_a_token=d831cd39b53563679545656fba1f4efd8e48faa0; xq_r_token=fd2f0f487c8298cad8e7519f1560abb7a18c589d; u=611570940196291; Hm_lvt_1db88642e346389874251b5a1eded6e3=1570248438,1570940197; Hm_lpvt_1db88642e346389874251b5a1eded6e3=1570940202' --compressed

    响应

    < HTTP/1.1 200 OK
    < Date: Sun, 13 Oct 2019 04:36:36 GMT
    < Content-Type: text/html; charset=utf-8
    < Transfer-Encoding: chunked
    < Connection: keep-alive
    < Server: openresty/1.11.2.4
    < Vary: Accept-Encoding
    < Cache-Control: private, no-store, no-cache, must-revalidate, max-age=0
    < P3P: "CP="IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT""
    < Content-Encoding: gzip
    < Strict-Transport-Security: max-age=31536000

  • 1

  • 课后作业
    1.收到指令到activity展示在页面上的时间

    $ adb logcat | findstr "Displayed"
    09-20 11:47:48.368 1351 1458 I ActivityManager: Displayed com.tratao.xcurrency.plus.beta/com.tratao.xcurrency.plus.SplashActivity: +270ms
    09-20 11:47:51.815 1351 1458 I ActivityManager: Displayed com.tratao.xcurrency.plus.beta/com.tratao.xcurrency.plus.MainActivity: +517ms

    2.收到指令到activity的view、infllater基本加载完成的时间

    C:\Users\XXX>adb shell am start -W com.tratao.xcurrency.plus.beta/com.tratao.xcurrency.plus.MainActivity
    Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.tratao.xcurrency.plus.beta/com.tratao.xcurrency.plus.MainActivity }
    Status: ok
    Activity: com.tratao.xcurrency.plus.beta/com.tratao.xcurrency.plus.MainActivity
    ThisTime: 1141
    TotalTime: 1141
    WaitTime: 1162
    Complete

    3.收到指令到activity所有内容加载完成的时间:(结束帧063 - 起始帧008) / 10fps/s ≈ 5.5 s(包含3s开屏广告)

    ps:如果上面123点的标题和对应方法不吻合麻烦请指正,谢谢

  • windows上开夜神模拟器桥接模式,在ubuntu上docker部署的stf,使用ubuntu中docker的adb connect已连上了夜神模拟器,但是stfserver.apk似乎安装失败了,正在琢磨

    简单完成部分作业:-{

  • 2

  • 1

  • 提问:
    想知道除了uiautomatorviewer外其他的获取页面元素的方式,想获取动态变化页面的元素。例如微信收到视频,想定位挂掉按钮,用uiautomatorviewer就定位不到了
    课后作业
    部分完成的 GitHub链接

  • 1

做一个兴趣使然的测试。