From: KARR, D. <dk...@at...> - 2012-11-30 21:08:49
|
I'm confused. Why do you need to override the default behavior? I thought you didn't want to deploy the instrumented classes? From: John W. Lewis [mailto:Joh...@sa...] Sent: Friday, November 30, 2012 12:20 PM To: KARR, DAVID; Steve Christou; Gordon Harris Cc: cob...@li... Subject: RE: [Cobertura-devel] Use of cobertura in CI Right, and unfortunately, I don't know enough about Maven to tell how to override the default behavior. Somehow, you have to either use the "todir" mechanism that Steve mentioned, or you need to make a copy of the war before it is instrumented. From: KARR, DAVID [mailto:dk...@at...] Sent: Friday, November 30, 2012 3:16 PM To: Steve Christou; Gordon Harris Cc: cob...@li...<mailto:cob...@li...> Subject: Re: [Cobertura-devel] Use of cobertura in CI The default with Maven just "does the right thing". You're right that you shouldn't be deploying your instrumented classes, and that's what the default provides for. Instrumentation will default to writing classes to "target/generated-classes/cobertura" instead of "target/classes". From: Steve Christou [mailto:sch...@gm...] Sent: Friday, November 30, 2012 11:52 AM To: Gordon Harris Cc: cob...@li...<mailto:cob...@li...> Subject: Re: [Cobertura-devel] Use of cobertura in CI You should never have to deploy an instrumented war file to a deployed environment. If i'm correct you are using maven to try and instrument. The cobertura ant task has a "todir" variable which creates a new file with instrumented code that way you have 2 different copies (one instrumented and one not instrumented). You will need to investigate if maven can do this at all. Thanks, Steve. On Fri, Nov 30, 2012 at 1:40 PM, Gordon Harris <gor...@ya...<mailto:gor...@ya...>> wrote: Hi, I am using cobertura for the first time. I'm trying to understand the right way to use it with Jenkins CI. We are writing a webapp. We have unit tests. Jenkins is setup to perform maven builds triggered by svn commits. The last step of a successful build is to deploy the generated war to a Tomcat instance for QA/demo purposes. I have Jenkins and the pom setup to run tests with cobertura. Jenkins shows lovely cobertura graphs :) My concern is that we should NOT be deploying the instrumented war to Tomcat. I do not need to track code coverage in the deployed environment. Tomcat should be running the app as may be released to production (ie. non-instrumented). But AFAIK there's only the one war being generated by the build. What's the right thing to do here? Am I mistaken about what the build generates? Is the solution to have separate projects running in Jenkins, one for cobertura and one for deploying to Tomcat? What do other people do? Gord ------------------------------------------------------------------------------ Keep yourself connected to Go Parallel: TUNE You got it built. Now make it sing. Tune shows you how. http://goparallel.sourceforge.net _______________________________________________ Cobertura-devel mailing list Cob...@li...<mailto:Cob...@li...> https://lists.sourceforge.net/lists/listinfo/cobertura-devel |