-
-
Notifications
You must be signed in to change notification settings - Fork 161
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
Show output when command fails with "fail_on_error" #335
Conversation
Sounds a like a very good idea. I had the same situation myself more than once. Let me think about the implementation a bit. |
Just some of my thoughts, no need to implement this. Will come back during the next couple of days and give you proper feedback.
|
I agree with all your points. Since I'm not familiar with the "announcer" concept and its configurability I can't say for sure what's the best way. I understand the "activate" directives can only be used to enable an announcer channel, but never to disable one. So they should not be in conflict with this, where we also only enable the channels? A configuration for this sounds reasonable. I think it would be nice if this feature was enabled by default, as it's quite helpful, especially for beginners. But not sure if that would be considered a "breaking" change, and what constraints you have in that regard? |
I would just follow my gut feeling here. I would consider this a breaking change. I also added another idea I had to my previous post. Maybe I makes more sense to just change the matchers to output more information - not the full stderr/stdout but say 10, 25, 50 or 100 lines. That feels a bit more appropriate than re-use the announcer for this. But I'm stil not sure, what's the best way. I will come back during the next week. |
Ok. I think I've an idea about how we can solve this in a quite general manner.
With those suggestions below I hope to make the code look the same like the existing one
|
@njam Are you still interested to make that addition to |
@dg-ratiodata VERY interested! Also VERY sorry for the delay. I will try to to work on it this weekend! |
Great! |
671ce30
to
a2a5901
Compare
Thank you very much for the explanations! I guess it takes you probably more time to explain as if you would just implement it. Much appreciated! I pushed a new commit. I wasn't sure about the contract for Regarding the feature test - I'm now activating |
Looks very good!
You're right with that. Allow any channel.
Thanks. Two last things and then we're good to go.
|
a2a5901
to
e95adeb
Compare
""" | ||
And a file named "features/step_definitions.rb" with: | ||
""" | ||
Aruba.configure do |config| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mmmh... I would use a Before
-hook here.
The configure
-syntax should go to features/support/aruba.rb
. That would be another example. I thought about adding such an example, too. But that would mean, that we need to do that for all other configuration options as well. I don't think it's worth the effort. Just change it to Before
. That should be enough.
There's also a general section about configuration that can be found here.
e95adeb
to
785254b
Compare
Oh! 💡 |
Now I'm appending to |
Then I successfully run `cucumber` | ||
Then the output should contain: | ||
""" | ||
The value is "[:foo, :bar]" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this work on ruby 1.8.7? I think this [:foo, :bar]
caused a failing test in one of the previous builds.
Forget about this comment, I didn't see the .inspect
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
smuggled it in ;)
Ah, and please rebase. I pushed some commits this morning to fix an issue. |
785254b
to
abee6c7
Compare
@dg-ratiodata wdyt? |
Show output when command fails with "fail_on_error"
I think we're good to go! Merged. Thanks a lot @njam for your contribution! Great work. |
FYI: We're now using your code in |
Cool cool, looking forward to use it as well. Thanks again for the assistance! |
I released your changes with aruba 0.13.0 a couple of minutes ago. |
Happy New Year!
When testing some long-running flaky commands it can be quite difficult to understand what is causing a command to fail.
I think it could be useful to show the command's output if it failed unexpectedly.
This might be completely the wrong way of accomplishing that.
Wdyt in general of the idea?