unittest-A接口的返回结果作为B接口的入参(设置全局变量)

在A接口用例中设置全局变量:

globals()["a"] = "用例A的返回结果"

在B接口用例中使用全局变量:

b = globals()["a"]

获取当前位置所有全局变量:print(globals())

猜你喜欢

转载自www.cnblogs.com/wang-mengmeng/p/11305003.html
今日推荐