我正在使用 pytest 運行一些功能測試進行命令行測試。我將測試保存在yml文件中,該文件用于測試配置。我想在yml文件中提供一些可由pytest使用的標記,而不是在測試文件中使用裝飾器方法。例如---test_name: xyztest_type: smokecommand: hello --helpexpected: hello worldassertions: - testResult.actual_command_returnCode == 0 - len(testResult.expected_value_result) != 0 - testResult.expected_value_result[0] == testResult.actual_command_output有沒有一種方法可以在我的 yml 文件中指定標記,而 pytest 可以使用相同的方法來了解它需要運行哪些特定測試?
添加回答
舉報
0/150
提交
取消