-
45. Re: GSoC - Arquillian Spring Integration
dan.j.allen Apr 23, 2012 11:37 PM (in response to jmnarloch)Jakub, a really great deliverable by the end of the summer would be a "getting started" guide for testing Spring with Arquillian. Perhaps even two guides, one for Spring beans and one for Spring MVC. There is no better way to show off your work than to channel developers to the guide. We'll of course host it in the guides section of arquillian.org.
(Trust me, writing these guides is easy because you don't have to worry about anything except what you want to say and show).
-
46. Re: GSoC - Arquillian Spring Integration
marius.bogoevici Apr 24, 2012 12:45 PM (in response to jmnarloch)Jakub,
Excellent news. I'll be very happy to mentor you through (with the help of Dan and Aslak, who have already pitched in ) - welcome and lots of fun! Let's get together some time this week or the next - IRC, G+ hangout, whatevs.
Cheers,
Marius
-
47. Re: GSoC - Arquillian Spring Integration
jmnarloch Apr 24, 2012 2:10 PM (in response to dan.j.allen)Hi again,
Dan Allen wrote:
Jakub, a really great deliverable by the end of the summer would be a "getting started" guide for testing Spring with Arquillian. Perhaps even two guides, one for Spring beans and one for Spring MVC. There is no better way to show off your work than to channel developers to the guide. We'll of course host it in the guides section of arquillian.org.
(Trust me, writing these guides is easy because you don't have to worry about anything except what you want to say and show).
I would be glad to do this. This is one of the reasons this project is so cool, that undoubtedly is has great potential, at least as I see it.
But first I got to work on the code to make it both functional and relieable.
-
48. Re: GSoC - Arquillian Spring Integration
jmnarloch Apr 24, 2012 2:15 PM (in response to marius.bogoevici)Marius Bogoevici wrote:
Jakub,
Excellent news. I'll be very happy to mentor you through (with the help of Dan and Aslak, who have already pitched in ) - welcome and lots of fun! Let's get together some time this week or the next - IRC, G+ hangout, whatevs.
Cheers,
Marius
Sure, why not. I think that the next week will be perfect, becouse I will got lots of free time, so there would be no problem to meet at time that would be comfortable for everyone. We could start with IRC and then if needed move to any other media.
-
49. Re: GSoC - Arquillian Spring Integration
dan.j.allen Apr 24, 2012 2:51 PM (in response to marius.bogoevici)Marius Bogoevici wrote:
Excellent news. I'll be very happy to mentor you through (with the help of Dan and Aslak, who have already pitched in ) - welcome and lots of fun! Let's get together some time this week or the next - IRC, G+ hangout, whatevs.
Of course, you will get support from the whole Arquillian team, and specifically Aslak and myself. That's the Arquillian ethos
-
50. Re: GSoC - Arquillian Spring Integration
dan.j.allen Apr 24, 2012 2:54 PM (in response to jmnarloch)Jakub Narloch wrote:
Hi again,
Dan Allen wrote:
Jakub, a really great deliverable by the end of the summer would be a "getting started" guide for testing Spring with Arquillian. Perhaps even two guides, one for Spring beans and one for Spring MVC. There is no better way to show off your work than to channel developers to the guide. We'll of course host it in the guides section of arquillian.org.
(Trust me, writing these guides is easy because you don't have to worry about anything except what you want to say and show).
I would be glad to do this. This is one of the reasons this project is so cool, that undoubtedly is has great potential, at least as I see it.
Excellent. And thanks for appreciating the effort. We really put a lot of care into them and it already seems to be helping users a ton. Win!
But first I got to work on the code to make it both functional and relieable.
Absolutely.
-
51. Re: GSoC - Arquillian Spring Integration
marius.bogoevici Apr 24, 2012 3:20 PM (in response to dan.j.allen)Win!
-
52. Re: GSoC - Arquillian Spring Integration
jmnarloch Apr 25, 2012 10:06 AM (in response to marius.bogoevici)Hi Marius,
Could I ask You to send me a email at email address from my proposal. I will contiue to post the progress of my work in this thread and in fallowing threads but some stuff let's say typicaly organizational we could discuss more directly.
Cheers.
-
53. Re: GSoC - Arquillian Spring Integration
jmnarloch Apr 27, 2012 2:12 AM (in response to jmnarloch)I had run into quite unexpected issue, I was adding additional containers for the integration tests (https://github.com/jmnarloch/arquillian-container-spring-testsuite) and it occured that the same tests that successfully had run withn JBoss AS 6 are not working with either AS 7 or AS 5. The sympthons are the same in the both cases the beans in the tests are not being injected, in case of the AS 7 I run the debug. But I only manage to came into conclusion that the extension on the server side isn't invoked, although the LoadableExtension on the client side in invoked and it's seams that everything is packaged into test deployment.
As for AS 5 I am aware that in current version some of the tests are going to fail, but the rest should work perfectly well.
-
54. Re: GSoC - Arquillian Spring Integration
dan.j.allen Apr 27, 2012 2:56 AM (in response to jmnarloch)Could it have something to do with the considerations of running Spring on AS 7?
https://docs.jboss.org/author/display/AS7/Spring+applications+development+and+migration+guide
Marius, of course, is more qualified to fill in the details.
-
55. Re: GSoC - Arquillian Spring Integration
jmnarloch Apr 27, 2012 3:11 AM (in response to dan.j.allen)Dan Allen wrote:
Could it have something to do with the considerations of running Spring on AS 7?
https://docs.jboss.org/author/display/AS7/Spring+applications+development+and+migration+guide
Marius, of course, is more qualified to fill in the details.
Not sure about that.
I had currently fallowing problem. After adding for the remote AS 7 fallowing depedency
{code}
<dependency>
<groupId>org.jboss.as</groupId>
<artifactId>jboss-as-arquillian-container-remote</artifactId>
<version>7.1.1.Final</version>
</dependency>
{code}
I'm getting the fallowing exception:
{code}
-------------------------------------------------------------------------------
Test set: org.jboss.arquillian.spring.testsuite.test.AnnotatedConfigurationTestCase
-------------------------------------------------------------------------------
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.87 sec <<< FAILURE!
org.jboss.arquillian.spring.testsuite.test.AnnotatedConfigurationTestCase Time elapsed: 0 sec <<< ERROR!
java.lang.RuntimeException: Could not create a new instance of class org.jboss.arquillian.test.impl.EventTestRunnerAdaptor see cause.
at org.jboss.arquillian.test.spi.SecurityActions.newInstance(SecurityActions.java:170)
at org.jboss.arquillian.test.spi.TestRunnerAdaptorBuilder.build(TestRunnerAdaptorBuilder.java:52)
at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:93)
at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:53)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:123)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:104)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:164)
at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:110)
at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:175)
at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcessWhenForked(SurefireStarter.java:107)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:68)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
at org.jboss.arquillian.test.spi.SecurityActions.newInstance(SecurityActions.java:166)
... 14 more
Caused by: java.lang.IllegalStateException: Defined default protocol Servlet 3.0 can not be found on classpath
at org.jboss.arquillian.container.test.impl.client.protocol.ProtocolRegistryCreator.createRegistry(ProtocolRegistryCreator.java:61)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135)
at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:115)
at org.jboss.arquillian.core.impl.ManagerImpl.bindAndFire(ManagerImpl.java:236)
at org.jboss.arquillian.core.impl.InstanceImpl.set(InstanceImpl.java:74)
at org.jboss.arquillian.config.impl.extension.ConfigurationRegistrar.loadConfiguration(ConfigurationRegistrar.java:68)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135)
at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:115)
at org.jboss.arquillian.core.impl.ManagerImpl.start(ManagerImpl.java:261)
at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.<init>(EventTestRunnerAdaptor.java:56)
... 19 more
{code}
I tried different aproaches as described here: https://community.jboss.org/thread/171858 without luck.
-
56. Re: GSoC - Arquillian Spring Integration
dan.j.allen Apr 27, 2012 3:17 AM (in response to jmnarloch)Aha, I know what you likely need to do. You need to add the JAR file:
<dependency> <groupId>org.jboss.arquillian.protocol</groupId> <artifactId>arquillian-protocol-servlet</artifactId> <scope>test</scope> </dependency>
It's not added by default by the AS 7 adapter.
This really needs to go into the getting started guide. I've been avoiding it because...well, I've just been avoiding it
-
57. Re: GSoC - Arquillian Spring Integration
dan.j.allen Apr 27, 2012 3:18 AM (in response to dan.j.allen)You can read about it in the following README from the JBoss BOM project:
https://github.com/jboss/jboss-bom/tree/master/jboss-javaee-6.0-with-tools
-
58. Re: GSoC - Arquillian Spring Integration
jmnarloch Apr 27, 2012 3:22 AM (in response to dan.j.allen)Thanks Dan, You saved my day
{code}
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running org.jboss.arquillian.spring.testsuite.test.AnnotatedConfigurationTestCase
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 19.626 sec
Running org.jboss.arquillian.spring.testsuite.test.ApplicationContextTestCase
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 5.496 sec
Running org.jboss.arquillian.spring.testsuite.test.DefaultEmployeeRepositoryTestCase
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 4.438 sec
Running org.jboss.arquillian.spring.testsuite.test.DefaultEmployeeServiceTestCase
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 4.865 sec
Running org.jboss.arquillian.spring.testsuite.test.EmployeeControlerTestCase
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 6.974 sec
Running org.jboss.arquillian.spring.testsuite.test.EmployeeControllerContextTestCase
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 7.016 sec
Running org.jboss.arquillian.spring.testsuite.test.EmployeeControllerContextWebInitTestCase
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 6.288 sec
Running org.jboss.arquillian.spring.testsuite.test.EmployeeControllerWebInitTestCase
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 5.36 sec
Running org.jboss.arquillian.spring.testsuite.test.InheritedConfigurationTestCase
Tests run: 1, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 0.001 sec
Running org.jboss.arquillian.spring.testsuite.test.NoConfigurationTestCase
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 4.254 sec
Running org.jboss.arquillian.spring.testsuite.test.NoMatchingBeanTestCase
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 4.181 sec
Running org.jboss.arquillian.spring.testsuite.test.NullEmployeeRepositoryTestCase
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.645 sec
Running org.jboss.arquillian.spring.testsuite.test.PackageConfigurationTestCase
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.884 sec
Running org.jboss.arquillian.spring.testsuite.test.XmlConfigurationTestCase
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.963 sec
Results :
Tests run: 16, Failures: 0, Errors: 0, Skipped: 1
{code}
-
59. Re: GSoC - Arquillian Spring Integration
dan.j.allen Apr 27, 2012 3:30 AM (in response to jmnarloch)Green bar!