[jboss-as7-dev] testsuite

ssilvert at redhat.com ssilvert at redhat.com
Mon Feb 14 13:44:38 EST 2011


So let me ask it this way.  What's the easiest way to get an  
Arquillian test running with AS7?  It looks like the answer might be  
to use remote.  I almost got that running with  
jboss-as-arquillian-container-remote.  Am I required to use the forked  
Surefire with remote?

Without it, I got this message in the AS7 console:

13:06:33,072 INFO  [org.jboss.as.server.deployment] (pool-3-thread-4)  
Content wi
th name test.war added at location  
C:\projects\as7trunk\jboss-as\build\target\jb
oss-7.0.0.Alpha2\standalone\data\content\24\5a3cbc919f50f4d7384197c5755fd7fb5c83
9a\content

But there were two strange things.  First, I got this in my test output:
-------------------------------------------------------------------------------
Test set: org.jboss.jsfunit.example.hellojsf.HelloJSFTest
-------------------------------------------------------------------------------
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 13.846  
sec <<< FAILURE!
testInitialPage(org.jboss.jsfunit.example.hellojsf.HelloJSFTest)  Time  
elapsed: 6.089 sec  <<< ERROR!
java.lang.ClassNotFoundException:  
org.jboss.jsfunit.example.hellojsf.HelloJSFTest

I can see that the test class was indeed added to the WEB-INF/classes.  
  So I shouldn't get ClassNotFoundException.

But, it looks like jboss-as-arquillian-container-remote doesn't know  
I'm creating a WAR because it put all the supporting classes in the  
root of my WAR instead of putting them in WEB-INF/lib or  
WEB-INF/classes.

Stan

Quoting Kabir Khan <kabir.khan at jboss.com>:

>
> On 14 Feb 2011, at 15:19, Brian Stansberry wrote:
>
>> On 2/14/11 9:08 AM, ssilvert at redhat.com wrote:
>>> I see that there's not that much in there right now.  Am I free to add
>>> a JSF test module to testsuite or are we putting component tests
>>> somewhere else?
>>>
>>
>> Yes, you can add things. They should test more than the internals of a
>> module to go in testsuite though; stick internal module testing in the
>> module itself.
>>
>> There are a few submodules under testsuite; most likely stuff will go in
>> integration or smoke. Smoke runs every time someone builds, unless you
>> do -DskipTests=true, so don't stick stuff in there unless its important
>> to fail the build if the test breaks.
>>
>>> Also, is there any documentation on using the arquillian module that
>>> is there in the as7 build?
>>>
>>
>> I don't think so, although Kabir and Thomas often surprise me. :) Most
>> of the tests in testsuite/smoke use the arquillian modules though.
>
>
> The smoke tests still mainly use plain surefire which currently   
> relies on the classpath to bootstrap the test, then uses modules to   
> bootstrap the AS. So whatever is inside AS uses modular classloading.
>
> The forked surefire plugin   
> (http://community.jboss.org/wiki/JBossModulesSurefirePlugin) allows   
> using modules to bootstrap the test, meaning the test is fully   
> modular. This is currently used for ServerInModuleStartupTestCase. I  
>  have some code to bootstrap Arquillian fully embedded using the   
> plugin, but I have not put that in yet, since our demos have been   
> quite unstable the past 1.5 months with 2 major refactorings going   
> on. Once I've finished the bulk of my work on the domain stuff   
> (hopefully later this week) I plan on revisiting this, and using the  
>  fully modular environment for the current smoke tests.
>
>
> _______________________________________________
> 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