add httprunner.py

This commit is contained in:
aozhiwei 2018-12-29 19:06:52 +08:00
parent 3464d79af3
commit a435a20d61
2 changed files with 33 additions and 0 deletions

View File

@ -0,0 +1,16 @@
import random
#注册账户
class case101:
def __init__(self):
self.c = 'login'
self.params = {
'account' : '',
'passwd' : '',
'nickname' : '',
'phone' : '',
'sms_auth_code' : '',
}

View File

@ -0,0 +1,17 @@
# -*- coding: utf-8 -*-
import os
import sys
import json
import time
import urllib.parse
import urllib.request
from optparse import OptionParser
def do_test():
req = urllib.request.Request('http://127.0.0.1:9002/webapp/index.php?c=Ops&a=selfChecking1')
data = urllib.request.urlopen(req).readall()
print(data)
while True:
do_test()
time.sleep(.1)