Community
Participate
Working Groups
Build Identifier: M20090917-0800 The JUnit view has a filter to show only failures. It would be nice to have an additional filter (toolbar and menu) that shows only the ignored tests. Otherwise it is very hard to find the ignored tests in a large test suite. Reproducible: Always
> very hard to find the ignored tests in a large test suite For now, you can do a search for references to the 'Ignore' annotation.
True, but this is painful and slow on large code bases. You have to start a new search, and then you have to explore the search results, and next you have to open the file to read the reason in the annotation argument. Very counter-productive. On an other way, having a filter in the JUnit view allowing you to quickly show the ignored tests with the associated reason would be a great benefit!
Hello All, I have implemented this feature and is available in the branch show_ignored_tests at https://github.com/azachar/org.eclipse.jdt.junit4.runtime/tree/show_ignored_tests The feature is based on Branch R4_3_1. Please let me know if there is need any additional work. PS: I would like to provide tests for it as well, but I am not sure, where are similar tests implemented for show failures only. If you can point it out, I will provide tests as well. Best regards, Andrej
(In reply to Andrej Zachar from comment #3) > Hello All, > I have implemented this feature and is available in the branch > show_ignored_tests at > https://github.com/azachar/org.eclipse.jdt.junit4.runtime/tree/ > show_ignored_tests > > The feature is based on Branch R4_3_1. Can you rebase the fix on 'master' and then attach a patch here? Make sure you've added your credentials to the copyright notices. When attaching the patch please state the following: "This contribution complies with http://www.eclipse.org/legal/CoO.php" > PS: I would like to provide tests for it as well, but I am not sure, where > are similar tests implemented for show failures only. If you can point it > out, I will provide tests as well. We don't have UI tests for this.
Hello Dani, I will rebase it and I will let you know as soon as possible. Yes this contribution complies http://www.eclipse.org/legal/CoO.php PS: Are there any other UI tests that I can use as an example one for this particular case? Thank you! Cheers, Andrej
Created attachment 240099 [details] Patch for filtering ignored tests Hello, here is the patch for the filtering of ignored tests against today's master. Cheers, Andrej
Created attachment 240100 [details] Patch for filtering ignored tests against master branch Here is the correct patch.
Created attachment 240147 [details] Patch for filtering ignored tests against master branch with API baseline fixes Hello! I have enabled API checking that was previously ignored and I have fixed some small issues with versions in the java doc. For applying patch it could be easier to use this patch. Also I have set error warning for missing java 1.5 to warning otherwise I was unable to compile it on my computer. I hope it won't be a big deal to skip it. By any chance why it is restricted to error and not just to warning. On a mac it is quite hard to install java 1.5 at this time... Anyway the patch was made from my fork of Luna at https://github.com/azachar/org.eclipse.jdt.ui/tree/master-show-skipped-tests Here is also available branch for backporting to Kepler 4.3.1. if one is interested in: https://github.com/azachar/org.eclipse.jdt.ui/tree/R4_3_1-show-skipped-tests Best regards, Andrej
For the simplicity I have created a pull request https://github.com/eclipse/eclipse.jdt.ui/pull/4 So now it could be quite easy to merge. This time there are no additional changes only the source code. Warnings about the java 1.5 i left untouched.
Hello, In the mean time I have added a new feature: Assumptions failures are shown within the ignored tests. It is still part of the open pull request: https://github.com/eclipse/eclipse.jdt.ui/pull/4 Best regards, Andrej
Hello Andrej, Is the patch mentioned in comment 8 the final patch? Kindly make sure in all the modified files the Copyright year and the contribution details are updated. Go through https://wiki.eclipse.org/JDT_UI/How_to_Contribute before creating a patch. Manju
Hello Manju, the latest code to integrate is located at the open pull request: https://github.com/eclipse/eclipse.jdt.ui/pull/4 So the comment-8 is outdated. Please let me know if this is ok. PS:Contribution is mentioned everywhere, the implementation year is unfortunately 2013. If you want I can change it. No problem. Best regards, Andrej
(In reply to Andrej Zachar from comment #12) > Hello Manju, > the latest code to integrate is located at the open pull request: > > https://github.com/eclipse/eclipse.jdt.ui/pull/4 Kindly attach the latest fix as a patch to this bug. When you attach the latest patch mark the other patches as obsolete. > PS:Contribution is mentioned everywhere, the implementation year is > unfortunately 2013. If you want I can change it. No problem. The Copyright year of all modified files should be updated to the current year. e.g. Copyright (c) 2000, 2014 Also you have to add you details and the bug details under "Contributors:" in each of the modified files. e.g. Andrej Zachar <andrej@chocolatejar.eu> - [JUnit] Add a filter for ignored tests - https://bugs.eclipse.org/bugs/show_bug.cgi?id=298603
Hello Manju, here is the updated (including updated year 2014) patch to download, unfortunately I cannot mark the existing attachment patch as obsolete when I am providing a link like this https://github.com/eclipse/eclipse.jdt.ui/pull/4.patch If you want to see changed files look here https://github.com/eclipse/eclipse.jdt.ui/pull/4/files The patch is based on today's master. Cheers, Andrej PS: Some people provided sucessfully their patches as pull requests via github. I am just wondering - was it just a private initiative? Or this will be a standard way to provide patch too?
(In reply to Andrej Zachar from comment #14) > Hello Manju, > here is the updated (including updated year 2014) patch to download, > unfortunately I cannot mark the existing attachment patch as obsolete when I > am providing a link like this > > https://github.com/eclipse/eclipse.jdt.ui/pull/4.patch > > If you want to see changed files look here > https://github.com/eclipse/eclipse.jdt.ui/pull/4/files > > > The patch is based on today's master. I would prefer a ".patch" file attached to this bug(same as you did in comment 8) and not a link to github.
Created attachment 241808 [details] Add a filter for ignored tests (final) Hello Manju, here is the final patch against today's master :) Best regards, Andrej
Comment on attachment 241808 [details] Add a filter for ignored tests (final) I am unable to apply this patch. On opening the patch in text editor i can see lot of unnecessary texts. To create a clean patch from your development workspace, select the modified files > right click > Team > Create Patch. Once you create it test by applying the same patch on a clean development workspace. Also before creating the patch, compare each of the modified files against head to make sure only necessary changes are part of the file.
Hello Manju, I am just asking myself, in time of tools like git - Do I still need to generate a patch via Eclipse... I have already created the patch via github, but it seems that it doesn't work for you... Isn't it easier to use just git and merge / squish my changes from my repo https://github.com/azachar/org.eclipse.jdt.ui.git branch master-show-skipped-test that is up-to-date with the today's eclipse master? I did this changes a while ago I do not want to make any mistake by creating a wrong patch via eclipse. The change is not just in one plugin or file, so it isn't a simple operation. Also if other people can use pull request directly from github within eclipse jdt ui (https://github.com/eclipse/eclipse.jdt.ui/pulls?direction=desc&page=1&sort=created&state=closed) why it is not possible to do it in my case too? Thank you for your answer. Best regards, Andrej
(In reply to Andrej Zachar from comment #18) > Hello Manju, > I am just asking myself, in time of tools like git - Do I still need to > generate a patch via Eclipse... I have already created the patch via github, > but it seems that it doesn't work for you... > > > Isn't it easier to use just git and merge / squish my changes from my repo > https://github.com/azachar/org.eclipse.jdt.ui.git branch > master-show-skipped-test that is up-to-date with the today's eclipse master? > > I did this changes a while ago I do not want to make any mistake by creating > a wrong patch via eclipse. The change is not just in one plugin or file, so > it isn't a simple operation. > > Also if other people can use pull request directly from github within > eclipse jdt ui > (https://github.com/eclipse/eclipse.jdt.ui/ > pulls?direction=desc&page=1&sort=created&state=closed) why it is not > possible to do it in my case too? JDT did not pull those AFAIK. We either take a patch or a Gerrit change. For more details see http://wiki.eclipse.org/JDT_UI/How_to_Contribute#Contributing_Code
Hello Manju, here is the gerrit patch, I hope it is fine now: https://git.eclipse.org/r/25305 Cheers, Andrej
Hello Manu, I have updated the gerrit patch some time ago, but I am not sure if you are notified about it. So anyway there is a new patch that contains all comments based on your review. I hope that it is fine now. Cheers, Andrej
Created attachment 251956 [details] Patch (In reply to Andrej Zachar from comment #20) > https://git.eclipse.org/r/25305 Attached updated patch based on current master branch. - Bundle version updates were not required, hence removed that. - Updated copyright year, fixed formatting, Javadoc and made some minor changes. Patch looks good and can be merged after checking these points: - Not sure if the following is required in TestViewer.IgnoredOnlyFilter.select(TestElement testElement): !fTestRunSession.isRunning() && testElement.getStatus() == Status.RUNNING; // rerunning - Image for the new tool button (Show Skipped Tests Only): testignored.gif or testassumptionfailed.gif or a new image? Markus, please share your input on the above points.
(In reply to Noopur Gupta from comment #22) > Created attachment 251956 [details] [diff] > Patch Uploaded the patch to Gerrit change: https://git.eclipse.org/r/25305
Gerrit change https://git.eclipse.org/r/25305 was merged to [master]. Commit: http://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/commit/?id=26b94285bfb2729a6716d2969c23f07d1464c95e
The change looked OK, so I pushed it, but then I realized that the "Next/Previous Failed Test" buttons don't work any more when "Show Skipped Tests Only" is enabled. Filed bug 465630 for that.