Reputation: 145
I have testcase. Test case have 10 independent steps. When first step failed, another step not execute.
How i can do to continue test?
example:
with allure.step('Проверка, что после явной отписки освобождаются pullpoint`ы'):
for i in range(0, kMaxPullPoints + 5):
...
with allure.step('Проверка одновременного запроса PullMessages на один адрес подписки'):
cpps = CreatePullPointSubscription
...
with allure.step('Проверка максимального количества подключений клиентов'):
def start_th():
...
Upvotes: 1
Views: 1428
Reputation: 6960
It's common technique called deferred asserts
You need to wrap assert and catch an exception. Or write a python decorator
or just function
.
In python you can do it with try/catch
.
Also, 10 independent steps better to have in different test cases but in the same test suite (if they check the same module for example).
Simple rule 1 test - 1 check.
As for a solution for py.test you can use
http://pythontesting.net/pytest-expect/
Upvotes: 2