Uploaded image for project: 'Clover'
  1. Clover
  2. CLOV-604

Make selecting excludes/includes a lot simpler

    • Icon: Suggestion Suggestion
    • Resolution: Fixed
    • 2.6 M1, 2.6
    • CIJ Plugin
    • None
    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

      At the very least, provide an example of the current way to exclude or include a single package from being instrumented.

      Ideally, a user could select one or more modules to have clover enabled.
      Similarly, the includes/excludes text boxes should be augmented with a File Chooser, or Package Tree Browser to make selecting a package as easy as possible.

      Is it possible to put Clover in the Context Menu of the IDEA Package Explorer so that includes/excludes can be set from there as well?

      Watching a new user trying to configure includes/excludes using the current UI is very revealing.

            [CLOV-604] Make selecting excludes/includes a lot simpler

            I know this issue is resolved already, but I couldn't help commenting anyway.

            I love the new includes/excludes. I used it today and checked out the Ant patternset it created - there is no way I would have figured out the right value to set, plus it was just so easy to right click and exclude a boatload of autogenerated classes rather than having to think about what syntax to (try and) use.

            Thanks so much guys

            Kate Ellingburg added a comment - I know this issue is resolved already, but I couldn't help commenting anyway. I love the new includes/excludes. I used it today and checked out the Ant patternset it created - there is no way I would have figured out the right value to set, plus it was just so easy to right click and exclude a boatload of autogenerated classes rather than having to think about what syntax to (try and) use. Thanks so much guys

            The solution is still ant-glob-pattern - oriented.
            Changing (optionally) to more project-tree oriented needs a separate JIRA

            SlawekA (Inactive) added a comment - The solution is still ant-glob-pattern - oriented. Changing (optionally) to more project-tree oriented needs a separate JIRA

            SlawekA (Inactive) added a comment - - edited

            Following stuff needs to be added:

            • mark just-excluded files as dirty instead of scheduling immediate rebuild
            • right-click action for module exclusion
            • add exclude action to Coverage Explorer View

            Created CIJ-301 for excluding 100% covered classes from the view only

            SlawekA (Inactive) added a comment - - edited Following stuff needs to be added: mark just-excluded files as dirty instead of scheduling immediate rebuild right-click action for module exclusion add exclude action to Coverage Explorer View Created CIJ-301 for excluding 100% covered classes from the view only

            Nick added a comment -

            I should have deleted my last comment above, instead of just UPDATING it.

            What is the purpose of excluding 100% covered classes?

            To remove them from the Coverage Explorer, so a testing session can focus on just a few dedicated classes or packages. On clarification with Kate however, she doesn't actually want to exclude them from Clover. So ignore that. Also, she can sort the files in the CoverageExplorer to achieve mostly what she wants.

            Maybe this should be done automatically?

            Nope. Don't worry about it.

            The includes/excludes in the Package Explorer is awesome! Kate == very excited!

            Nick added a comment - I should have deleted my last comment above, instead of just UPDATING it. What is the purpose of excluding 100% covered classes? To remove them from the Coverage Explorer, so a testing session can focus on just a few dedicated classes or packages. On clarification with Kate however, she doesn't actually want to exclude them from Clover. So ignore that. Also, she can sort the files in the CoverageExplorer to achieve mostly what she wants. Maybe this should be done automatically? Nope. Don't worry about it. The includes/excludes in the Package Explorer is awesome! Kate == very excited!

            There is still value in having the context menus, BTW.

            I mean, if it can be done in the normal Project Explorer it's probably good to do it in the Coverage Explorer too even if it's not how Kate does it.

            Michael Studman (Inactive) added a comment - - edited There is still value in having the context menus, BTW. I mean, if it can be done in the normal Project Explorer it's probably good to do it in the Coverage Explorer too even if it's not how Kate does it.

            Requirements gathering FAIL (not directed at anyone in particular). This issue seems to have started out as "exclude from instrumentation" and is now including "exclude in Coverage Explorer if condition X is met". Better we caught this now than later, of course.

            I think I misunderstood. Are you saying that there's still value in the context menus but just not in the Coverage Explorer?

            Exclusion for instrumentation shouldn't be necessary just for certain classes of, er, classes being excluded / included in the Coverage Explorer. Clover-for-Eclipse will filter out classes with 100% coverage via a toggle button in the toolbar. I suggest you do it that way.

            Michael Studman (Inactive) added a comment - - edited Requirements gathering FAIL (not directed at anyone in particular). This issue seems to have started out as "exclude from instrumentation" and is now including "exclude in Coverage Explorer if condition X is met". Better we caught this now than later, of course. I think I misunderstood. Are you saying that there's still value in the context menus but just not in the Coverage Explorer? Exclusion for instrumentation shouldn't be necessary just for certain classes of, er, classes being excluded / included in the Coverage Explorer. Clover-for-Eclipse will filter out classes with 100% coverage via a toggle button in the toolbar. I suggest you do it that way.

            Can I suggest that the grey Clover icon might be less laden with meaning than the red icon?

            Michael Studman (Inactive) added a comment - Can I suggest that the grey Clover icon might be less laden with meaning than the red icon?

            What is the purpose of excluding 100% covered classes?
            Maybe this should be done automatically?

            SlawekA (Inactive) added a comment - What is the purpose of excluding 100% covered classes? Maybe this should be done automatically?

            Nick added a comment - - edited

            UPDATE Kate has just mentioned that this is not how she would use it. So don't bother adding the menu to the Coverage Explorer just yet.

            Another valid use-case however, (one which Kate in fact would use), is to toggle includes/excludes in the Coverage Explorer panel as well:

            During a testing session, Kate likes to exclude classes based on how much coverage they have. e.g. she likes to exclude classes which have coverage of 100% already.
            The decision to exclude a class is most often made when viewing the coverage explorer.

            Nick added a comment - - edited UPDATE Kate has just mentioned that this is not how she would use it. So don't bother adding the menu to the Coverage Explorer just yet. Another valid use-case however, (one which Kate in fact would use), is to toggle includes/excludes in the Coverage Explorer panel as well: During a testing session, Kate likes to exclude classes based on how much coverage they have. e.g. she likes to exclude classes which have coverage of 100% already. The decision to exclude a class is most often made when viewing the coverage explorer.

            Nick added a comment -

            Also - this may be a known bug, basically, if you select "Add includes" on a directory which is already marked as included, the icon changes to red.
            The includes/excludes patterns are still correct though.

            Nick added a comment - Also - this may be a known bug, basically, if you select "Add includes" on a directory which is already marked as included, the icon changes to red. The includes/excludes patterns are still correct though.

            Nick added a comment - - edited

            Slawek - this new feature is looking excellent! Great work!

            We could probably tighten up the wording a little on the actual excludes/includes context menu:

            For a directory context menu, we probably don't need the non-recursive option?
            We could just have the following options, worded like so:

            • Include all files in: com/cenqua/clover/types
            • Exclude all files: com/cenqua/clover/types
            • Edit Settings

            Both of which would add the com/cenqua/clover/types/** includes/excludes pattern.

            For a single file, you would then have:

            • Include file: com/cenqua/clover/types/Clover.java
            • Exclude file: com/cenqua/clover/types/Clover.java
            • Edit Settings

            When a user is looking at that menu, they don't really want to think about Ant Globs. Having the Edit Settings item at the bottom, then gives them a very easy way to go in and tweak the excludes/includes if need be.

            Kate - we will get you a version to try ASAP with these simplifications made.

            P.S. By making all includes/excludes recursive, we wouldn't to do deal with this case:

            By looking at the unexpanded tree, you can't see that the remote package is actually included.

            Nick added a comment - - edited Slawek - this new feature is looking excellent! Great work! We could probably tighten up the wording a little on the actual excludes/includes context menu: For a directory context menu, we probably don't need the non-recursive option? We could just have the following options, worded like so: Include all files in: com/cenqua/clover/types Exclude all files: com/cenqua/clover/types Edit Settings Both of which would add the com/cenqua/clover/types/** includes/excludes pattern. For a single file, you would then have: Include file: com/cenqua/clover/types/Clover.java Exclude file: com/cenqua/clover/types/Clover.java Edit Settings When a user is looking at that menu, they don't really want to think about Ant Globs. Having the Edit Settings item at the bottom, then gives them a very easy way to go in and tweak the excludes/includes if need be. Kate - we will get you a version to try ASAP with these simplifications made. P.S. By making all includes/excludes recursive, we wouldn't to do deal with this case: By looking at the unexpanded tree, you can't see that the remote package is actually included.

            Nick added a comment -

            Slawek - what can be done in the plugin to alleviate the pain when it comes to including/excluding files/packages/modules for instrumentation?

            What if the coverage view provided a way for users to select files/packages for inclusion and exclusion?
            It would mean a full build with Clover is required, and then another clean build after a file/package was selected however, but would be a lot more user friendly than the current wild-card approach.

            Nick added a comment - Slawek - what can be done in the plugin to alleviate the pain when it comes to including/excluding files/packages/modules for instrumentation? What if the coverage view provided a way for users to select files/packages for inclusion and exclusion? It would mean a full build with Clover is required, and then another clean build after a file/package was selected however, but would be a lot more user friendly than the current wild-card approach.

            I'm currently struggling trying to configure excludes via IDEA. I've even managed to get the "please rebuild database" error in trying to get it to work.

            Even an example in the Clover docs would be good. I'm just trying to exclude a single package from being instrumented.

            Kate Ellingburg added a comment - I'm currently struggling trying to configure excludes via IDEA. I've even managed to get the "please rebuild database" error in trying to get it to work. Even an example in the Clover docs would be good. I'm just trying to exclude a single package from being instrumented.

            Nick added a comment -

            Also, after excludes are modified and rebuild is done, the clover database should also be deleted and regenerated.

            Nick added a comment - Also, after excludes are modified and rebuild is done, the clover database should also be deleted and regenerated.

            Nick added a comment -

            Also, make it possible to exclude entire Modules from Clover instrumentation.

            Nick added a comment - Also, make it possible to exclude entire Modules from Clover instrumentation.

            Nick added a comment -

            Something I just noticed is that the Clover plugin does not respect the excluded files in the Compiler configuration of IDEA.
            This for instance causes the Clover build itself to fail, because the PluginVersionInfo.in files is attempted to be compiled.

            Nick added a comment - Something I just noticed is that the Clover plugin does not respect the excluded files in the Compiler configuration of IDEA. This for instance causes the Clover build itself to fail, because the PluginVersionInfo.in files is attempted to be compiled.

              Unassigned Unassigned
              npellow Nick
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Estimated:
                  Original Estimate - 16h Original Estimate - 16h
                  16h
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 17.5h
                  17.5h