骞茶揣锛屾帴鍙f祴璇曢潰璇曢
Posted 浜戞祴瀛﹂櫌
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了骞茶揣锛屾帴鍙f祴璇曢潰璇曢相关的知识,希望对你有一定的参考价值。
鏈€杩戜袱骞存帴鍙f祴璇曟垚涓烘祴璇曞悓瀛﹂潰璇曟妧鑳界殑鏍囬厤浜嗭紝鐗瑰埆鏄潰璇曠殑鏃跺€欓潰璇曞畼甯屾湜浣犻櫎浜嗙偣鐐圭偣锛岃繕鑳芥洿娣卞叆涓€鐐圭殑鎬濊€冮〉闈笂鐪嬩笉鍒扮殑鍔熻兘锛屼篃灏辨槸鎺ュ彛娴嬭瘯浜嗭紝鏁寸悊浜嗕竴浜涙帴鍙f祴璇曠殑闈㈣瘯棰樺笇鏈涘澶у鏈夊府鍔┿€?/span>
绗竴鑺傝銆佹帴鍙f祴璇曞熀纭€
1銆佷粈涔堟槸鎺ュ彛娴嬭瘯锛?/span>
鎺ュ彛娴嬭瘯鏄祴璇曠郴缁熺粍浠堕棿鎺ュ彛鐨勪竴绉嶆祴璇曘€?/span>
鎺ュ彛娴嬭瘯鐨勯噸鐐规槸妫€鏌ユ暟鎹殑浜ゆ崲锛屼紶閫掔殑姝g‘鎬э紝浠ュ強鎺ュ彛闂撮€昏緫渚濊禆鍏崇郴銆?/span>
鎻愪氦鎺ュ彛娴嬭瘯鐨勯噸瑕佹剰涔夛細瀹炵幇寮€鍙戞湡骞惰娴嬭瘯锛屽噺灏戦〉闈㈠眰娴嬭瘯鐨勬繁搴︼紝缂╃煭鏁翠釜椤圭洰鐨勬祴璇曞懆鏈熴€?/span>
2銆佹垜浠祴璇曠殑鎺ュ彛灞炰簬鍝竴绫伙紵
鈶犮€佹湇鍔″櫒鎺ュ彛锛堝熀浜嶩TTP鍗忚鐨勬帴鍙o級
澶у鏁颁汉甯歌鐨勬帴鍙f祴璇曪紝閫氬父鏄?B/S鏋舵瀯锛岀敱瀹㈡埛绔紙娴忚鍣級璋冪敤锛屾垨妯℃嫙瀹㈡埛绔紙娴忚鍣級璋冪敤鏈嶅姟鍣ㄦ彁渚涚殑璇锋眰鎺ュ彛锛岀敱鏈嶅姟鍣ㄥ畬鎴愬鐞嗗苟杩斿洖涓€涓簲绛旂殑杩囩▼銆?/span>
渚嬪锛歐ebservice鎺ュ彛锛宧ttp鎺ュ彛锛宩ms鎺ュ彛锛宧essian鎺ュ彛銆?/span>
鈶°€丠TTP鎺ュ彛浼犻€掓暟鎹渶甯哥敤鐨勬柟寮忥細
Get鏂瑰紡鏄粠鏈嶅姟鍣ㄤ笂鑾峰彇鏁版嵁锛涘湪鍋氭暟鎹煡璇㈡椂锛屽缓璁敤Get鏂瑰紡锛涘锛氬晢鍝佷俊鎭帴鍙c€佹悳绱㈡帴鍙c€佸崥瀹㈣瀹㈡帴鍙g瓑銆?/span>
Post鏂瑰紡鏄悜鏈嶅姟鍣ㄤ紶閫佹暟鎹?锛涘湪鍋氭暟鎹坊鍔犮€佷慨鏀规垨鍒犻櫎鏃讹紝寤鸿鐢≒ost鏂瑰紡 锛涘锛氬井鍗氬浘鐗囦笂浼犲浘鐗囨帴鍙c€佺櫥褰曟敞鍐屾帴鍙g瓑銆?/span>
3銆佹帴鍙h姹傛祦绋?/span>
4銆佹帴鍙h姹傚弬鏁板垎鏋愶細
*璇锋眰鍙傛暟蹇呭~椤广€佸彲閫夐」
*杈撳叆鍚堟硶銆侀潪娉曞弬鏁?/span>
*璇锋眰鍙傛暟杈圭晫鍊?/span>
5銆佹帴鍙e搷搴旂粨鏋滐細
*瀵瑰紓甯歌姹傜殑澶勭悊
*璇锋眰澶寸殑澶勭悊
*瀛樺湪涓氬姟鍏宠仈
*娑夊強鏁版嵁搴撲氦浜掔殑
*缁撴瀯
*鑺傜偣鍊兼湁鏁堟€?/span>
*鍒楄〃缁撴瀯鎺掑簭
6銆丠TTP鎺ュ彛娴嬭瘯鐨勭被鍨?/span>
GET璇锋眰鏃犲弬鏁?/span>
GET璇锋眰鏈夊弬鏁?/span>
POST璇锋眰
7銆佹帴鍙f祴璇曠敤渚嬬紪鍐欒鐐癸細
* 娴嬭瘯姣忎釜鍙傛暟绫诲瀷涓嶅悎娉曠殑鎯呭喌(绫诲瀷涓嶅悎娉曞鏄撻仐婕廚ULL鍨?
* 娴嬭瘯姣忎釜鍙傛暟鍙栧€艰寖鍥翠笉鍚堟硶鐨勬儏鍐?/span>
* 娴嬭瘯鍙傛暟涓虹┖鐨勬儏鍐?/span>
* 娴嬭瘯鍙傛暟鍓嶅悗鍙板畾涔夌殑涓€鑷存€?/span>
* 娴嬭瘯姣忎釜鍙傛暟鐨勪笂涓嬮檺(杩欓噷瀹规槗鍑鸿嚧鍛界殑BUG锛屽鏋滅▼搴忓鐞嗕笉褰擄紝鍙兘瀵艰嚧宕╂簝)
* 濡傛灉涓や釜璇锋眰鏈変弗鏍肩殑鍏堝悗椤哄簭锛岄渶瑕佹祴璇曡皟杞『搴忕殑鎯呭喌
8銆佹帴鍙f祴璇曠殑姝ラ锛?/span>
1锛夎姹傛帴鍙?/span>
2锛夎幏鍙栬繑鍥炲€?/span>
3锛夋柇瑷€锛氬垽鏂疄闄呯粨鏋滄槸鍚︿笌棰勬湡鐩稿悓
锛堟祴璇曠殑鏃跺€欎笉鍙互寮€浠g悊鎶撳寘杞欢锛?/span>
9銆佹帴鍙f祴璇曞疄渚嬭瑙o紙PostMan鐨勪娇鐢級
(chrome涓畨瑁卝sonview锛?/span>
(chrome涓畨瑁卲ostman)
涓€涓€熷彛璇锋眰闇€瑕佽缃細璇锋眰URL锛岃姹傛柟娉曪紝璇锋眰澶达紝璇锋眰鍙傛暟
璇存槑锛欸ET璇锋眰鐨勫弬鏁板湪URL閾炬帴涓婏紝鎵€浠ワ紝GET璇锋眰鐨勮姹傚ご涓庤姹傚弬鏁板鍦ㄦ帴鍙f枃妗d腑鏃犵壒鍒0鏄庢椂锛屽彲浠ヤ笉濉€?/span>
濉啓璇锋眰銆佸弬鏁?/span>
Tests涓坊鍔犳柇瑷€
Save as淇濆瓨
鍒涘缓collection锛堣仛闆嗐€侀泦鍚堬級
宸︿晶鐐瑰嚮collection-RUN
鐐瑰嚮start test 鍙充晶鍙互鐪嬪埌杩愯缁撴灉
鍛戒护琛岃繍琛岄泦鍚堬紙鍏堜繚瀛橈紝鍚庡畨瑁卬ewman锛?/span>
1锛塆ET鏃犲弬鏁帮細
鍙渶楠岃瘉鐘舵€佺爜鏄惁涓?00
鎴栬€呰繑鍥炲€间腑鐨勬煇涓壒瀹氬瓧娈电殑鏍¢獙errno: 0
浠ヤ紬绛逛骇鍝佽缁嗗垪琛ㄤ负鍒?/span>
http://api.zhongchou.cn/deal/list?v=1
鍦╟hrome涓煡鐪嬭繑鍥炵殑鏍蜂緥
鍏堝湪postman涓暀濡備綍杩涜鎺ュ彛娴嬭瘯锛堢晫闈㈠寲宸ュ叿鐨勬搷浣滐級
鍐嶇敤Python瀹炵幇浠g爜杩涜鎺ュ彛娴嬭瘯锛堢被鍜屽璞$殑璁茶В锛屽畨瑁卹equest鍖咃級
2锛塆ET鏈夊弬鏁帮細
楠岃瘉杩斿洖鐨勭姸鎬佺爜涓?00
楠岃瘉榛樿鍊糲ount==20
楠岃瘉榛樿鍊約tart==0
楠岃瘉涔︾殑鏁伴噺==20
楠岃瘉books涓寘鍚叧閿瓧鈥滃皬鐜嬪瓙鈥?/span>
浠ヨ眴鐡e紑鍙戣€卆pi涓轰緥
鎼滅储鍥句功锛?/span>
鍙傛暟 鎰忎箟 澶囨敞
q 鏌ヨ鍏抽敭瀛?q鍜宼ag蹇呭~鍏朵竴
tag 鏌ヨ鐨則ag q鍜宼ag蹇呭~鍏朵竴
start 鍙栫粨鏋滅殑offset 榛樿涓?
count 鍙栫粨鏋滅殑鏉℃暟 榛樿涓?0锛屾渶澶т负100
鑴氭湰锛?/span>
//楠岃瘉杩斿洖鏁版嵁涓寘鍚叧閿瓧
tests["楠岃瘉response涓寘鍚?灏忕帇瀛?] = responseBody.has("灏忕帇瀛?);
//楠岃瘉杩斿洖鐨勭姸鎬佺爜鏄惁涓?00
tests["Status code is 200"] = responseCode.code === 200;
//楠岃瘉start=0&count=20
//楠岃瘉start=0
var jsonData = JSON.parse(responseBody);
var b_count = jsonData.count; //瀹氫箟鍙橀噺b_count
tests["start"] = jsonData.start === 20;
//楠岃瘉count=20
tests["count"] = jsonData.count === 20;
//楠岃瘉杩斿洖鐨勫浘涔﹀垪琛ㄩ暱搴︿负榛樿鍊?/span>
tests["鍥句功鍒楄〃闀垮害涓洪粯璁ゅ€?0"] = jsonData.count === 20;
tests["鍥句功鍒楄〃闀垮害涓洪粯璁ゅ€间负b_count"] = jsonData.count === b_count;
GET鐨勫弬鏁版槸涓瓧绗︿覆锛孭OST鐨勫弬鏁拌灏佽鍒癏TTP璇锋眰澶撮噷锛屾槸瀛楀吀
3锛塒OST璇锋眰
楠岃瘉
浠ョ櫥褰曚负渚?/span>
http://api.zhongchou.cn/user/login?v=1'
鍙傛暟锛?/span>
'identity':'18311338905','password':'a000000'
鍘熸枃閾炬帴锛?/span>
https://www.cnblogs.com/cheng10/p/9805379.html
鈥斺€斺€斺€斺€斺€斺€? End 鈥斺€斺€斺€斺€斺€斺€?/span>
浜哄憳鎷涜仒 / 宀椾綅鍐呮帹锛?/span>
琛屼笟浜ゆ祦 / 鍔犲叆鈥滆蒋浠舵祴璇曢珮绔汉鎵嶁€濆井淇′氦娴佺兢锛?/span>
璇峰姞缇や富寰俊 wycwyn0711 鎴?nbsp;ninanboy
鍐呭鎶曠锛?/span>
璇峰彂閭 wangpinqing@testin.cn
濡傝兘甯埌浣狅紝涓烘垜浠偣涓?/span>鍦?/span>鐪?/span>鍝?nbsp;
以上是关于骞茶揣锛屾帴鍙f祴璇曢潰璇曢的主要内容,如果未能解决你的问题,请参考以下文章