6 Replies Latest reply on Feb 19, 2008 9:46 AM by ssilvert

    Trouble Getting Started

    jasondlee

      I'm having a bit of trouble getting started with JSFUnit. I've followed the Getting Started guide as best I can, as well as replicating the settings in the hello-jsfunit example, but I'm not having much luck. When I issue "mvn test" it compiles, tells me that tests were skipped and exits cleanly. If I change true to false (knowing it's probably wrong, but I'm swagging here :), I get a connection refused error. I'll have to confess that I'm still faily new to maven, and I've never used cactus, so that's certainly not in my favor.

      My POM is here: http://papernapkin.org/pastebin/view/16777/ If you need more information, let me know and I'll get what I can. Thanks a lot! :)

        • 1. Re: Trouble Getting Started
          ssilvert

          I noticed a couple of things:

          1) You are using 1.0-SNAPSHOT for your JSFUnit version. The first beta is out, so you can use 1.0-beta-1 or you can get the latest source and use 1.0-beta-2-SNAPSHOT.

          2) You are using JUnit 4.x. This will only work with JUnit 3.x because of some current limitations in Cactus.

          Stan

          • 2. Re: Trouble Getting Started
            jasondlee

            Good catch. Thanks. I corrected those two versions, but I'm getting the same outcome. If surefire is set to skip tests, nothing happens. If it is not, I get connection refused. Is there anything I need to do on the cactus or wagon side of things that I haven't done?

            • 3. Re: Trouble Getting Started
              ssilvert

              Sorry I'm late getting back to you. I've been at JBoss World and then on a short vacation.

              I assume you looked at this wiki?
              http://wiki.jboss.org/wiki/JSFUnitDocumentation

              And you saw "Using JSFUnit with Maven"?

              I can't see your POM any more, but I think I remember that you did set the cactus.contextURL property like this?

              <systemProperties>
               <property>
               <name>cactus.contextURL</name>
               <value>http://localhost:8080/${artifactId}</value>
               </property>
               </systemProperties>


              So if you might try hard-coding that property instead of using ${artifactId}. For more on the cactus.contextURL property see http://jakarta.apache.org/cactus/integration/manual/howto_config.html

              Stan

              • 4. Re: Trouble Getting Started
                ssilvert

                Also, if you are just issuing "mvn test" then your build won't make it to the "integration-test" phase, so the JSFUnit tests won't run. At the least you should run "mvn post-integration-test".

                Stan

                • 5. Re: Trouble Getting Started
                  jasondlee

                   

                  "stan.silvert@jboss.com" wrote:
                  Also, if you are just issuing "mvn test" then your build won't make it to the "integration-test" phase, so the JSFUnit tests won't run. At the least you should run "mvn post-integration-test".

                  Stan


                  Thanks. I stumbled across that somewhere. If I weren't still so new to maven, that might have been obvious. :) I'm now hitting the same issues with Seam that others appear to be having. I've got the JSFUnit source checked out, so I'm going to try a local build and see if SVN has some helpful bits for me :)

                  • 6. Re: Trouble Getting Started
                    ssilvert

                    The latest code in Subversion does fix the problems with conversation scope. You will depend on the new JSFUnit/Seam jar and use org.jboss.jsfunit.seam.SeamClient instead of JSFClientSession. SeamClient extends JSFClientSession.

                    For now, you will also see a stack trace from Seam that does not have any effect on your tests. The Seam team is looking into that problem now.

                    Stan