Login  Register

Re: How coverage is computed with SmalltalkCI and coverall

Posted by Stéphane Ducasse on Dec 20, 2020; 6:52pm
URL: https://forum.world.st/How-coverage-is-computed-with-SmalltalkCI-and-coverall-tp5125502p5125512.html

Ok I could not see the MW or methods as object use but now I get it.
So the granularity is already good.

I would really like the support for coverage in Pharo ecosystem and not only on build system.
I would really like that we push tests to the next level :).

S

On 20 Dec 2020, at 19:08, Benoît Verhaeghe <[hidden email]> wrote:

First, configuration looks for classes and packages ( look at .smalltalk.ston file )
Second, you take all the methods inside the classes and packages. 
If a method is an extension ( for instance, method A of class C is under package P. But class C is under package P2), then select all the methods of the class of the method ( this logic is under discussion in two issues of SmallTalkCI. 

Third, SmallTalkCI wraps each method ( install a wrapper in the method's class that is called instead of the real method ). 
When a wrapper is called, marks a Boolean to true, and calls the original method.

Finally, the coverage is the number of covered methods marked as true compare to the total number of covered method. 

( Note : the wrapping is not done using reflectivity whereas it can be a good idea ? )



Le dim. 20 déc. 2020 à 18:29, Stéphane Ducasse <[hidden email]> a écrit :
Thanks I could not find it. 
I read the code and it is still unclear what is the logic. I could not figure out what we get lines here.

I would like to resurrect the AST interpreter to get some information on AST level coverage.
What is see is that so far this is a heuristic that is used in SmalltalkCI. 

S. 

On 20 Dec 2020, at 13:27, Gabriel Cotelli <[hidden email]> wrote:


On Sun, Dec 20, 2020, 05:44 Stéphane Ducasse <[hidden email]> wrote:
Hi

I would like to know exactly how the test coverage is computed.
I read all the code of SmalltalkCi and I could not find it. 

S. 
--------------------------------------------
Stéphane Ducasse
03 59 35 87 52
Assistant: Aurore Dalle 
FAX 03 59 57 78 50
TEL 03 59 35 86 16
S. Ducasse - Inria
40, avenue Halley, 
Parc Scientifique de la Haute Borne, Bât.A, Park Plaza
Villeneuve d'Ascq 59650
France


--------------------------------------------
Stéphane Ducasse
03 59 35 87 52
Assistant: Aurore Dalle 
FAX 03 59 57 78 50
TEL 03 59 35 86 16
S. Ducasse - Inria
40, avenue Halley, 
Parc Scientifique de la Haute Borne, Bât.A, Park Plaza
Villeneuve d'Ascq 59650
France


--------------------------------------------
Stéphane Ducasse
03 59 35 87 52
Assistant: Aurore Dalle 
FAX 03 59 57 78 50
TEL 03 59 35 86 16
S. Ducasse - Inria
40, avenue Halley, 
Parc Scientifique de la Haute Borne, Bât.A, Park Plaza
Villeneuve d'Ascq 59650
France