Monday, November 30, 2009

EMF and SMM to export code metrics to Sonar and Squale

How to facilitate the integration between code quality measurement tools and code quality reporting tools ?


This is the problem we are faced with at Mia-Software: to address modernization projects, we have developped a lot of parsers creating models of code from which we can compute quality metrics (from COBOL, Natural or VB6 to Smalltalk, C# or Java). But as our customers are interested in getting these metrics in the quality report tool of their choice, we don't want to multiply the development of adhoc bridges (one for each couple "metrics calculator" <-> "report tool")

To reduce the cost of bridging the tools, we chose SMM (Structured Metrics Metamodel) as a pivot. SMM is the OMG/ADM standard for defining metrics related to software and for representing their measurement on existing systems. Its reference EMF implementation can be found in MoDisco, the Eclipse Modeling project focused on discovering models from software assets.

The main classes defined by SMM are quite simple :
- Measure : the definition of an indicator (nb lines of code, cyclomatic complexity, …)
- Scope : the kind of elements on which the indicator can be measured
- Measurand : an element on which an indicator has been measured
- Measurement : the measured value of an indicator
- Observation : who ? how ? when ?
Then, for each measurement tool that we need to integrate with a report tool, we just have to create a SMM model describing the kind of metrics to exchange (instances of Measure and Scope) and a connector to translate the specific export format of the measurement tool to a SMM model containing the measured values (instances of Measurement, Measurand and Scope).

In parallel, we create one generator for each report tool to integrate with. This generator takes the SMM model defining the measures and generates :

• the files declaring the metrics within the report tool
• the files configuring the report tool to integrate the new kind of metrics
• the source code of the component which will import SMM models containing the measurements
At this time we have experimented this approach to import COBOL and VB6 metrics (calculated by Mia-Insight) into the quality report tools Sonar and Squale.

Screenshots : COBOL -> Sonar







Screenshots : COBOL -> Squale







Our conclusion is that SMM fits the need of integration between these kind of tools.

The next step will be the integration of XRadar (suggestions of other report tools are welcome ;-) ).

We also have to solve the problem of metrics aggregation. There are three possibilities :
- aggregation at measurement time
- aggregation in SMM model
- aggregation in report tool
We have already identified pros and cons for each alternative. Depending on the kind of aggregation to perform, experimentation will probabely give an answer !

23 comments:

  1. Nice post . Thanks for the shearing valuable information. I really fiend this type blog. Special thanks to writer.

    Buy Facebook Likes

    ReplyDelete
  2. Nice post . Thanks for the shearing valuable information. I really fiend this type blog. Special thanks to writer. Buy Facebook Likes

    ReplyDelete
  3. My friend mentioned to me your blog, so I thought I’d read it for myself. Very interesting insights, will be back for more!
    buy facebook likes cheap

    ReplyDelete
  4. This comment has been removed by the author.

    ReplyDelete
  5. Thank you for your amazing post.This post is very helpful for everybody. buy-twitter-followers

    ReplyDelete
  6. Awesome Man! I really appreciate it. I'd like to say thank you for sharing this valuable information with us. Take a look this to buy Instagram followers here. Thanks

    ReplyDelete
  7. Hi, Great.. Tutorial is just awesome..It is really helpful for a newbie like me.. I am a regular follower of your blog. Really very informative post you shared here. Kindly keep blogging. If anyone wants to become a Java developer learn from Java Training in Chennai. or learn thru Java Online Training in India . Nowadays Java has tons of job opportunities on various vertical industry.

    ReplyDelete
  8. Coepd - (Center of Excellence for Professional Development) provides Digital Marketing internship program in Hyderabad from industry expert Mentors. We deem in real time practical training, we guide students through real-time project examples and assignments, giving credits for Real-Time Internship in our training course. Further, Coepd provides advanced digital marketing coaching with certifications catering to Corporates, Individuals, and Educational Institutions. Our digital marketing certified mentors guide our learning people through modules of Digital Marketing in an exhaustive manner. Our collaborative ecosystem comprising of Partnerships with Software Companies enables real time digital marketing experience.

    https://coepd.com/DMTraining.html

    ReplyDelete
  9. Really a great post. webdesign is the key to reach visitors heart, thanks for sharing this information with us.
    We do provide SEO Company in Dubai |Top 10 SEO Agency in Dubai

    ReplyDelete
  10. Thanks for updating. Engineering instruction is a must before buying any property. For this reason Environmental site assessment phase 1 & 2 are done. This should be completed before buying any property.

    ReplyDelete
  11. Facebook auto followers of wefbee auto tools helps you to increase unlimited facebook auto followers. You can use wefbee FAF daily to increase your facebook profile followers free and fast and become vip user of fb.

    fastautoliker


    ReplyDelete
  12. Great Article… I love to read your articles because your writing style is too good, its is very very helpful for all of us and I never get bored while reading your article because, they are becomes a more and more interesting from the starting lines until the end.
    Best Devops online Training
    Online DevOps Certification Course - Gangboard

    ReplyDelete
  13. Very well post. This Topic is very good and helpful. I thik that this topic very helpful for us.This article is really very interesting and effective. Thanks for sharing your nice topic.
    Buy facebook followers

    ReplyDelete

  14. It seems you are so busy in last month. The detail you shared about your work and it is really impressive that's why i am waiting for your post because i get the new ideas over here and you really write so well.

    Selenium training in Chennai

    ReplyDelete


  15. NetMatico is the best Digital Marketing Agency Toronto.Netmatico provide varity of services like website design and development,Outsourcing project,contant writing,Search Engine optimization and Digital maketing.

    ReplyDelete
  16. Thank you for sharing such great information with us. I really appreciate everything that you’ve done here and am glad to know that you really care about the world that we live in
    python Course in Pune
    python Course institute in Chennai
    python Training institute in Bangalore

    ReplyDelete
  17. Thank you for some other informative blog. Where else could I get that type of information written in such an ideal means? I have a mission that I’m just now working on, and I have been at the look out for such information. buy Facebook followers

    ReplyDelete