[jboss-as7-dev] Running AS7 tests in eclipse?
Kabir Khan
kabir.khan at jboss.com
Tue Apr 3 09:35:40 EDT 2012
On 3 Apr 2012, at 14:34, Kabir Khan wrote:
> I've not tried the individual tests for a long time, but I used to have to put the system properties expected into the arguments. I think -Djboss.dist becomes jbossHome, and you also need to set -Dava.util.logging.manager=org.jboss.logmanager.LogManager.
>
> An easier way might be to start the test from the command line using mvn test -Dmaven.surefire.debug=true and connecting the debugger on port 5005.
mvn clean install -Dmaven.surefire.debug=true -Dtest=MyTest
Note that ^ runs it against the full profile
>
> The logger interface implementations are dynamically generated as part of the individual modules's maven build and only get generated if you mvn clean install. So if you do a clean in Eclipse and then a mvn install the logger interface implementation does not get generated.
>
> On 3 Apr 2012, at 14:01, Jeff Mesnil wrote:
>
>> Hi,
>>
>> It's a silly question but I ask it anyway: how do you run individual AS7
>> tests in eclipse?
>>
>> I can not manage to run either messaging subsystem or integration tests
>> individually from eclipse...
>>
>> I followed docs[1][2] (incl. setting up the Maven profile) without any
>> success. Any Arquillian test fails with the error:
>>
>> org.jboss.arquillian.container.spi.ConfigurationException: jbossHome
>> 'null' must exist
>>
>> and setting the jboss.home env variable in the run configuration does
>> not work. Am I missing something obvious?
>> It seems weird that the file
>> testsuite/integration/smoke/src/test/config/arq/arquillian.xml is not in
>> eclipse's Build Path. But adding it does not have any effect
>>
>> I made a simple project to familiarize myself with Arquillian and it
>> works fine, I can deploy a JMS queue, test it, everything's fine.
>> But I'm at loss to run Arquillian individual tests from AS7...
>>
>> The messaging susbystem tests fails too when in run them in eclipse with
>> the error:
>>
>> java.lang.Exception: java.lang.ExceptionInInitializerError
>> at
>> org.jboss.as.subsystem.test.AbstractSubsystemTest$ModelControllerService.boot(AbstractSubsystemTest.java:763)
>> at
>> org.jboss.as.controller.AbstractControllerService.boot(AbstractControllerService.java:185)
>> at
>> org.jboss.as.controller.AbstractControllerService$1.run(AbstractControllerService.java:155)
>> at java.lang.Thread.run(Thread.java:679)
>> Caused by: java.lang.ExceptionInInitializerError
>> at
>> org.jboss.as.controller.AbstractOperationContext.doCompleteStep(AbstractOperationContext.java:322)
>> at
>> org.jboss.as.controller.AbstractOperationContext.completeStep(AbstractOperationContext.java:200)
>> at
>> org.jboss.as.controller.ModelControllerImpl.boot(ModelControllerImpl.java:149)
>> at
>> org.jboss.as.controller.AbstractControllerService.boot(AbstractControllerService.java:190)
>> at
>> org.jboss.as.subsystem.test.AbstractSubsystemTest$ModelControllerService.boot(AbstractSubsystemTest.java:759)
>> ... 3 more
>> Caused by: java.lang.IllegalArgumentException: Invalid logger interface
>> org.jboss.as.controller.ControllerLogger (implementation not found)
>> at org.jboss.logging.Logger.getMessageLogger(Logger.java:2250)
>> at org.jboss.logging.Logger.getMessageLogger(Logger.java:2214)
>> at
>> org.jboss.as.controller.ControllerLogger.<clinit>(ControllerLogger.java:51)
>> ... 8 more
>>
>> I have imported both jboss-as-messaging and jboss-as-controller projects
>> in eclipse.
>> Is there something specific to do to have logging working in eclipse?
>>
>> I feel dumb not being able to run a single test from eclipse... :)
>>
>> thanks,
>> jeff
>>
>> [1] https://community.jboss.org/wiki/HackingAS7UsingEclipse
>> [1] https://community.jboss.org/wiki/WritingAAS7TestCaseInTestsuiteModule
>>
>> --
>> Jeff Mesnil
>> JBoss, a division of Red Hat
>> http://jmesnil.net/
>> _______________________________________________
>> jboss-as7-dev mailing list
>> jboss-as7-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
>
More information about the jboss-as7-dev
mailing list