Commit 9b071ede9df150d075a2a1711fca81eab49f1e52

Authored by lixi
1 parent 924abac6

更新文件

testcase/hg/createBatch/test_createBatch.py 0 → 100644
  1 +import sys,os
  2 +#windows的脚本路径位置
  3 +# sys.path.extend(['E:\\PycharmWorkspace\\test-scripts'])
  4 +#liunx的脚本路径位置
  5 +sys.path.extend(['/usr/jenkins/workspace/辅助脚本-创建交易单simple'])
  6 +from commons.MySession import hg
  7 +from commons.basic.createAndTrade import createAndTrade
  8 +from testcase.hg.createBatch.tmp_d import d
  9 +from testcase.hg.createBatch.tmp_t import t
  10 +create = createAndTrade()
  11 +# path = os.path.dirname(os.path.abspath(sys.argv[0]))
  12 +#查看文件有效路径
  13 +# print(sys.path)
  14 +
  15 +
  16 +# print(type(d),type(t))
  17 +print("\n开始运行订单创建脚本...\n")
  18 +
  19 +
  20 +#打印第三方请求json市场和请求次数
  21 +print("请求参数={} 请求次数={}".format(d,t))
  22 +
  23 +
  24 +#根据用户参数进行请求
  25 +if d!=None :
  26 + for i in range(t):
  27 + body = d
  28 + print("创建订单,第{}次请求,请求body={}".format(i+1,body))
  29 + re = hg.post(url = create.url, headers = create.header, json = body)
  30 + print(re.json())
  31 +
  32 +
... ...
tmp_d.py renamed to testcase/hg/createBatch/tmp_d.py
tmp_t.py renamed to testcase/hg/createBatch/tmp_t.py
testcase/hg/createTradingOrder/test_createTradingOrder.py
... ... @@ -5,8 +5,8 @@ import sys,os
5 5 sys.path.extend(['/usr/jenkins/workspace/辅助脚本-创建交易单simple'])
6 6 from commons.MySession import hg
7 7 from commons.basic.createAndTrade import createAndTrade
8   -from tmp_d import d
9   -from tmp_t import t
  8 +from testcase.hg.createTradingOrder.tmp_d import d
  9 +from testcase.hg.createTradingOrder.tmp_t import t
10 10 create = createAndTrade()
11 11 # path = os.path.dirname(os.path.abspath(sys.argv[0]))
12 12 #查看文件有效路径
... ...
testcase/hg/createTradingOrder/tmp_d.py 0 → 100644
  1 +d={"1":1}
0 2 \ No newline at end of file
... ...
testcase/hg/createTradingOrder/tmp_t.py 0 → 100644
  1 +t=3
0 2 \ No newline at end of file
... ...