pytest_ executed by tag

pytest Import 
@ pytest.mark.webtest
DEF test_send_http ():
Pass

@ pytest.mark.apptest
DEF test_devide ():
Pass

@ pytest.mark.android
DEF test_search ():
Pass

@ pytest.mark.ios
DEF test_add ():
Pass

test_plus DEF ():
Pass

-m is a marker
-s display print an internal

pytest -s test_mark.py -m 'not ios' execution flag is not equal to the ios

pytest -s test_mark.py -m ios only the execution flag == ios

pytest -s test_mark.py -m = ios only the execution flag == ios

Guess you like

Origin www.cnblogs.com/QaStudy/p/11563931.html