SonarQube Plugins
  1. SonarQube Plugins
  2. SONARPLUGINS-99

Create a Sonar plugin in order to collect code coverage and unit tests results from Parasoft Jtest

    Details

    • Type: New Feature New Feature
    • Status: Reopened Reopened
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: JTest
    • Labels:
      None
    • Environment:
      Sonar : Linux
      Sonar DB : MySql
      Eclipse/jtest : Windows
    • Testcase included:
      yes
    • Number of attachments :
      4

      Description

      I am currently running on sonar 1.7 and we are using the Parasoft Jtest for code coverage and unit tests.
      The total code coverage result seems to be incorrect.

      When I generate a aggregate jtest report with one of our projects it shows a total of 100% code coverage
      Sonar however shows a total code coverage of 0.0%

      I use a project without modules.

      Plese somone know what's the problem ?

        Activity

        Hide
        Carlos Ramirez added a comment -

        Hello,

        I want to write such plugin because it is the best option for our project. So please tell me if someone have made some progress in order to follow or if someone have more information.

        I will make a plugin that read the jtest report in xml format, and fill sonar like findbugs, to have reviews and assign them. Is it possible? I will begin tomorrow with the information that I have, please send me all that you have related to this topic.

        Regards,
        Carlos

        Show
        Carlos Ramirez added a comment - Hello, I want to write such plugin because it is the best option for our project. So please tell me if someone have made some progress in order to follow or if someone have more information. I will make a plugin that read the jtest report in xml format, and fill sonar like findbugs, to have reviews and assign them. Is it possible? I will begin tomorrow with the information that I have, please send me all that you have related to this topic. Regards, Carlos
        Hide
        Carlos Ramirez added a comment -

        JTest plug in created.

        This plugin reads the report.xml generated in JTest and use it to create the rules and the violations. Also if it is provided create the rules with full description using the JTest own documentation.

        The properties are:

        sonar.jtest.reportPath
        Path absolute to the report.xml generated by jtest.

        sonar.jtest.sourceprefix
        Project source path from JTest workspace. Usually /projectname/src. Used to extract the file name from JTest report

        sonar.jtest.rulesPath
        Path absolute to the report.xml generated by jtest to be used to create the rules.

        sonar.jtest.rulesDescPath
        Content of docs.zip that can obtained from parasoft/jtest/9.0/eclipse/plugins/com.parasoft.xtest.standards.eclipse.core.java_9.0.5.20101229 in a jtest installation

        Tell me what do you think

        Show
        Carlos Ramirez added a comment - JTest plug in created. This plugin reads the report.xml generated in JTest and use it to create the rules and the violations. Also if it is provided create the rules with full description using the JTest own documentation. The properties are: sonar.jtest.reportPath Path absolute to the report.xml generated by jtest. sonar.jtest.sourceprefix Project source path from JTest workspace. Usually /projectname/src. Used to extract the file name from JTest report sonar.jtest.rulesPath Path absolute to the report.xml generated by jtest to be used to create the rules. sonar.jtest.rulesDescPath Content of docs.zip that can obtained from parasoft/jtest/9.0/eclipse/plugins/com.parasoft.xtest.standards.eclipse.core.java_9.0.5.20101229 in a jtest installation Tell me what do you think
        Hide
        rudra nath added a comment - - edited

        Hi All,

        I deployed sonar-jtest-plugin.jar in extensions/plugins folder. But rules are not getting loaded while starting sonar.
        I added following value in sonar.properties:
        sonar.jtest.reportPath=C:/DSSWS/WS_PaymentDeviceAccountManagement_Latest/Source/WSW_PaymentDeviceAccountManagement/target/site/parasoft/test.xml
        sonar.jtest.sourceprefix=C:/DSSWS/WS_PaymentDeviceAccountManagement_Latest/Source/WSW_PaymentDeviceAccountManagement/src/main/java
        sonar.jtest.rulesPath=C:/sw/TD_CONFIG.properties
        sonar.jtest.rulesDescPath=C:/JTest/doc

        I am using sonar 3.7.2

        Thanks!
        rudra
        email: rudra.nath@gmail.com

        Show
        rudra nath added a comment - - edited Hi All, I deployed sonar-jtest-plugin.jar in extensions/plugins folder. But rules are not getting loaded while starting sonar. I added following value in sonar.properties: sonar.jtest.reportPath=C:/DSSWS/WS_PaymentDeviceAccountManagement_Latest/Source/WSW_PaymentDeviceAccountManagement/target/site/parasoft/test.xml sonar.jtest.sourceprefix=C:/DSSWS/WS_PaymentDeviceAccountManagement_Latest/Source/WSW_PaymentDeviceAccountManagement/src/main/java sonar.jtest.rulesPath=C:/sw/TD_CONFIG.properties sonar.jtest.rulesDescPath=C:/JTest/doc I am using sonar 3.7.2 Thanks! rudra email: rudra.nath@gmail.com
        Hide
        Anthony Yeong added a comment -

        Is this development still active.

        Please help to finish the plugin.

        Show
        Anthony Yeong added a comment - Is this development still active. Please help to finish the plugin.
        Hide
        Carlos Ramirez added a comment -

        Hello Anthony,

        I think is not actively developed. I created one to be able to read results from JTest, and I still use as is. But I haven't done any updates after that. But I don't know if other have made modifications to it

        Regards

        Show
        Carlos Ramirez added a comment - Hello Anthony, I think is not actively developed. I created one to be able to read results from JTest, and I still use as is. But I haven't done any updates after that. But I don't know if other have made modifications to it Regards

          People

          • Assignee:
            Makram Manai
            Reporter:
            Makram Manai
          • Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated: