Mailinglist Archive: yast-devel (100 mails)

< Previous Next >
Re: [yast-devel] Change in yast-rake and fragile tests
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


--

Ladislav Slez√°k
Appliance department / YaST Developer
Lihovarsk√° 1060/12
190 00 Prague 9 / Czech Republic
tel: +420 284 028 960
lslezak@xxxxxxxx
SUSE
--
To unsubscribe, e-mail: yast-devel+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: yast-devel+owner@xxxxxxxxxxxx

< Previous Next >
Follow Ups