Quantcast

Flex-Ant

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

Flex-Ant

Adams, Shaun

Hello,

            Can someone please post an example ANT Target to successfully populate SONAR with FlexPMD and FlexUnit tests, so far when I run the following, I only get lines of code, files and duplications populating the SONAR dashboard

 

<target name="sonar"> 

     <!-- sonar properties -->

                        <property name="sonar.host.url" value="http://url:port/" />

                        <property name="sonar.jdbc.url" value="jdbc:oracle:thin:@db:port:db" />

                        <property name="sonar.jdbc.driverClassName" value="oracle.jdbc.driver.OracleDriver" />

                        <property name="sonar.jdbc.username" value="xxxxx" />

                        <property name="sonar.jdbc.password" value="xxxxx" />

                        <property name="sonar.language" value="flex" />

                       

                        <taskdef uri="antlib:org.sonar.ant" resource="org/sonar/ant/antlib.xml">  

                                    <classpath path="${ANT_HOME}\lib\sonar-ant-task-1.3.jar" />

                        </taskdef>

 

    <!-- sonar task -->

        <sonar:sonar key="application" version="1.0"  xmlns:sonar="antlib:org.sonar.ant">

            <sources>

                <path location="${basedir}/src"/>

            </sources>

            <binaries>

                <path location="${basedir}/bin"/>

            </binaries>

        </sonar:sonar>

    </target>

 

Thanks in advance

 

Shaun Adams Configuration Manager
Met Office FitzRoy Road  Exeter Devon EX1 3PB United Kingdom
Tel: +44 (0)1392 884490

E-mail: <a href="BLOCKED::mailto:shaun.adams@metoffice.gov.uk">shaun.adams@... http://www.metoffice.gov.uk

 

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

Re: Flex-Ant

David Racodon-2
Hi Shaun,

I can't see anything related to test in you ant file... So clearly, Sonar is not fed with any information on your tests.
Did you have a look at: http://docs.codehaus.org/display/SONAR/Flex+Plugin? (Note #1 and #2).

Regards,


David RACODON | SonarSource
Senior Consultant



On 4 July 2012 15:11, Adams, Shaun <[hidden email]> wrote:

Hello,

            Can someone please post an example ANT Target to successfully populate SONAR with FlexPMD and FlexUnit tests, so far when I run the following, I only get lines of code, files and duplications populating the SONAR dashboard

 

<target name="sonar"> 

     <!-- sonar properties -->

                        <property name="sonar.host.url" value="http://url:port/" />

                        <property name="sonar.jdbc.url" value="jdbc:oracle:thin:@db:port:db" />

                        <property name="sonar.jdbc.driverClassName" value="oracle.jdbc.driver.OracleDriver" />

                        <property name="sonar.jdbc.username" value="xxxxx" />

                        <property name="sonar.jdbc.password" value="xxxxx" />

                        <property name="sonar.language" value="flex" />

                       

                        <taskdef uri="antlib:org.sonar.ant" resource="org/sonar/ant/antlib.xml">  

                                    <classpath path="${ANT_HOME}\lib\sonar-ant-task-1.3.jar" />

                        </taskdef>

 

    <!-- sonar task -->

        <sonar:sonar key="application" version="1.0"  xmlns:sonar="antlib:org.sonar.ant">

            <sources>

                <path location="${basedir}/src"/>

            </sources>

            <binaries>

                <path location="${basedir}/bin"/>

            </binaries>

        </sonar:sonar>

    </target>

 

Thanks in advance

 

Shaun Adams Configuration Manager
Met Office FitzRoy Road  Exeter Devon EX1 3PB United Kingdom
Tel: <a href="tel:%2B44%20%280%291392%20884490" value="+441392884490" target="_blank">+44 (0)1392 884490

E-mail: [hidden email] http://www.metoffice.gov.uk

 


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

RE: Flex-Ant

Adams, Shaun

David,

 

Thanks for the link,

 

Something like the below work?

<property name="sonar.dynamicAnalysis" value="reuseReports" />

                        <property name="sonar.surefire.reportsPath" value="reports/pmdresults/pmd.xml" />

Shaun Adams
CM Team
x4490


From: David Racodon [mailto:[hidden email]]
Sent: 04 July 2012 14:24
To: [hidden email]
Subject: Re: [sonar-user] Flex-Ant

 

Hi Shaun,

 

I can't see anything related to test in you ant file... So clearly, Sonar is not fed with any information on your tests.

Did you have a look at: http://docs.codehaus.org/display/SONAR/Flex+Plugin? (Note #1 and #2).

 

Regards,


 

David RACODON | SonarSource
Senior Consultant



On 4 July 2012 15:11, Adams, Shaun <[hidden email]> wrote:

Hello,

            Can someone please post an example ANT Target to successfully populate SONAR with FlexPMD and FlexUnit tests, so far when I run the following, I only get lines of code, files and duplications populating the SONAR dashboard

 

<target name="sonar"> 

     <!-- sonar properties -->

                        <property name="sonar.host.url" value="http://url:port/" />

                        <property name="sonar.jdbc.url" value="jdbc:oracle:thin:@db:port:db" />

                        <property name="sonar.jdbc.driverClassName" value="oracle.jdbc.driver.OracleDriver" />

                        <property name="sonar.jdbc.username" value="xxxxx" />

                        <property name="sonar.jdbc.password" value="xxxxx" />

                        <property name="sonar.language" value="flex" />

                       

                        <taskdef uri="antlib:org.sonar.ant" resource="org/sonar/ant/antlib.xml">  

                                    <classpath path="${ANT_HOME}\lib\sonar-ant-task-1.3.jar" />

                        </taskdef>

 

    <!-- sonar task -->

        <sonar:sonar key="application" version="1.0"  xmlns:sonar="antlib:org.sonar.ant">

            <sources>

                <path location="${basedir}/src"/>

            </sources>

            <binaries>

                <path location="${basedir}/bin"/>

            </binaries>

        </sonar:sonar>

    </target>

 

Thanks in advance

 

Shaun Adams Configuration Manager
Met Office FitzRoy Road  Exeter Devon EX1 3PB United Kingdom
Tel: <a href="tel:%2B44%20%280%291392%20884490" target="_blank" value="+441392884490">+44 (0)1392 884490

E-mail: [hidden email] http://www.metoffice.gov.uk

 

 

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

Re: Flex-Ant

David Racodon-2
Hi Shaun,

I apologize in advance to ask that question but: are you familiar with unit tests, building an application with Ant, etc.?
If not, I encourage you to have a talk with your development team to help you set up Sonar.

Basically the process would be:
  1. Run a Ant task to execute your unit tests to generate execution and code coverage reports.
  2. Run Sonar and feed it with those previously generated execution and code coverage reports:
    • <property name="sonar.dynamicAnalysis" value="reuseReports" />
    • <property name="sonar.surefire.reportsPath" value="<path to your tests execution reports>" />
    • <property name="sonar.cobertura.reportPath" value="<path to your Cobertura code coverage report>" /> 
Thank you

Regards,

David RACODON | SonarSource
Senior Consultant



On 4 July 2012 15:43, Adams, Shaun <[hidden email]> wrote:

David,

 

Thanks for the link,

 

Something like the below work?

<property name="sonar.dynamicAnalysis" value="reuseReports" />

                        <property name="sonar.surefire.reportsPath" value="reports/pmdresults/pmd.xml" />

Shaun Adams
CM Team
x4490


From: David Racodon [mailto:[hidden email]]
Sent: 04 July 2012 14:24
To: [hidden email]
Subject: Re: [sonar-user] Flex-Ant

 

Hi Shaun,

 

I can't see anything related to test in you ant file... So clearly, Sonar is not fed with any information on your tests.

Did you have a look at: http://docs.codehaus.org/display/SONAR/Flex+Plugin? (Note #1 and #2).

 

Regards,


 

David RACODON | SonarSource
Senior Consultant



On 4 July 2012 15:11, Adams, Shaun <[hidden email]> wrote:

Hello,

            Can someone please post an example ANT Target to successfully populate SONAR with FlexPMD and FlexUnit tests, so far when I run the following, I only get lines of code, files and duplications populating the SONAR dashboard

 

<target name="sonar"> 

     <!-- sonar properties -->

                        <property name="sonar.host.url" value="http://url:port/" />

                        <property name="sonar.jdbc.url" value="jdbc:oracle:thin:@db:port:db" />

                        <property name="sonar.jdbc.driverClassName" value="oracle.jdbc.driver.OracleDriver" />

                        <property name="sonar.jdbc.username" value="xxxxx" />

                        <property name="sonar.jdbc.password" value="xxxxx" />

                        <property name="sonar.language" value="flex" />

                       

                        <taskdef uri="antlib:org.sonar.ant" resource="org/sonar/ant/antlib.xml">  

                                    <classpath path="${ANT_HOME}\lib\sonar-ant-task-1.3.jar" />

                        </taskdef>

 

    <!-- sonar task -->

        <sonar:sonar key="application" version="1.0"  xmlns:sonar="antlib:org.sonar.ant">

            <sources>

                <path location="${basedir}/src"/>

            </sources>

            <binaries>

                <path location="${basedir}/bin"/>

            </binaries>

        </sonar:sonar>

    </target>

 

Thanks in advance

 

Shaun Adams Configuration Manager
Met Office FitzRoy Road  Exeter Devon EX1 3PB United Kingdom
Tel: <a href="tel:%2B44%20%280%291392%20884490" value="+441392884490" target="_blank">+44 (0)1392 884490

E-mail: [hidden email] http://www.metoffice.gov.uk

 

 


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

RE: Flex-Ant

Adams, Shaun

Yes,

            The build.xml is generating both a pmd.xml (in /reports/pmd) and a set of FlexUnit xmls (in /reports/unit-tests). I’ve had the development teams have a look at the build and they seem to think that the locations I have given for execution reports is correct.

 

We currently do not run any coverage reports for this build

 

Shaun Adams
CM Team
x4490


From: David Racodon [mailto:[hidden email]]
Sent: 04 July 2012 15:52
To: [hidden email]
Subject: Re: [sonar-user] Flex-Ant

 

Hi Shaun,

 

I apologize in advance to ask that question but: are you familiar with unit tests, building an application with Ant, etc.?

If not, I encourage you to have a talk with your development team to help you set up Sonar.

 

Basically the process would be:

  1. Run a Ant task to execute your unit tests to generate execution and code coverage reports.
  2. Run Sonar and feed it with those previously generated execution and code coverage reports:
    • <property name="sonar.dynamicAnalysis" value="reuseReports" />
    • <property name="sonar.surefire.reportsPath" value="<path to your tests execution reports>" />
    • <property name="sonar.cobertura.reportPath" value="<path to your Cobertura code coverage report>" /> 

Thank you

 

Regards,

 

David RACODON | SonarSource
Senior Consultant



On 4 July 2012 15:43, Adams, Shaun <[hidden email]> wrote:

David,

 

Thanks for the link,

 

Something like the below work?

<property name="sonar.dynamicAnalysis" value="reuseReports" />

                        <property name="sonar.surefire.reportsPath" value="reports/pmdresults/pmd.xml" />

Shaun Adams
CM Team
x4490


From: David Racodon [mailto:[hidden email]]
Sent: 04 July 2012 14:24
To: [hidden email]
Subject: Re: [sonar-user] Flex-Ant

 

Hi Shaun,

 

I can't see anything related to test in you ant file... So clearly, Sonar is not fed with any information on your tests.

Did you have a look at: http://docs.codehaus.org/display/SONAR/Flex+Plugin? (Note #1 and #2).

 

Regards,


 

David RACODON | SonarSource
Senior Consultant

 

On 4 July 2012 15:11, Adams, Shaun <[hidden email]> wrote:

Hello,

            Can someone please post an example ANT Target to successfully populate SONAR with FlexPMD and FlexUnit tests, so far when I run the following, I only get lines of code, files and duplications populating the SONAR dashboard

 

<target name="sonar"> 

     <!-- sonar properties -->

                        <property name="sonar.host.url" value="http://url:port/" />

                        <property name="sonar.jdbc.url" value="jdbc:oracle:thin:@db:port:db" />

                        <property name="sonar.jdbc.driverClassName" value="oracle.jdbc.driver.OracleDriver" />

                        <property name="sonar.jdbc.username" value="xxxxx" />

                        <property name="sonar.jdbc.password" value="xxxxx" />

                        <property name="sonar.language" value="flex" />

                       

                        <taskdef uri="antlib:org.sonar.ant" resource="org/sonar/ant/antlib.xml">  

                                    <classpath path="${ANT_HOME}\lib\sonar-ant-task-1.3.jar" />

                        </taskdef>

 

    <!-- sonar task -->

        <sonar:sonar key="application" version="1.0"  xmlns:sonar="antlib:org.sonar.ant">

            <sources>

                <path location="${basedir}/src"/>

            </sources>

            <binaries>

                <path location="${basedir}/bin"/>

            </binaries>

        </sonar:sonar>

    </target>

 

Thanks in advance

 

Shaun Adams Configuration Manager
Met Office FitzRoy Road  Exeter Devon EX1 3PB United Kingdom
Tel: <a href="tel:%2B44%20%280%291392%20884490" target="_blank" value="+441392884490">+44 (0)1392 884490

