|
View:
New views
8 Messages
—
Rating Filter:
Alert me
|
|
|
Sonar + JBehaveFolks,
I'm trying to get the code coverage of my JBehave scenarios included in the cobertura coverage numbers in Sonar. Unfortunately, it appears that the cobertura data is analyzed before the JBehave scenarios run. I've tried tying JBehave to the "test" phase, but that didn't help. Here's the relevant portion of the maven build (as run by the Hudson sonar plugin): --------------------- [INFO] [cobertura:instrument {execution: default-instrument}] [INFO] Cobertura 1.9.2 - GNU GPL License (NO WARRANTY) - See COPYRIGHT file Instrumenting 1003 files to /data/hudson_home/workspace/SONAR - xxx- core/SONAR - xxx-core/target/generated-classes/cobertura Cobertura: Saved information on 1003 classes. Instrument time: 4735ms [INFO] Instrumentation was successful. ... ... ... Tests run: 329, Failures: 0, Errors: 0, Skipped: 3 Cobertura: Loaded information on 1003 classes. Cobertura: Saved information on 1003 classes. [INFO] [jbehave:run-scenarios {execution: run-scenarios-found}] [INFO] Running scenario com.meijer.foodlab.business.pricing.scenario.PricePerServing ... ... ... [INFO] [cobertura:cobertura {execution: default-cli}] [INFO] Cobertura 1.9.2 - GNU GPL License (NO WARRANTY) - See COPYRIGHT file Cobertura: Loaded information on 1003 classes. Report time: 8274ms --------------------- any ideas? --- Nayan Hajratwala http://agileshrugged.com http://twitter.com/nhajratw 734.658.6032 --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: Sonar + JBehaveHi Nayan,
I don't know well JBehave and the way to launch JBehave tests from Maven. Nevertheless, I believed those tests could be launched with junit ? Could you explain what's the best practice to configure a Maven project in order to use JBehave ? Thanks Freddy On Wed, Oct 14, 2009 at 3:15 AM, Nayan Hajratwala <nayan@...> wrote: Folks, |
|
|
Re: Sonar + JBehaveFreddy, this is how i configured it:
only difference was to use <phase>test</phase> rather than <phase>integration-test</phase> You're right that JBehave scenarios just subclass JUnit, so I could possibly try to configure surefire to run the JBehave scenarios... On Oct 14, 2009, at 4:47 PM, Freddy Mallet wrote: Hi Nayan, |
|
|
Re: Sonar + JBehaveYou're right Nayan, could you first try to simply run your JBehave scenarios along with your "classical" junit tests during the Maven test phase ? FYI, there's an open JIRA ticket SONAR-613 to combine code coverage results of test and integration-test phases. Freddy On Wed, Oct 14, 2009 at 10:53 PM, Nayan Hajratwala <nayan@...> wrote:
|
|
|
Re: Sonar + JBehavehmm my jbehave tests are run just fine with junit 4. Heres some snipllets: something that extends JunitScenario: public class ShadowControllerTest extends JUnitScenario { public ShadowControllerTest() { this(Thread.currentThread().getContextClassLoader()); } public ShadowControllerTest(final ClassLoader classLoader) { super(new MostUsefulConfiguration() { @Override public ScenarioReporter forReportingScenarios() { return new PrintStreamScenarioReporter(); } public ScenarioDefiner forDefiningScenarios() { return new ClasspathScenarioDefiner( new UnderscoredCamelCaseResolver(".scenario"), new PatternScenarioParser( new PropertyBasedConfiguration()), classLoader); } }, new ShadowControllerSteps()); } And the steps @RunWith(JMock.class) public class ShadowControllerSteps extends Steps { And the pom: I do include the scenario files: <build> <testResources> <testResource> <directory>src/test/java</directory> <includes> <include>**</include> </includes> <excludes> <exclude>**/*.java</exclude> </excludes> </testResource> </testResources> </build> 2009/10/15 Freddy Mallet <freddy.mallet@...>
|
|
|
Access controlIs there anything in the works to implement access control for Sonar? AD/LDAP auth for instance. ========== Curtis Yanko Application & Developer Infrastructure Services Continuous Integration W: 860.702.9059 M: 860.881.2050 This e-mail, including attachments, may include confidential and/or proprietary information, and may be used only by the person or entity to which it is addressed. If the reader of this e-mail is not the intended recipient or his or her authorized agent, the reader is hereby notified that any dissemination, distribution or copying of this e-mail is prohibited. If you have received this e-mail in error, please notify the sender by replying to this message and delete this e-mail immediately. --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: Access controlHi Curtis,
This is planned in Sonar 1.12 to manage user/group and two roles by projects : administrator and viewer. An API should be also published in order to use for instance LDAP server to authenticate users. I don't promise anything but we're on the good way. regards, Freddy On Wed, Oct 21, 2009 at 8:07 PM, Yanko, Curtis <curt_yanko@...> wrote:
|
|
|
RE: Access controlExcellent news, thank you.
==========
Curtis Yanko
Application & Developer
Infrastructure Services
Continuous Integration
W: 860.702.9059
M: 860.881.2050
From: Freddy Mallet [mailto:freddy.mallet@...] Sent: Wednesday, October 21, 2009 3:42 PM To: user@... Subject: Re: [sonar-user] Access control This is planned in Sonar 1.12 to manage user/group and two roles by projects : administrator and viewer. An API should be also published in order to use for instance LDAP server to authenticate users. I don't promise anything but we're on the good way. regards, Freddy On Wed, Oct 21, 2009 at 8:07 PM, Yanko, Curtis <curt_yanko@...> wrote:
This e-mail, including attachments, may include confidential and/or proprietary information, and may be used only by the person or entity to which it is addressed. If the reader of this e-mail is not the intended recipient or his or her authorized agent, the reader is hereby notified that any dissemination, distribution or copying of this e-mail is prohibited. If you have received this e-mail in error, please notify the sender by replying to this message and delete this e-mail immediately. |
| Free embeddable forum powered by Nabble | Forum Help |