-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
ConsoleLauncher should output diff of expected and actual String values #3139
Comments
Potential library to implement this: https://github.com/java-diff-utils/java-diff-utils @carolosf We've briefly discussed this in our team call today and think this would be feasible since We'll have to take a closer look first to decide whether |
If it becomes the default behaviour it might break IDEs and plug-ins - which is why I suggested a totally separate flag. I didn't spend much time on it but I noticed previously that the Bazel plugin for IntelliJ does a regex for "expected but was" and splits the results. Thanks for discussing though - if implemented it would significantly reduce my debugging time! |
@carolosf IDEs and build tools usually do not run tests via |
Team decision: Change |
@carolosf Would you be interested to work on a PR for this? |
Hey @marcphilipp & @carolosf - if ok for you, I'd like to provide a PR for this. Any veto? |
Would love to but I don't have any capacity to work on this in the near future right now. |
I'm not working on this. @marcphilipp Anything to add? |
@bechte Sure, go ahead |
To introduce a new dependency to a library, I assume that I am extending the list in
And with that plus running a build, I am able to add the following to the platform console project:
Questions to the team, FYI: @marcphilipp, @sbrannen
|
With this commit, a dependency to https://github.com/java-diff-utils/java-diff-utils is introduced. java-diff-utils is used to create a diff from the expected and the actual result and report it. See #3139
With this commit, a dependency to https://github.com/java-diff-utils/java-diff-utils is introduced. java-diff-utils is used to create a diff from the expected and the actual result and report it. See #3139
With this commit, a dependency to https://github.com/java-diff-utils/java-diff-utils is introduced. java-diff-utils is used to create a diff from the expected and the actual result and report it. See #3139
With this commit, a dependency to https://github.com/java-diff-utils/java-diff-utils is introduced. java-diff-utils is used to create a diff from the expected and the actual result and report it. See #3139
I have added some questions within the PR #3397. |
As a developer if I am running JUnit tests using the Console Launcher on the command line if two large strings are found to be different and I get "expected:" "but was:" if I want to see what was different I need to copy the strings and manually diff them.
It would be easier if there was --details flag or another flag (I think another flag is a better option) that would show me a diff between the two strings for actionable results. In most cases using an IDE is suitable but in workflows such as Bazel and CI it would be useful if a diff would be displayed.
Apologies if this is already supported didn't find anything obvious in the docs.
The text was updated successfully, but these errors were encountered: