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 !

63 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. This comment has been removed by the author.

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

    ReplyDelete
  4. 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
  5. 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
  6. 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

  7. 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
  8. 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
  9. Attend The Python training in bangalore From ExcelR. Practical Python training in bangalore Sessions With Assured Placement Support From Experienced Faculty. ExcelR Offers The Python training in bangalore.
    python training in bangalore

    ReplyDelete
  10. That was a great message in my carrier, and It's wonderful commands like mind relaxes with understand words of knowledge by information's. devops training in chennai | devops training in anna nagar | devops training in omr | devops training in porur | devops training in tambaram | devops training in velachery





    ReplyDelete
  11. 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.
    java training in chennai

    java training in omr

    aws training in chennai

    aws training in omr

    python training in chennai

    python training in omr

    selenium training in chennai

    selenium training in omr

    ReplyDelete
  12. Found your post interesting to read. I cant wait to see your post soon. Good Luck for the upcoming update. This article is really very interesting and effective, data science online training

    ReplyDelete
  13. I am really enjoying reading your well written articles. It looks like you spend a lot of effort and time on your blog. I have bookmarked it and I am looking forward to reading new articles. Keep up the good work. data science training in Hyderabad

    ReplyDelete
  14. I appreciate this piece of useful information. We are Help of Tradeskill you can learn how to start your export business, We provide you a facility to learn Export Import Business Online For more information visit our site: Import Export Classes Online

    ReplyDelete
  15. When it comes to finding a cheap motorbike shipping company, you'll want to search online for some comparison shopping so that you'll know what companies have the best price for your bike.

    ReplyDelete
  16. We provide the cheapest SMM Reseller Panel services amongst our competitors. If you’re looking for a super-easy way to offer additional marketing services to your existing and new clients, look no further! our site offers that and more information! the link :Click Here

    ReplyDelete
  17. I have bookmarked your website because this site contains valuable information in it. I am really happy with articles quality and presentation. Thanks a lot for keeping great stuff. I am very much thankful for this site.
    data science training in Hyderabad

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

    ReplyDelete
  19. I would like to thank you for the efforts you have made in writing this article. I am hoping for the same best work from you in the future as well..
    data scientist training and placement in hyderabad

    ReplyDelete
  20. this is really nice to read..informative post is very good to read..thanks a lot!
    data scientist training and placement in hyderabad

    ReplyDelete
  21. Nice blog, very informative content.Thanks for sharing, waiting for the next update…
    Features of Java Programming Language
    Features of Java

    ReplyDelete
  22. Enjoyed a lot while reading this amazing article this was very informative & knowledgeable content on this blog thanx for sharing such an amazing article.

    buy fb likes

    ReplyDelete
  23. Really an awesome blog and informative content. Keep posting more blogs with us. Thank you.
    Data Science Course with Placements in Hyderabad

    ReplyDelete
  24. Thank you for sharing your awesome and valuable article this is the best blog for the students they can also learn.

    ReplyDelete
  25. Wondering how to fix Pinnacle Game Profiler not opening on Windows 10? Try the fixes like update the Pinnacle game profiler or run as admin.Pinnacle Game Profiler Crashes

    ReplyDelete
  26. Synthesia Key is the full latest version is connected each point run working main user keyboard have to be show on the screen in application. Synthesia Full Version

    ReplyDelete
  27. Easily explained and understood the concept. It is useful for myIT Training Thanks!!

    ReplyDelete