线上第六期_接口测试初级演练_20180729

有问题请回帖

分析业务

登陆

POST /provider/oauth/token?_t=1GENYMOTION66adefb1e7e6e9882dc08ac85ab792b3.7160412574.1532866974495.1532867671838&_s=367bac HTTP/1.1
Accept-Encoding: gzip, deflate
Cookie: xq_a_token=2e28c455df13d47ff87a4e9cb9afd732140603c1;u=7160412574
host: api.xueqiu.com
User-Agent: Xueqiu Android 8.7-rc-1618
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.8,zh-CN;q=0.6,zh;q=0.4
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Connection: close
Content-Length: 134

areacode=86&client_secret=txsDfr9FphRSPov5oQou74&client_id=JtXbaMn7eP&x=0.2158&telephone=15600534760&code=4703&grant_type=no_password&

HTTP/1.1 200 OK
Server: openresty/1.11.2.4
Date: Sun, 29 Jul 2018 12:34:31 GMT
Content-Type: application/json;charset=UTF-8
Connection: close
Vary: Accept-Encoding
Trace-Id: 600d3af8fca78be9
Content-Language: en-US
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-Length: 1274

{"login_success":true,"access_token":"8cf0a4031156698597e6621cf7ad44f3f01acee1","refresh_token":"e43163c52e0a8ee7b96a6b1f23bdb0f9adfa3f4e","uid":5708953570,"is_new":false,"scope":"all","expires_in":41430,"user":{"id":5708953570,"screen_name":"seveniruby","name":null,"province":null,"city":null,"location":null,"description":null,"url":null,"domain":null,"gender":null,"verified":null,"created_at":1410905827886,"areaCode":"86","type":"1","followers_count":null,"friends_count":null,"status_count":null,"last_status_id":null,"last_comment_id":null,"step":"null","verified_description":null,"blog_description":null,"profile":"/5708953570","recommend":null,"stock_status_count":null,"intro":null,"status":0,"st_color":"1","following":false,"follow_me":false,"blocking":false,"allow_all_stock":false,"truncated":false,"stocks_count":null,"verified_type":null,"ability":null,"donate_snowcoin":0,"donate_count":0,"lastRecordAt":null,"maskedEmail":null,"anonymous":false,"photo_domain":"http://xavatar.imedao.com/","profile_image_url":"community/20157/1438850246414-1438850261106.jpg,community/20157/1438850246414-1438850261106.jpg!180x180.png,community/20157/1438850246414-1438850261106.jpg!50x50.png,community/20157/1438850246414-1438850261106.jpg!30x30.png","cube_count":null}}



GET /v4/stock/portfolio/stocks.json?_t=1GENYMOTION66adefb1e7e6e9882dc08ac85ab792b3.5708953570.1532866974495.1532868266730&_s=6a27e6&size=10000&x=0.1445&type=5&category=2 HTTP/1.1
Accept-Encoding: gzip, deflate
Cookie: xq_a_token=8cf0a4031156698597e6621cf7ad44f3f01acee1;u=5708953570
host: api.xueqiu.com
User-Agent: Xueqiu Android 8.7-rc-1618
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.8,zh-CN;q=0.6,zh;q=0.4
Connection: close




业务

  • 登陆、未登录 BeforeClass+继承关系
  • 自选股票刷新 TestCase
  • 每种股票列表 TestCase+数据驱动、参数化
  • 删除关注、添加关注 TestCase+参数化+排序
  • 修改排序 TestCase

代码

  • 借助模板代码生成用例
  • 与研发沟通万能码或者其他的绕过机制

问题点

  • 相同请求发了两次
  • 鸡肋bug 列表为0 不重要