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

Support for Spring's @ExpectedException annotation

    • Icon: Suggestion Suggestion
    • Resolution: Fixed
    • 3.0
    • Reporting
    • 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.

      If you are using the @ExpectedAnnotation from spring, clover will report 0% code coverage and indicate the tests failed. e.g. the following test case will report no code coverage:

      @Test
      @ExpectedException(Exception.class)
      public void testApp() throws Exception
      {
           App a = new App();
           a.doStuff(); //a.doStuff throws an exception
      }

      Using the JUnit 4.x annotations works and the report will show the test passed and the code coverage will be reported correctly:

      @Test(expected = Exception.class)
      public void testApp() throws Exception
      {
           App a = new App();
           a.doStuff(); //a.doStuff throws an exception
      }

      Would be nice if clover could understand the spring annotations too.

        1. clov-838.zip
          604 kB
          Marek Parfianowicz

            [CLOV-838] Support for Spring's @ExpectedException annotation

            Katherine Yabut made changes -
            Workflow Original: JAC Suggestion Workflow [ 3342324 ] New: JAC Suggestion Workflow 3 [ 3584074 ]
            Status Original: RESOLVED [ 5 ] New: Closed [ 6 ]
            Monique Khairuliana (Inactive) made changes -
            Backlog Order (Obsolete) Original: 20000000
            Workflow Original: New Clover Workflow [ 897987 ] New: JAC Suggestion Workflow [ 3342324 ]
            Issue Type Original: New Feature [ 2 ] New: Suggestion [ 10000 ]
            Status Original: Closed [ 6 ] New: Resolved [ 5 ]
            Piotr Swiecicki made changes -
            Workflow Original: Clover Workflow [ 896263 ] New: New Clover Workflow [ 897987 ]
            Piotr Swiecicki made changes -
            Workflow Original: reviewflow [ 199737 ] New: Clover Workflow [ 896263 ]
            Marek Parfianowicz made changes -
            Status Original: Resolved [ 5 ] New: Closed [ 6 ]
            Marek Parfianowicz made changes -
            Resolution New: Fixed [ 1 ]
            Status Original: Implemented [ 10025 ] New: Resolved [ 5 ]
            Marek Parfianowicz made changes -
            Fix Version/s New: 3.0 [ 14870 ]
            Fix Version/s Original: 2.6.4 [ 15053 ]
            Marek Parfianowicz made changes -
            Attachment New: clov-838.zip [ 64090 ]
            Michael Studman (Inactive) made changes -
            Fix Version/s New: 2.6.4 [ 15053 ]
            Status Original: Open [ 1 ] New: Implemented [ 10025 ]
            Michael Studman (Inactive) made changes -
            Assignee New: Michael Studman [ mstudman ]
            Priority Original: Minor [ 4 ] New: Major [ 3 ]
            Andrew Myers [Atlassian] created issue -

              mstudman Michael Studman (Inactive)
              andrew.myers Andrew Myers [Atlassian]
              Votes:
              2 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: