-
Notifications
You must be signed in to change notification settings - Fork 637
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add flag to execute_steps to print sub-steps #995
Comments
Could you explain why you need such a functionality? |
As I mentioned, right now it is difficult to tell where exactly a scenario failed, because the nested sub-steps don't get printed. You also don't really get "progress updates" while the sub-steps are running. Really I feel it makes little sense for the sub-steps to be treated differently at all. |
If you call a function, you also do not see what other functions are called inside the function body implementation. BUT: Your main pain point is, when an encapsulated step fails. In my opinion, that should be sufficient to understand your own steps where the fault location is. SEE ALSO:
SIDE NOTE: |
No, this does not work because of output capture.
Yes, and it is of no use. First, because
No, because you are passing |
Mmh, after reading this, I think your main problem is probably that all your step-functions have the name NOTE: OTHERWISE: |
No, all our step functions have different names. |
Out of curiosity, how deep is your callstack with
|
We don't normally call |
@rittneje Is there a manual way of doing this, I have a use case and need the same? |
@jenisys is there a flag added for the same? |
@Anurag-Pola |
@jenisys Thank You for your quick reply, is there a possibility to tweak the configuration on my side to do that? |
@Anurag-Pola |
@jenisys I would also love to have that feature. My use case is the following: I have two file with inputs I want to test. For every input of the first file I want to test all inputs of the second file. Lets say the first file has x inputs and the second one y. For every input from for first file i need a expensive setup. That means Scenario Outline does not work since it would create x* y Scenarios, and the expensive setup would run x*y times. Using the before_feature or background does not work either, because every input from file1 requires a different setup. |
Currently, if a step implementation calls
execute_steps
, the resulting sub-steps are not printed, because it callsstep.run
withquiet=True
. Even if that were fixed, it would need to turn off capturing (if it is on), or else those prints would be captured too.Please add an optional parameter to
execute_steps
to allow sub-steps to be printed normally. (Or better yet, a context attribute so we don't have to ensure all test authors call it correctly.) Without this, it can be difficult to understand where exactly a test failed.As a nice-to-have, sub-steps should be indented relative to their parent step when printed.
The text was updated successfully, but these errors were encountered: