Quantcast

Running CodeNarc and test-app at the same time

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

Running CodeNarc and test-app at the same time

alxndrsn
With grails 2.0.3, I cannot seem to run codenarc and test-app with a
single command.  I've seen examples written such as:

    grails codenarc test-app

but for me, this will just run codenarc, e.g.

    ...
    Running CodeNarc ...
    | Compiling 7 source files....
    CodeNarc finished; report(s) generated: [target/test-reports/codenarc.xml]
    $

Is there a way to run both codenarc and test-app at the same time?  I
want eventually to use this in Jenkins.

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

    http://xircles.codehaus.org/manage_email


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

Re: Running CodeNarc and test-app at the same time

Nicholas Wittstruck
Codenarc analyzses your code statically, so you don't have to run it together with test-app. If you want to get test-coverage, you will need the coverage plugin. My Jenkins job is set up like this:

"test-app -unit -coverage -xml" codenarc

And this results in a coverage report and a codenarc report.

Cheers,
Nicholas


On 08.08.2012, at 10:45, Alex Anderson <[hidden email]> wrote:

> With grails 2.0.3, I cannot seem to run codenarc and test-app with a
> single command.  I've seen examples written such as:
>
>    grails codenarc test-app
>
> but for me, this will just run codenarc, e.g.
>
>    ...
>    Running CodeNarc ...
>    | Compiling 7 source files....
>    CodeNarc finished; report(s) generated: [target/test-reports/codenarc.xml]
>    $
>
> Is there a way to run both codenarc and test-app at the same time?  I
> want eventually to use this in Jenkins.
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>


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

    http://xircles.codehaus.org/manage_email


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

Re: Running CodeNarc and test-app at the same time

alxndrsn
On 8 August 2012 12:25, Nicholas Wittstruck <[hidden email]> wrote:
> Codenarc analyzses your code statically, so you don't have to run it together with test-app. If you want to get test-coverage, you will need the coverage plugin. My Jenkins job is set up like this:
>
> "test-app -unit -coverage -xml" codenarc
>
> And this results in a coverage report and a codenarc report.

We previously had Jenkins targets set similarly, as:

    "test-app -coverage -xml" codenarc

Codenarc wasn't running, but on changing the order of the targets,
it's now working:

    codenarc "test-app -coverage -xml"

I suspect this is because we had failing tests, which (I assume)
prevented the second target from running.

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

    http://xircles.codehaus.org/manage_email


Loading...