Mailinglist Archive: yast-devel (100 mails)

< Previous Next >
Re: [yast-devel] Change in yast-rake and fragile tests
On Fri, 16 Jan 2015 15:24:55 +0100
Ladislav Slezak <lslezak@xxxxxxx> wrote:

Dne 16.1.2015 v 09:50 Arvin Schnell napsal(a):
On Fri, Jan 16, 2015 at 09:43:27AM +0100, Ladislav Slezak wrote:

That commit runs all tests in a single process, the advantages are:

- faster run (almost by factor 10!)

- proper code coverage (before the change every run rewrote the
previous code coverage statistics, at the end the report contained
only the coverage from the last run)

If I have tests in several subdirs do I get the correct coverage?

Yes, it should work correctly.

The only problem is that it obviously works only with the new RSpec
tests, the legacy tests will be ignored in the code coverage. (That's
another reason to get rid of them...)

And as Josef pointed out the code coverage evaluates only *loaded*
files, so if you have a file which does not have any test (and is
never loaded from the other tests) then it won't be taken into
account when computing total code coverage percentage. You can get
false high test coverage...

As a workaround you can force loading all files, like here in the
registration module:

It do not load modules, so I think better one is from bootloader as
bootloader uses old modules:

To unsubscribe, e-mail: yast-devel+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: yast-devel+owner@xxxxxxxxxxxx

< Previous Next >