【发布时间】:2019-11-12 01:26:05
【问题描述】:
我正在重构一些经常失败的 e2e 测试。可能是因为我永远无法确定第 1 步以及第 2 步和第 3 步中编写的资源。
有一种严格的逻辑链,但每个测试都不是原子的。我不是在寻找特定的 python 风格建议(但我很乐意就如何最好地使用 pytest 进行端到端测试提出一些建议)
在端到端测试中是否有创建、验证和删除远程资源的最佳实践?
四个测试执行以下操作:
test_write_credentials_to_cloud #This one always works
test_get_credentials_from_cloud #This is the one that often fails
test_delete_credentials_from_cloud #sometimes this one fails
test_verify_credentials_deleted_in_cloud #this one never is the problem```
【问题讨论】:
标签: python cloud integration-testing pytest