import pytest
name1=1
name2=2
@pytest.mark.parametrize("loginname", [name1, name2])
class Test_demo():
def test_demo(self,loginname):
assert name1 == 1
assert name2 == 2
pytest.main(['-v', 'test_demo.py', '--html=./report/test_report.html']) # 报告里面更详细可以看到返回的text
报告截图