web | Java

unittest中如何使用命令执行测试用例?

千锋教育

公司:#贝壳 #顺丰


岗位:#自动化测试工程师


关键字:#unittest框架 #自动化测试框架 #测试执行 一共有三种方式: 


A、通过命令直接运行整个测试模块:python -m unittest test_module1 test_module1; 


B、执行某个模块中的某个测试类:python -m unittest test_module1.TestClass; 


C、执行某个模块中某个测试类下的某个测试方法:python -m unittest test_module1.TestClass.test_method;