6 Replies Latest reply on Jun 5, 2008 9:03 AM by jmesnil

    unit test code coverage

    ataylor

      I've added EMMA (a code coverage tool) so we can see how much coverage we are getting with the unit tests.

      To run:

      ant emma


      you'll find the report under tests/build/reports/emma

        • 1. Re: unit test code coverage
          ataylor

          Our current coverage is:

          class 70%
          method 50%
          block 48%
          line 50%

          we should aim for the following, wdyt?

          class 100%
          method 70%
          block 80%
          line 80%

          • 2. Re: unit test code coverage
            timfox

            I suspect you haven't included the old tests?

            • 3. Re: unit test code coverage
              ataylor

              no I haven't. I thought it would be good to start with just the unit tests. The target can easily be changed if needed.

              • 4. Re: unit test code coverage
                jmesnil

                that's interesting: the code coverage using the unit tests shows that we go through some of our JMS code.
                I'll check if it is not the sign of hidden dependencies to the JMS code in the core code.

                btw, shouldn't we take the opportunity now we've released JBM 2.0 alpha to split our source code between the core and the jms layer?
                If we do this split, the compiler can check that we don't introduce a dependency between from JMS to the core code quite easily.

                • 5. Re: unit test code coverage
                  timfox

                  Well the code is already split in terms of packages.

                  But building with a different target (which is what I think you meant) is a good idea.. go for it :)

                  • 6. Re: unit test code coverage
                    jmesnil

                     

                    "timfox" wrote:

                    But building with a different target (which is what I think you meant) is a good idea.. go for it :)


                    ok, I'll create 2 targets: compile-core & compile-jms and refactored the classpaths for this 2 targets (e.g. j2ee jar is not required to compile-core)