-
1. Re: Arquillian 4 starters
marti Oct 12, 2010 1:16 PM (in response to marti)Additional info:
JSF 1.2, servlet 2.5 is being used,
eclipse m2eclipse plugin installed.
by default JUnit 4.8 is being used.
-
2. Re: Arquillian 4 starters
michaelschuetz Oct 14, 2010 5:40 PM (in response to marti)Hi Marti,
OK, no worries i think we will find a nice solution that suites your usecase (-:
So, to summarize:
* Java EE 5 compliant environment, Tomcat 6, Junit
* purpose: focus on testing JSF
Are you using Maven? AFAIK, you do build your app with Eclipse and push WAR straight to integrated server config, right?
@Aslak: There is no chance to use Arquillian without Maven, right? Or is there some JBossTools magic for that?
OK, i think your environmet is clear and straight forward.
The Maven part is interesting.
JSFUnit integration is probably what you are looking for. Please have a look on this sample code:
Are you loooking for something like that?
Regards
Michael
-
3. Re: Arquillian 4 starters
michaelschuetz Oct 14, 2010 5:47 PM (in response to michaelschuetz)@Dan I just mentioned this related thread: http://community.jboss.org/thread/157684?tstart=0
How can we help Marti to get started with Arquillian quickly, even without using Maven?
-
4. Re: Arquillian 4 starters
marti Oct 14, 2010 5:51 PM (in response to michaelschuetz)Michael,
thanks for replying. Couple of days ago i opened a discussion about using Arquillian with non-maven projects... I got good answers... here is the link.
http://community.jboss.org/message/566366#566366
OK back to your post:
yes your summary was correct.
I'll look at the example and let you know what I get.
thanks,
marti
-
5. Re: Arquillian 4 starters
marti Oct 14, 2010 7:21 PM (in response to marti)I was able to import "arquillian-framework-jsfunit" into eclipse as aseparate project.
when I right click -> Debug as -> JUnit Test I get following error:
Exception occurred executing command line. Cannot run program "C:\Program Files\Java\jre6\bin\javaw.exe" (in directory "C:\Users\arquillian-framework-jsfunit"): CreateProcess error=87, The parameter is incorrect
It seems that JUnit can not be launched for some reasons!!!
I've never seen this msg before.
-
6. Re: Arquillian 4 starters
dan.j.allen Oct 15, 2010 12:26 AM (in response to michaelschuetz)We need to think about how to produce instructions for which libraries developer need for a given container...whether it be using Maven, Gradle or a shell script to fetch what you need and put it all in a folder somewhere.
To be honest, if you are testing on more than one container, using Arquillian without a dependency management solution is a tedious task.
If you are sticking to a single container, then I suppose you just dump all the JARs in a lib/ folder and add them all to the IDE classpath. That's a pretty old school approach. In that case I'm inclined to recommend the old "eclipse:eclipse" task of Maven (or Gradle).
I'll put something together as a prototype.
-
7. Re: Arquillian 4 starters
dan.j.allen Oct 15, 2010 3:08 PM (in response to marti)I have prepared an example project which demonstrates the Arquillian JSFUnit integration running in a Servlet container. The example has profiles for Jetty 8 and Tomcat 6, with the Jetty profile activating by default.
First, clone the repo and go into the jsfunit-servlet example
git clone http://github.com/arquillian/arquillian-examples cd arquillian-examples/jsfunit-servlet
You can then run the example on Jetty using this command:
mvn test
or on Tomcat using this command:
mvn test -Parq-tomcat-embedded
If you are not using Maven in your project, follow these steps to get the libraries you need.
- Install Maven 3 (for the purpose of using it as a script)
Run the following command on the project if you want to use Embedded Jetty (recommended)
mvn process-test-resources -Pcopy-test-libs
Run the following command on the project if you want to use Embedded Tomcat (recommended)
mvn process-test-resources -Parq-tomcat-embedded,copy-test-libs
- Now copy all the JARs in the target/test-libs directory into your own project and add them to the classpath
You will need to copy either src/test/resources-jetty/jsf-web.xml or src/test/resources-tomcat/jsf-web.xml into your project and use it in the ShrinkWrap archive (if you are using this example as a reference point).
NOTE
To get Tomcat 6 working, all of the auxiliary web.xml configuration must be added directly to web.xml that's added to the @Deployment archive. This will no longer be required once the fix to ARQ-316 is merged in.
-
8. Re: Arquillian 4 starters
marti Oct 15, 2010 5:37 PM (in response to dan.j.allen)Thank you guys for all the helps
I'll try it and let you know.
-
9. Re: Arquillian 4 starters
sri.narayanan.gce Apr 3, 2011 11:15 AM (in response to marti)Exception occurred executing command line.
Cannot run program "C:\Program Files\Java\jre6\bin\javaw.exe"
(in directory "C:\Users\arquillian-framework-jsfunit"):
CreateProcess error=87, The parameter is incorrectI am seeing the same error , was this problem solved ?
I followed the maven set up given in the arquillian doc
-
10. Arquillian 4 starters
mwtemple Apr 3, 2011 5:11 PM (in response to sri.narayanan.gce)The command line launch has exceeded 32k...
I know it sounds amazing but, there are over 400+ jars in JBoss (not sure about Tomcat).
Depending on where you installed it, it makes a HUGE difference.
Are you on windows?
Mark
-
11. Re: Arquillian 4 starters
sri.narayanan.gce Apr 6, 2011 2:18 PM (in response to mwtemple)Yes I am on windows
JBOSS in d:\server
Is it dependend on java location as well?
-
12. Re: Arquillian 4 starters
mwtemple Apr 6, 2011 4:57 PM (in response to sri.narayanan.gce)No.
It's mostly about where JBoss is installed and your included lib's are.
Look at the bottom of this post where I put some screenshots:
http://community.jboss.org/thread/164863?tstart=0
Thanks,
Mark
-
13. Arquillian 4 starters
sri.narayanan.gce Apr 6, 2011 5:03 PM (in response to mwtemple)Got a better solution with simpler dependency
http://community.jboss.org/thread/165071?tstart=0
Yes we need maven :-) Guess ur thread was not to use maven
-
14. Arquillian 4 starters
mwtemple Apr 6, 2011 5:07 PM (in response to sri.narayanan.gce)Yes, we don't use maven (yet)...