E-mail: [hidden email] http://www.metoffice.gov.uk

 

 

 

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

Re: Flex-Ant

David Racodon-2
Hi Shaun,

From what you previously wrote, you've fed Sonar with the PMD report not the unit tests reports. Hence my hash question.

So maybe:
<property name="sonar.surefire.reportsPath" value="reports/pmdresults/pmd.xml" />
=>
<property name="sonar.surefire.reportsPath" value="reports/unit-tests" />

Regards,

David RACODON | SonarSource
Senior Consultant



On 4 July 2012 17:38, Adams, Shaun <[hidden email]> wrote:

Yes,

            The build.xml is generating both a pmd.xml (in /reports/pmd) and a set of FlexUnit xmls (in /reports/unit-tests). I’ve had the development teams have a look at the build and they seem to think that the locations I have given for execution reports is correct.

 

We currently do not run any coverage reports for this build

 

Shaun Adams
CM Team
x4490


From: David Racodon [mailto:[hidden email]]
Sent: 04 July 2012 15:52
To: [hidden email]
Subject: Re: [sonar-user] Flex-Ant

 

Hi Shaun,

 

I apologize in advance to ask that question but: are you familiar with unit tests, building an application with Ant, etc.?

If not, I encourage you to have a talk with your development team to help you set up Sonar.

 

Basically the process would be:

  1. Run a Ant task to execute your unit tests to generate execution and code coverage reports.
  2. Run Sonar and feed it with those previously generated execution and code coverage reports:
    • <property name="sonar.dynamicAnalysis" value="reuseReports" />
    • <property name="sonar.surefire.reportsPath" value="<path to your tests execution reports>" />
    • <property name="sonar.cobertura.reportPath" value="<path to your Cobertura code coverage report>" /> 

Thank you

 

Regards,

 

David RACODON | SonarSource
Senior Consultant



On 4 July 2012 15:43, Adams, Shaun <[hidden email]> wrote:

David,

 

Thanks for the link,

 

Something like the below work?

<property name="sonar.dynamicAnalysis" value="reuseReports" />

                        <property name="sonar.surefire.reportsPath" value="reports/pmdresults/pmd.xml" />

Shaun Adams
CM Team
x4490


From: David Racodon [mailto:[hidden email]]
Sent: 04 July 2012 14:24
To: [hidden email]
Subject: Re: [sonar-user] Flex-Ant

 

Hi Shaun,

 

I can't see anything related to test in you ant file... So clearly, Sonar is not fed with any information on your tests.

Did you have a look at: http://docs.codehaus.org/display/SONAR/Flex+Plugin? (Note #1 and #2).

 

Regards,


 

David RACODON | SonarSource
Senior Consultant

 

On 4 July 2012 15:11, Adams, Shaun <[hidden email]> wrote:

Hello,

            Can someone please post an example ANT Target to successfully populate SONAR with FlexPMD and FlexUnit tests, so far when I run the following, I only get lines of code, files and duplications populating the SONAR dashboard

 

<target name="sonar"> 

     <!-- sonar properties -->

                        <property name="sonar.host.url" value="http://url:port/" />

                        <property name="sonar.jdbc.url" value="jdbc:oracle:thin:@db:port:db" />

                        <property name="sonar.jdbc.driverClassName" value="oracle.jdbc.driver.OracleDriver" />

                        <property name="sonar.jdbc.username" value="xxxxx" />

                        <property name="sonar.jdbc.password" value="xxxxx" />

                        <property name="sonar.language" value="flex" />

                       

                        <taskdef uri="antlib:org.sonar.ant" resource="org/sonar/ant/antlib.xml">  

                                    <classpath path="${ANT_HOME}\lib\sonar-ant-task-1.3.jar" />

                        </taskdef>

 

    <!-- sonar task -->

        <sonar:sonar key="application" version="1.0"  xmlns:sonar="antlib:org.sonar.ant">

            <sources>

                <path location="${basedir}/src"/>

            </sources>

            <binaries>

                <path location="${basedir}/bin"/>

            </binaries>

        </sonar:sonar>

    </target>

 

Thanks in advance

 

Shaun Adams Configuration Manager
Met Office FitzRoy Road  Exeter Devon EX1 3PB United Kingdom
Tel: <a href="tel:%2B44%20%280%291392%20884490" value="+441392884490" target="_blank">+44 (0)1392 884490

E-mail: [hidden email] http://www.metoffice.gov.uk

 

 

 


Loading...