On Fri, 16 Jan 2015 15:24:55 +0100
Ladislav Slezak <[email protected]> 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:
> https://github.com/yast/yast-registration/blob/master/test/spec_helper.rb#L39

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

https://github.com/yast/yast-bootloader/blob/master/test/test_helper.rb#L11

Josef
-- 
To unsubscribe, e-mail: [email protected]
To contact the owner, e-mail: [email protected]

Reply via email to