Quantcast

Analyze of tests sources

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Analyze of tests sources

Arnaud Héritier-2
Hi,

  I don't find a documentation to explain if, using maven and its sonar plugin, tests sources of projects are analyzed and if it can be configured ?

Cheers

Arnaud

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Analyze of tests sources

Olivier Gaudin-2
Hello Arnaud,

This is not currently possible.

Olivier


2011/12/9 Arnaud Héritier <[hidden email]>
Hi,

  I don't find a documentation to explain if, using maven and its sonar plugin, tests sources of projects are analyzed and if it can be configured ?

Cheers

Arnaud


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Analyze of tests sources

Lars K.W. Gohlke
Hi Arnaud,

a work around is to copy the tests sources to another directory (or just
link) and add them to the source directories to be analyzed

It is working fine for me.

On 10.12.2011 11:39, Olivier Gaudin wrote:

> Hello Arnaud,
>
> This is not currently possible.
>
> Olivier
>
>
> 2011/12/9 Arnaud Héritier<[hidden email]>
>
>> Hi,
>>
>>    I don't find a documentation to explain if, using maven and its sonar
>> plugin, tests sources of projects are analyzed and if it can be configured ?
>>
>> Cheers
>>
>> Arnaud
>>
>>
>


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email

lkwg82.vcf (194 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Analyze of tests sources

Freddy Mallet
Yes Lars but the goal is really to apply some dedicated quality rules to unit tests, for instance each unit test should contain at least one assertion. 

In fact this is something that we should start working on for Sonar 2.14. 
-----
Sonar for Continuous Inspection



On Sat, Dec 10, 2011 at 12:37 PM, Lars K.W. Gohlke <[hidden email]> wrote:
Hi Arnaud,

a work around is to copy the tests sources to another directory (or just link) and add them to the source directories to be analyzed

It is working fine for me.


On 10.12.2011 11:39, Olivier Gaudin wrote:
Hello Arnaud,

This is not currently possible.

Olivier


2011/12/9 Arnaud Héritier<[hidden email]>

Hi,

  I don't find a documentation to explain if, using maven and its sonar
plugin, tests sources of projects are analyzed and if it can be configured ?

Cheers

Arnaud





---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Analyze of tests sources

Arnaud Héritier-2
ok, thx.
I wanted to verify as it wasn't documented AFAIK.
No problem for me for now. 
We have enough to do with products sources before to attack tests.

Arnaud

On Sat, Dec 10, 2011 at 3:36 PM, Freddy Mallet <[hidden email]> wrote:
Yes Lars but the goal is really to apply some dedicated quality rules to unit tests, for instance each unit test should contain at least one assertion. 

In fact this is something that we should start working on for Sonar 2.14. 
-----
Sonar for Continuous Inspection



On Sat, Dec 10, 2011 at 12:37 PM, Lars K.W. Gohlke <[hidden email]> wrote:
Hi Arnaud,

a work around is to copy the tests sources to another directory (or just link) and add them to the source directories to be analyzed

It is working fine for me.


On 10.12.2011 11:39, Olivier Gaudin wrote:
Hello Arnaud,

This is not currently possible.

Olivier


2011/12/9 Arnaud Héritier<[hidden email]>

Hi,

  I don't find a documentation to explain if, using maven and its sonar
plugin, tests sources of projects are analyzed and if it can be configured ?

Cheers

Arnaud





---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Analyze of tests sources

cnhappier
In reply to this post by Freddy Mallet
I agree that unit test need some dedicated quality rules. But how about some other rules like method length and duplication also can be applied to test cases.

I think it's more flexible to let the user figure out his own rules for test instead of using different predefined rules to source and tests. Is there any improvement plan for this?

Also, because mocking in very usual in unit test, I don't think "each test should contain at least one assert"
is a very good rules for unit test quality.

Freddy Mallet wrote
Yes Lars but the goal is really to apply some dedicated quality rules to
unit tests, for instance each unit test should contain at least one
assertion.

In fact this is something that we should start working on for Sonar 2.14.
-----
twitter.com/FreddyMallet
Sonar for Continuous Inspection



On Sat, Dec 10, 2011 at 12:37 PM, Lars K.W. Gohlke <[hidden email]> wrote:

> Hi Arnaud,
>
> a work around is to copy the tests sources to another directory (or just
> link) and add them to the source directories to be analyzed
>
> It is working fine for me.
>
>
> On 10.12.2011 11:39, Olivier Gaudin wrote:
>
>> Hello Arnaud,
>>
>> This is not currently possible.
>>
>> Olivier
>>
>>
>> 2011/12/9 Arnaud Héritier<[hidden email]>
>>
>>  Hi,
>>>
>>>   I don't find a documentation to explain if, using maven and its sonar
>>> plugin, tests sources of projects are analyzed and if it can be
>>> configured ?
>>>
>>> Cheers
>>>
>>> Arnaud
>>>
>>>
>>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Analyze of tests sources

Freddy Mallet
Hello, 

See my comments below :

I agree that unit test need some dedicated quality rules. But how about some
other rules like method length and duplication also can be applied to test
cases. 

I think it's more flexible to let the user figure out his own rules for test
instead of using different predefined rules to source and tests. Is there
any improvement plan for this?

Yes the ultimate goal is to be able on each rule to define the scope of the rule : unit test code, production code or both. 

You can comment and vote for http://jira.codehaus.org/browse/SONAR-3748.
 
Also, because mocking in very usual in unit test, I don't think "each test
should contain at least one assert"
is a very good rules for unit test quality.

This depends on the context, so sometimes this rule can be valuable and sometimes not that's why it's so important to fully customize the quality profiles in each company.

Thanks for your feedback,
Freddy



Freddy Mallet wrote
>
> Yes Lars but the goal is really to apply some dedicated quality rules to
> unit tests, for instance each unit test should contain at least one
> assertion.
>
> In fact this is something that we should start working on for Sonar 2.14.
> -----
> twitter.com/FreddyMallet
> Sonar for Continuous Inspection
>
>
>
> On Sat, Dec 10, 2011 at 12:37 PM, Lars K.W. Gohlke &lt;lkwg82@&gt; wrote:
>
>> Hi Arnaud,
>>
>> a work around is to copy the tests sources to another directory (or just
>> link) and add them to the source directories to be analyzed
>>
>> It is working fine for me.
>>
>>
>> On 10.12.2011 11:39, Olivier Gaudin wrote:
>>
>>> Hello Arnaud,
>>>
>>> This is not currently possible.
>>>
>>> Olivier
>>>
>>>
>>> 2011/12/9 Arnaud Héritier&lt;aheritier@&gt;
>>>
>>>  Hi,
>>>>
>>>>   I don't find a documentation to explain if, using maven and its sonar
>>>> plugin, tests sources of projects are analyzed and if it can be
>>>> configured ?
>>>>
>>>> Cheers
>>>>
>>>> Arnaud
>>>>
>>>>
>>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>    http://xircles.codehaus.org/manage_email
>>
>>
>




--
View this message in context: http://sonar.15.n6.nabble.com/Analyze-of-tests-sources-tp3190208p5002817.html
Sent from the Sonar user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Analyze of tests sources

Holmes, Daniel

Daniel

 

From: Freddy Mallet [mailto:[hidden email]]
Sent: Tuesday, September 11, 2012 8:45 AM
To: [hidden email]
Subject: Re: [sonar-user] Re: Analyze of tests sources

 

Hello, 

 

See my comments below :

 

I agree that unit test need some dedicated quality rules. But how about some
other rules like method length and duplication also can be applied to test
cases. 


I think it's more flexible to let the user figure out his own rules for test
instead of using different predefined rules to source and tests. Is there
any improvement plan for this?

 

Yes the ultimate goal is to be able on each rule to define the scope of the rule : unit test code, production code or both. 

 

You can comment and vote for http://jira.codehaus.org/browse/SONAR-3748.

 

Also, because mocking in very usual in unit test, I don't think "each test

should contain at least one assert"

is a very good rules for unit test quality.

 

This depends on the context, so sometimes this rule can be valuable and sometimes not that's why it's so important to fully customize the quality profiles in each company.

 

Thanks for your feedback,

Freddy

 



Freddy Mallet wrote

>
> Yes Lars but the goal is really to apply some dedicated quality rules to
> unit tests, for instance each unit test should contain at least one
> assertion.
>
> In fact this is something that we should start working on for Sonar 2.14.
> -----
> twitter.com/FreddyMallet
> Sonar for Continuous Inspection
>
>
>

> On Sat, Dec 10, 2011 at 12:37 PM, Lars K.W. Gohlke &lt;lkwg82@&gt; wrote:
>
>> Hi Arnaud,
>>
>> a work around is to copy the tests sources to another directory (or just
>> link) and add them to the source directories to be analyzed
>>
>> It is working fine for me.
>>
>>
>> On 10.12.2011 11:39, Olivier Gaudin wrote:
>>
>>> Hello Arnaud,
>>>
>>> This is not currently possible.
>>>
>>> Olivier
>>>
>>>

>>> 2011/12/9 Arnaud Héritier&lt;aheritier@&gt;

>>>
>>>  Hi,
>>>>
>>>>   I don't find a documentation to explain if, using maven and its sonar
>>>> plugin, tests sources of projects are analyzed and if it can be
>>>> configured ?
>>>>
>>>> Cheers
>>>>
>>>> Arnaud
>>>>
>>>>
>>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>    http://xircles.codehaus.org/manage_email
>>
>>
>



--
View this message in context: http://sonar.15.n6.nabble.com/Analyze-of-tests-sources-tp3190208p5002817.html
Sent from the Sonar user mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email

 

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Analyze of tests sources

Freddy Mallet
Hi Daniel,

To be honest, I don't push too much this ticket because I don't see the value of having the number of unit test loc. Indeed this is just a quantitative measure which (I guess) will be directly correlated to another existing measures : the number of unit tests. 

Kind regards,
-----
Sonar for Continuous Inspection



On Tue, Sep 11, 2012 at 4:02 PM, Holmes, Daniel <[hidden email]> wrote:

Daniel

 

From: Freddy Mallet [mailto:[hidden email]]
Sent: Tuesday, September 11, 2012 8:45 AM
To: [hidden email]
Subject: Re: [sonar-user] Re: Analyze of tests sources

 

Hello, 

 

See my comments below :

 

I agree that unit test need some dedicated quality rules. But how about some
other rules like method length and duplication also can be applied to test
cases. 


I think it's more flexible to let the user figure out his own rules for test
instead of using different predefined rules to source and tests. Is there
any improvement plan for this?

 

Yes the ultimate goal is to be able on each rule to define the scope of the rule : unit test code, production code or both. 

 

You can comment and vote for http://jira.codehaus.org/browse/SONAR-3748.

 

Also, because mocking in very usual in unit test, I don't think "each test

should contain at least one assert"

is a very good rules for unit test quality.

 

This depends on the context, so sometimes this rule can be valuable and sometimes not that's why it's so important to fully customize the quality profiles in each company.

 

Thanks for your feedback,

Freddy

 



Freddy Mallet wrote

>
> Yes Lars but the goal is really to apply some dedicated quality rules to
> unit tests, for instance each unit test should contain at least one
> assertion.
>
> In fact this is something that we should start working on for Sonar 2.14.
> -----
> twitter.com/FreddyMallet
> Sonar for Continuous Inspection
>
>
>

> On Sat, Dec 10, 2011 at 12:37 PM, Lars K.W. Gohlke &lt;lkwg82@&gt; wrote:
>
>> Hi Arnaud,
>>
>> a work around is to copy the tests sources to another directory (or just
>> link) and add them to the source directories to be analyzed
>>
>> It is working fine for me.
>>
>>
>> On 10.12.2011 11:39, Olivier Gaudin wrote:
>>
>>> Hello Arnaud,
>>>
>>> This is not currently possible.
>>>
>>> Olivier
>>>
>>>

>>> 2011/12/9 Arnaud Héritier&lt;aheritier@&gt;

>>>
>>>  Hi,
>>>>
>>>>   I don't find a documentation to explain if, using maven and its sonar
>>>> plugin, tests sources of projects are analyzed and if it can be
>>>> configured ?
>>>>
>>>> Cheers
>>>>
>>>> Arnaud
>>>>
>>>>
>>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>    http://xircles.codehaus.org/manage_email
>>
>>
>



--
View this message in context: http://sonar.15.n6.nabble.com/Analyze-of-tests-sources-tp3190208p5002817.html
Sent from the Sonar user mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email

 


Loading...