Code coverage for new code

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Code coverage for new code

satishKaRohini
Hi,
I want to know if there is any option through which I can see code coverage for new code for the entire duration since start of development.
I understand I can achieve this by using different views and setting a large enough values for the differential period. The problem with this is that I have a number of parallel projects ith different start dates. Thus I would need to set up a very long period to cover all the projects(as this property is not at project level but at sonarcobe level). This may impact the peformance of server storing sonar stats.

This if there is a way I can configure that I get to see the code coverage for new code since project start then it will be helpful and efficient.

Also I want to know if having a large differential period means large space taken by sonar artifacts. If it is so then it may seriously impact my server's performance. If it is so then I would like to know recommended value I should set for differential period. I have multiple projects(in excess of 20) live at same time and also the single project itself is pretty huge

Thanks,
Satish
Reply | Threaded
Open this post in threaded view
|

Re: Code coverage for new code

David RACODON
Hi Satish,

I want to know if there is any option through which I can see code coverage
for new code for the entire duration since start of development.

I'm not sure to understand your need. By "start of development", you mean "since the day you wrote the first line of code"? If so, it is the code coverage metric as all code is new since start of development.

Regards,

David 

On Fri, Oct 31, 2014 at 8:51 AM, satishKaRohini <[hidden email]> wrote:
Hi,
I want to know if there is any option through which I can see code coverage
for new code for the entire duration since start of development.
I understand I can achieve this by using different views and setting a large
enough values for the differential period. The problem with this is that I
have a number of parallel projects ith different start dates. Thus I would
need to set up a very long period to cover all the projects(as this property
is not at project level but at sonarcobe level). This may impact the
peformance of server storing sonar stats.

This if there is a way I can configure that I get to see the code coverage
for new code since project start then it will be helpful and efficient.

Also I want to know if having a large differential period means large space
taken by sonar artifacts. If it is so then it may seriously impact my
server's performance. If it is so then I would like to know recommended
value I should set for differential period. I have multiple projects(in
excess of 20) live at same time and also the single project itself is pretty
huge

Thanks,
Satish




--
View this message in context: http://sonarqube.15.x6.nabble.com/Code-coverage-for-new-code-tp5029610.html
Sent from the SonarQube Users mailing list archive at Nabble.com.

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

    http://xircles.codehaus.org/manage_email





--
David RACODON
Reply | Threaded
Open this post in threaded view
|

Re: Code coverage for new code

satishKaRohini
Hi David,
All my projects are on existing code base.
My projects are typically of 1 yr. By start of development I mean, since the day I started working on the project(on the existing codebase)
Thus if the project started on 1 aug 14, I want to capture the stats starting from that date.

Thanks,
Satish
Reply | Threaded
Open this post in threaded view
|

Re: Code coverage for new code

David RACODON
All my projects are on existing code base.
My projects are typically of 1 yr. By start of development I mean, since the
day I started working on the project(on the existing codebase)
Thus if the project started on 1 aug 14, I want to capture the stats
starting from that date.

OK, got it now.

Set one of the global differential periods to "baseline".
Then, for each of your projects:
  1. Go to Project Configuration > History
  2. Find the snapshot that corresponds to your baseline and set the version to "baseline"
  3. Run another analysis of your project
Does it answer your use case?


Also I want to know if having a large differential period means large space
taken by sonar artifacts.

The answer is no. 

David

On Fri, Oct 31, 2014 at 12:48 PM, satishKaRohini <[hidden email]> wrote:
Hi David,
All my projects are on existing code base.
My projects are typically of 1 yr. By start of development I mean, since the
day I started working on the project(on the existing codebase)
Thus if the project started on 1 aug 14, I want to capture the stats
starting from that date.

Thanks,
Satish




--
View this message in context: http://sonarqube.15.x6.nabble.com/Code-coverage-for-new-code-tp5029610p5029633.html
Sent from the SonarQube Users mailing list archive at Nabble.com.

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

    http://xircles.codehaus.org/manage_email





--
David RACODON
Reply | Threaded
Open this post in threaded view
|

Re: Code coverage for new code

satishKaRohini
Hi David,
Thanks for the information. It does solve the problem. I have only one query: is there anyway I can define globally that I need the differential view with the 1st snapshot instead of going to each project and defining the baseline version there.
I have in excess of 40 projects in sonar and atleast 10 get added every month. Thus if there was a way I can avoid defining the baseline version in every project, it will be helpful.

Thanks,
Satish
Reply | Threaded
Open this post in threaded view
|

Re: Code coverage for new code

David RACODON
Hi Satish,

Thanks for the information. It does solve the problem.

Cool! 

I have only one
query: is there anyway I can define globally that I need the differential
view with the 1st snapshot instead of going to each project and defining the
baseline version there.
I have in excess of 40 projects in sonar and atleast 10 get added every
month. Thus if there was a way I can avoid defining the baseline version in
every project, it will be helpful.

This should be the responsibility of your continuous integration tool.
In some way, you have to automate the first run of SonarQube on your application by setting the version to "baseline". And for the subsequent runs the version will be set to the actual version of your application.

Regards,

On Mon, Nov 3, 2014 at 7:43 AM, satishKaRohini <[hidden email]> wrote:
Hi David,
Thanks for the information. It does solve the problem. I have only one
query: is there anyway I can define globally that I need the differential
view with the 1st snapshot instead of going to each project and defining the
baseline version there.
I have in excess of 40 projects in sonar and atleast 10 get added every
month. Thus if there was a way I can avoid defining the baseline version in
every project, it will be helpful.

Thanks,
Satish




--
View this message in context: http://sonarqube.15.x6.nabble.com/Code-coverage-for-new-code-tp5029610p5029664.html
Sent from the SonarQube Users mailing list archive at Nabble.com.

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

    http://xircles.codehaus.org/manage_email





--
David RACODON