You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a step to create data by a way, so if this way failed, I can decide to execute the follow steps to create data by second way, just because second way has some step and DataTable to config, so I can't use try catch on script, And I want to know anyway like try catch on step define?
✨ What's your proposed solution?
eg:
Scenario: Create Create Data
Given Create data by A
Given Create data by B_step1
Given Create data by B_step2
| | | |
| | | |
Given Create data by B_step3
| | | |
| | | |
Given Create data by B_step4
to
Scenario: Create Create Data
Try Create data by A
Catch Create data by B_step1
Catch Create data by B_step2
| | | |
| | | |
Catch Create data by B_step3
| | | |
| | | |
Catch Create data by B_step4
⛏ Have you considered any alternatives or workarounds?
You can store the information about the success or failure to create something in the context of your step definition. Assuming you're using Java, if you have to share state between multiple step definitions you can use DI. For example:
🤔 What's the problem you're trying to solve?
As a step to create data by a way, so if this way failed, I can decide to execute the follow steps to create data by second way, just because second way has some step and DataTable to config, so I can't use try catch on script, And I want to know anyway like try catch on step define?
✨ What's your proposed solution?
eg:
Scenario: Create Create Data
Given Create data by A
Given Create data by B_step1
Given Create data by B_step2
| | | |
| | | |
Given Create data by B_step3
| | | |
| | | |
Given Create data by B_step4
to
Scenario: Create Create Data
Try Create data by A
Catch Create data by B_step1
Catch Create data by B_step2
| | | |
| | | |
Catch Create data by B_step3
| | | |
| | | |
Catch Create data by B_step4
⛏ Have you considered any alternatives or workarounds?
📚 Any additional context?
This text was originally generated from a template, then edited by hand. You can modify the template here.
The text was updated successfully, but these errors were encountered: