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

Handle @Test inheritance as Junit 4 does

    • 1
    • 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.

      If you create a base test class and annotate methods with @Test, then inherit it in some other classes and override methods without adding @Test Junit 4 will be able to pickup them and run as tests. Unfortunately Clover will not know that these are tests automatically unless you add @Test to them. I understand that annotations are not inherited in Java and Junit 4 does "some magic" (didn't have time to check exactly what it does) to find them.

      Decide if we want to follow Junit's approach or we stick with Java language specification.

            [CLOV-296] Handle @Test inheritance as Junit 4 does

            Partha added a comment -

            https://support.atlassian.com/browse/CLV-4892

            Please note that in our humble opinion this is not a matter of "deciding whether or not to follow JUnit's approach or [to] stick with Java language specification", because this test case detection is about JUnit 4, i.e. the de-facto Java unit testing standard, and not about general java annotation inheritance.

            See https://support.atlassian.com/browse/CLV-4892 for full report of the issue.

            Partha added a comment - https://support.atlassian.com/browse/CLV-4892 Please note that in our humble opinion this is not a matter of "deciding whether or not to follow JUnit's approach or [to] stick with Java language specification", because this test case detection is about JUnit 4, i.e. the de-facto Java unit testing standard, and not about general java annotation inheritance. See https://support.atlassian.com/browse/CLV-4892 for full report of the issue.

            Maybe it is completely unrelated but have a look to:
            http://forums.atlassian.com/thread.jspa?messageID=257294525&#257294525

            (no overriding in my case at all but still a very weird behaviour with clover enabled)

            Stephane Nicoll added a comment - Maybe it is completely unrelated but have a look to: http://forums.atlassian.com/thread.jspa?messageID=257294525&#257294525 (no overriding in my case at all but still a very weird behaviour with clover enabled)

              Unassigned Unassigned
              pniewiadomski Pawel Niewiadomski (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: