4 Replies Latest reply on Jan 12, 2011 2:35 PM by hmashruf

    JsfUnit setup exception

    hmashruf

      Hi there,

       

      I have maven application (myapp) setup as multi-module (2 sub-modules as springservices and jsfbeans), as per the instructions in the getting started guide (http://www.jboss.org/jsfunit/gettingstarted); followed by creation of new sub-module (JSFUnified) for myapp and declared those 2 modules as dependencies and wrote a jsfUnit test case. From the eclipse menu 'maven install' is run on the JSFUnified, it runs the life cycle phases. Here is the trace and using cargo to start/stop jetty7x. But it is ignoring the tests. Do you see I miss any step. thanks.

       

      Maven 2.2.1, Jdk 1.6

       

      --- xmlbeans-maven-plugin:2.3.2:xmlbeans (default) @ myapp ---

      [INFO] Nothing to generate.

      [INFO]

      [INFO] --- maven-resources-plugin:2.4.1:resources (default-resources) @ myapp ---

      [WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!

      [INFO] Copying 0 resource

      [INFO]

      [INFO] --- maven-compiler-plugin:2.0.2:compile (default-compile) @ myapp ---

      [INFO] Nothing to compile - all classes are up to date

      [INFO]

      [INFO] --- maven-resources-plugin:2.4.1:testResources (default-testResources) @ myapp ---

      [WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!

      [INFO] skip non existing resourceDirectory G:\development\code\fs-myapp\trunk\JSFUnified\src\test\resources

      [INFO]

      [INFO] --- maven-compiler-plugin:2.0.2:testCompile (default-testCompile) @ myapp ---

      [INFO] Not compiling test sources

      [INFO]

      [INFO] --- maven-surefire-plugin:2.4.3:test (default-test) @ myapp ---

      [INFO] No tests to run.

      [INFO]

      [INFO] --- maven-surefire-plugin:2.4.3:test (surefire-it) @ myapp ---

      [INFO] No tests to run.

      [INFO]

      [INFO] --- maven-war-plugin:2.0:war (default-war) @ myapp ---

      [INFO] Exploding webapp...

      [INFO] Copy webapp webResources to G:\development\code\fs-myapp\trunk\JSFUnified\target\myapp

      [INFO] Assembling webapp myapp in G:\development\code\fs-myapp\trunk\JSFUnified\target\myapp

      [INFO] Overlaying 1 war(s).

      [INFO] Generating war G:\development\code\fs-myapp\trunk\JSFUnified\target\myapp.war

      [INFO] Building war: G:\development\code\fs-myapp\trunk\JSFUnified\target\myapp.war

      [INFO]

      [INFO] --- cargo-maven2-plugin:1.0.4-SNAPSHOT:start (start-container) @ myapp ---

      [INFO] [beddedLocalContainer] Jetty 7.x Embedded starting...

      2011-01-10 18:26:05.039:INFO::jetty-7.1.6.v20100715

      2011-01-10 18:26:05.601:INFO::Extract jar:file:/G:/development/code/fs-myapp/trunk/JSFUnified/target/myapp.war!/ to G:\development\code\fs-myapp\trunk\JSFUnified\target\myapp

      2011-01-10 18:27:43.289:INFO:/myapp:Set web app root system property: 'webapp.root' = [G:\development\code\fs-myapp\trunk\JSFUnified\target\myapp] null null

      2011-01-10 18:27:43.320:INFO:/myapp:Initializing log4j from [G:\development\code\fs-myapp\trunk\JSFUnified\target\myapp\WEB-INF\log4j_dev.properties] null null

      2011-01-10 18:27:43.492:INFO:/myapp:Initializing Spring root WebApplicationContext null null

      Jan 10, 2011 6:27:47 PM com.sun.faces.config.ConfigureListener contextInitialized

      INFO: Initializing Mojarra 2.0.3 (FCS b03) for context '/myapp'

      Jan 10, 2011 6:27:48 PM com.sun.faces.spi.InjectionProviderFactory createInstance

      INFO: JSF1048: PostConstruct/PreDestroy annotations present.  ManagedBeans methods marked with these annotations will have said annotations processed.

      Jan 10, 2011 6:27:50 PM com.sun.faces.config.ConfigureListener$WebConfigResourceMonitor$Monitor <init>

      INFO: Monitoring file:/G:/development/code/fs-myapp/trunk/JSFUnified/target/myapp/WEB-INF/faces-config.xml for modifications

      Jan 10, 2011 6:27:50 PM com.sun.faces.config.WebConfiguration$DeferredBooleanParameterLoggingAction log

      WARNING: JSF1025: [/myapp] Context initialization parameter 'facelets.SKIP_COMMENTS' is deprecated.  The option will still be configured, but please use 'javax.faces.FACELETS_SKIP_COMMENTS' in the future.

      Jan 10, 2011 6:27:50 PM com.sun.faces.config.WebConfiguration$DeferredBooleanParameterLoggingAction log

      INFO: JSF1020: [/myapp] Configuration option 'javax.faces.FACELETS_SKIP_COMMENTS' RESET to ENABLED

      2011-01-10 18:27:50.508:INFO::Extract jar:file:/G:/development/code/fs-myapp/trunk/JSFUnified/target/jetty7x/cargocpc.war!/ to C:\Documents and Settings\hashruf\Local Settings\Temp\Jetty_0_0_0_0_8080_cargocpc.war__cargocpc__xflgf3\webapp

      2011-01-10 18:27:50.570:INFO::Started SelectChannelConnector@0.0.0.0:8080

      [INFO] [beddedLocalContainer] Jetty 7.x Embedded started on port [8080]

      [INFO]

      [INFO] --- cargo-maven2-plugin:1.0.4-SNAPSHOT:stop (stop-container) @ myapp ---

      [INFO] [beddedLocalContainer] Jetty 7.x Embedded is stopping...

      2011-01-10 18:27:51.086:INFO:/myapp:Closing Spring root WebApplicationContext null null

      2011-01-10 18:27:51.086:INFO:/myapp:Shutting down log4j null null

      [INFO] [beddedLocalContainer] Jetty 7.x Embedded is stopped

      [INFO]

      [INFO] --- maven-install-plugin:2.3:install (default-install) @ myapp ---

      [INFO] Installing G:\development\code\fs-myapp\trunk\JSFUnified\target\myapp.war to C:\Development\repository\com\cla\ai\fs-myapp\myapp\1.0-SNAPSHOT\myapp-1.0-SNAPSHOT.war

      [INFO] ------------------------------------------------------------------------

      [INFO] BUILD SUCCESS

      [INFO] ------------------------------------------------------------------------

      [INFO] Total time: 2:31.516s

      [INFO] Finished at: Mon Jan 10 18:27:55 PST 2011

      [INFO] Final Memory: 12M/36M

      [INFO] ------------------------------------------------------------------------

       

       

      Sure fire plugin entry from pom.xml of the new submodule:

       

      <groupId>org.apache.maven.plugins</groupId>

                  <artifactId>maven-surefire-plugin</artifactId>      

       

                  <!-- We only want test to run during integration-test phase -->

                  <configuration>

                    <skip>false</skip>

                    <testFailureIgnore>true</testFailureIgnore>

                  </configuration>

       

                  <executions>

                    <execution>

                      <id>surefire-it</id>

                      <phase>test</phase>

                      <goals>

                        <goal>test</goal>

                      </goals>

                      <configuration>

                        <skip>false</skip>

                        <systemProperties>

                          <property>

                            <name>cactus.contextURL</name>

                            <value>http://localhost:8080/${artifactId}</value>

                          </property>

                        </systemProperties>

                      </configuration>

                    </execution>

                  </executions>

                </plugin>

       

       

      Exception: on running: mvn integration-test from console

       

      INFO: Initializing Mojarra 2.0.3 (FCS b03) for context '/myapp'

       

      log4j:WARN No appenders could be found for logger (org.richfaces.log.Renderkit).

       

       

      log4j:WARN Please initialize the log4j system properly.

       

      Jan 10, 2011 7:24:14 PM com.sun.faces.config.ConfigManager initialize

       

      INFO: Unsanitized stacktrace from failed start...

       

      com.sun.faces.config.ConfigurationException:

       

        Source Document: file:/G:/development/code/fs-myapp/trunk/JSFUnified/target/

       

      myapp/WEB-INF/faces-config.xml

       

        Cause: Unable to create a new instance of 'com.la.is.fs.myapp.phaselisten

       

      er.myappPhaseListener': java.lang.NullPointerException

       

              at com.sun.faces.config.processor.AbstractConfigProcessor.createInstance

       

      (AbstractConfigProcessor.java:289)

       

              at com.sun.faces.config.processor.LifecycleConfigProcessor.addPhaseListe

       

      ners(LifecycleConfigProcessor.java:128)

       

              at com.sun.faces.config.processor.LifecycleConfigProcessor.process(Lifec

       

      ycleConfigProcessor.java:107)

       

              at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(Abs

       

      tractConfigProcessor.java:110)

       

              at com.sun.faces.config.processor.FactoryConfigProcessor.process(Factory

       

      ConfigProcessor.java:212)

       

              at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:332)

       

       

              at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureLi

       

      stener.java:220)

       

              at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextH

       

      andler.java:634)

       

              at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletC

       

      ontextHandler.java:228)

       

              at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.jav

       

      a:1132)

       

              at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandle

       

      r.java:577)

       

              at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:491

       

      )

       

              at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLife

       

      Cycle.java:55)

       

              at org.eclipse.jetty.server.handler.HandlerCollection$1.run(HandlerColle

       

      ction.java:200)

       

              at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool

       

      .java:450)

       

              at java.lang.Thread.run(Thread.java:619)

       

      Caused by: java.lang.NullPointerException

       

              at com.la.is.fs.myapp.phaselistener.myappPhaseListener.<init>(Non

       

      PearPhaseListener.java:35)

       

              at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

       

       

              at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct

       

      orAccessorImpl.java:39)

       

              at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC

       

      onstructorAccessorImpl.java:27)

       

              at java.lang.reflect.Constructor.newInstance(Constructor.java:513)

       

              at java.lang.Class.newInstance0(Class.java:355)

       

              at java.lang.Class.newInstance(Class.java:308)

       

              at com.sun.faces.config.processor.AbstractConfigProcessor.createInstance

       

      (AbstractConfigProcessor.java:264)

       

              ... 15 more

        • 1. Re: JsfUnit setup exception
          ssilvert

          Your phase listener has a NullPointerException.  I don't think that has anything to do with JSFUnit:

           Cause: Unable to create a new instance of 'com.la.is.fs.myapp.phaselisten
          
          er.myappPhaseListener': java.lang.NullPointerException
          
                  at com.sun.faces.config.processor.AbstractConfigProcessor.createInstance
          
          (AbstractConfigProcessor.java:289)
          
                  at com.sun.faces.config.processor.LifecycleConfigProcessor.addPhaseListe
          
          ners(LifecycleConfigProcessor.java:128)
          

           

          Also, you have surefire set up to run during the "test" phase.  It needs to run during the "integration-test" phase.  Take another look at the documentation to see an example.

           

          Hope that helps,

           

          Stan

          • 2. JsfUnit setup exception
            hmashruf

            Hi Stan,

             

            I am able to resolve earlier NullPointerException, now when I execute mvn:install on console, here I get the trace: But still it is not picking up JsfUnit test cases. I am following http://www.jboss.org/jsfunit/gettingstarted: also I have downloaded the examples of hellojsf from svn, it is also skipping the tests, says 'There are not tests to run'. I must be missing an important step. Kindly let me know. Thank you.

             

            G:\development\code\fs-myapp\trunk\fs-myapp-test>mvn integration-test

            [INFO] Scanning for projects...

            [INFO] ------------------------------------------------------------------------

            [INFO] Building fs-myapp-test Maven Webapp

            [INFO]    task-segment: [integration-test]

            [INFO] ------------------------------------------------------------------------

            [INFO] snapshot com.la.is.fs-myapp:web:1.0-SNAPSHOT: checking for updates f

            rom snapshot

            [INFO] snapshot com.la.is.fs-myapp:web:1.0-SNAPSHOT: checking for updates f

            rom snapshots.jboss.org

            [INFO] snapshot com.la.is.fs-myapp:web:1.0-SNAPSHOT: checking for updates f

            rom repository.jboss.com

            [INFO] snapshot com.la.is.fs-myapp:web:1.0-SNAPSHOT: checking for updates f

            rom maven2-repository.dev.java.net

            [INFO] snapshot com.la.is.fs-myapp:services:1.0-SNAPSHOT: checking for upda

            tes from snapshot

            [INFO] snapshot com.la.is.fs-myapp:services:1.0-SNAPSHOT: checking for upda

            tes from snapshots.jboss.org

            [INFO] snapshot com.la.is.fs-myapp:services:1.0-SNAPSHOT: checking for upda

            tes from repository.jboss.com

            [INFO] snapshot com.la.is.fs-myapp:services:1.0-SNAPSHOT: checking for upda

            tes from maven2-repository.dev.java.net

            Downloading: http://dev9.is.la.com:8080/archiva/repository/snapshots//velo

            city-tools/velocity-tools-generic/1.4/velocity-tools-generic-1.4.pom

            [INFO] Unable to find resource 'velocity-tools:velocity-tools-generic:pom:1.4' i

            n repository internal (http://dev9.is.la.com:8080/archiva/repository/inter

            nal/)

            Downloading: http://dev9.is.la.com:8080/archiva/repository/internal//veloc

            ity-tools/velocity-tools-generic/1.4/velocity-tools-generic-1.4.pom

            [INFO] Unable to find resource 'velocity-tools:velocity-tools-generic:pom:1.4' i

            n repository snapshots.jboss.org (http://snapshots.jboss.org/maven2/)

            Downloading: http://dev9.is.la.com:8080/archiva/repository/internal//veloc

            ity-tools/velocity-tools-generic/1.4/velocity-tools-generic-1.4.pom

            [INFO] Unable to find resource 'velocity-tools:velocity-tools-generic:pom:1.4' i

            n repository repository.jboss.com (http://repository.jboss.com/maven2/)

            Downloading: http://dev9.is.la.com:8080/archiva/repository/internal//veloc

            ity-tools/velocity-tools-generic/1.4/velocity-tools-generic-1.4.pom

            [INFO] Unable to find resource 'velocity-tools:velocity-tools-generic:pom:1.4' i

            n repository maven2-repository.dev.java.net (http://download.java.net/maven/2/)

            Downloading: http://dev9.is.la.com:8080/archiva/repository/internal//veloc

            ity-tools/velocity-tools-generic/1.4/velocity-tools-generic-1.4.pom

            [INFO] Unable to find resource 'velocity-tools:velocity-tools-generic:pom:1.4' i

            n repository central (http://repo1.maven.org/maven2)

            [INFO] snapshot com.la.is.fs:fs-services:1.0-SNAPSHOT: checking for updates f

            rom snapshot

            [INFO] snapshot com.la.is.fs:fs-services:1.0-SNAPSHOT: checking for updates f

            rom snapshots.jboss.org

            [INFO] snapshot com.la.is.fs:fs-services:1.0-SNAPSHOT: checking for updates f

            rom repository.jboss.com

            [INFO] snapshot com.la.is.fs:fs-services:1.0-SNAPSHOT: checking for updates f

            rom maven2-repository.dev.java.net

            [INFO] snapshot com.la.is.fs-myapp:controllers:1.0-SNAPSHOT: checking for u

            pdates from snapshot

            [INFO] snapshot com.la.is.fs-myapp:controllers:1.0-SNAPSHOT: checking for u

            pdates from snapshots.jboss.org

            [INFO] snapshot com.la.is.fs-myapp:controllers:1.0-SNAPSHOT: checking for u

            pdates from repository.jboss.com

            [INFO] snapshot com.la.is.fs-myapp:controllers:1.0-SNAPSHOT: checking for u

            pdates from maven2-repository.dev.java.net

            [INFO] snapshot com.la.is.fs:fs-webutils-jsf20:1.0-SNAPSHOT: checking for upd

            ates from snapshot

            [INFO] snapshot com.la.is.fs:fs-webutils-jsf20:1.0-SNAPSHOT: checking for upd

            ates from snapshots.jboss.org

            [INFO] snapshot com.la.is.fs:fs-webutils-jsf20:1.0-SNAPSHOT: checking for upd

            ates from repository.jboss.com

            [INFO] snapshot com.la.is.fs:fs-webutils-jsf20:1.0-SNAPSHOT: checking for upd

            ates from maven2-repository.dev.java.net

            [INFO] snapshot com.la.is.fs:fs-webutils:1.0-SNAPSHOT: checking for updates f

            rom snapshot

            [INFO] snapshot com.la.is.fs:fs-webutils:1.0-SNAPSHOT: checking for updates f

            rom snapshots.jboss.org

            [INFO] snapshot com.la.is.fs:fs-webutils:1.0-SNAPSHOT: checking for updates f

            rom repository.jboss.com

            [INFO] snapshot com.la.is.fs:fs-webutils:1.0-SNAPSHOT: checking for updates f

            rom maven2-repository.dev.java.net

            [INFO] snapshot com.la.is.fs:fs-webutils-core:1.0-SNAPSHOT: checking for upda

            tes from snapshot

            [INFO] snapshot com.la.is.fs:fs-webutils-core:1.0-SNAPSHOT: checking for upda

            tes from snapshots.jboss.org

            [INFO] snapshot com.la.is.fs:fs-webutils-core:1.0-SNAPSHOT: checking for upda

            tes from repository.jboss.com

            [INFO] snapshot com.la.is.fs:fs-webutils-core:1.0-SNAPSHOT: checking for upda

            tes from maven2-repository.dev.java.net

            [INFO] snapshot org.jboss.jsfunit:jboss-jsfunit-analysis:2.0.0-SNAPSHOT: checkin

            g for updates from snapshot

            [INFO] snapshot org.jboss.jsfunit:jboss-jsfunit-analysis:2.0.0-SNAPSHOT: checkin

            g for updates from snapshots.jboss.org

            [INFO] snapshot org.jboss.jsfunit:jboss-jsfunit-analysis:2.0.0-SNAPSHOT: checkin

            g for updates from repository.jboss.com

            [INFO] snapshot org.jboss.jsfunit:jboss-jsfunit-analysis:2.0.0-SNAPSHOT: checkin

            g for updates from maven2-repository.dev.java.net

            [INFO] snapshot org.jboss.jsfunit:jboss-jsfunit:2.0.0-SNAPSHOT: checking for upd

            ates from snapshot

            [INFO] snapshot org.jboss.jsfunit:jboss-jsfunit:2.0.0-SNAPSHOT: checking for upd

            ates from snapshots.jboss.org

            [INFO] snapshot org.jboss.jsfunit:jboss-jsfunit:2.0.0-SNAPSHOT: checking for upd

            ates from repository.jboss.com

            [INFO] snapshot org.jboss.jsfunit:jboss-jsfunit:2.0.0-SNAPSHOT: checking for upd

            ates from maven2-repository.dev.java.net

            [INFO] [xmlbeans:xmlbeans {execution: default}]

            [INFO] Nothing to generate.

            [INFO] [resources:resources {execution: default-resources}]

            [WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources,

            i.e. build is platform dependent!

            [INFO] Copying 0 resource

            [INFO] [compiler:compile {execution: default-compile}]

            [INFO] Nothing to compile - all classes are up to date

            [INFO] [resources:testResources {execution: default-testResources}]

            [WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources,

            i.e. build is platform dependent!

            [INFO] skip non existing resourceDirectory G:\development\code\fs-myapp\trunk\

            fs-myapp-test\src\test\resources

            [INFO] [compiler:testCompile {execution: default-testCompile}]

            [INFO] Not compiling test sources

            [INFO] [surefire:test {execution: default-test}]

            [INFO] Tests are skipped.

            [INFO] [war:war {execution: default-war}]

            [INFO] Exploding webapp...

            [INFO] Copy webapp webResources to G:\development\code\fs-myapp\trunk\fs-nonpe

            ar-test\target\myapp

            [INFO] Assembling webapp myapp in G:\development\code\fs-myapp\trunk\fs-nonp

            ear-test\target\myapp

            [INFO] Overlaying 1 war(s).

            [INFO] Generating war G:\development\code\fs-myapp\trunk\fs-myapp-test\targe

            t\myapp.war

            [INFO] Building war: G:\development\code\fs-myapp\trunk\fs-myapp-test\target

            \myapp.war

            [INFO] Preparing jetty:run

            [WARNING] Removing: run from forked lifecycle, to prevent recursive invocation.

            [INFO] [xmlbeans:xmlbeans {execution: default}]

            [INFO] Nothing to generate.

            [INFO] [resources:resources {execution: default-resources}]

            [WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources,

            i.e. build is platform dependent!

            [INFO] Copying 0 resource

            [INFO] [compiler:compile {execution: default-compile}]

            [INFO] Nothing to compile - all classes are up to date

            [INFO] [resources:testResources {execution: default-testResources}]

            [WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources,

            i.e. build is platform dependent!

            [INFO] skip non existing resourceDirectory G:\development\code\fs-myapp\trunk\

            fs-myapp-test\src\test\resources

            [INFO] [compiler:testCompile {execution: default-testCompile}]

            [INFO] Not compiling test sources

            [INFO] [jetty:run {execution: start-jetty}]

            [INFO] Configuring Jetty for project: fs-myapp-test Maven Webapp

            [INFO] Webapp source directory = G:\development\code\fs-myapp\trunk\fs-myapp

            -test\src\main\webapp

            [INFO] web.xml file = G:\development\code\fs-myapp\trunk\fs-myapp-test\src\m

            ain\webapp\WEB-INF\web.xml

            [INFO] Classes = G:\development\code\fs-myapp\trunk\fs-myapp-test\target\cla

            sses

            2011-01-12 08:41:34.735::INFO:  Logging to STDERR via org.mortbay.log.StdErrLog

            [INFO] Context path = /myapp

            [INFO] Tmp directory =  determined at runtime

            [INFO] Web defaults = org/mortbay/jetty/webapp/webdefault.xml

            [INFO] Web overrides =  none

            [INFO] Webapp directory = G:\development\code\fs-myapp\trunk\fs-myapp-test\s

            rc\main\webapp

            [INFO] Starting jetty 6.1.10 ...

            2011-01-12 08:41:34.170::INFO:  jetty-6.1.10

            2011-01-12 08:41:39.730::INFO:  No Transaction manager found - if your webapp re

            quires one, please configure one.

            2011-01-12 08:41:40.105:/myapp:INFO:  Set web app root system property: 'webap

            p.root' = [G:\development\code\fs-myapp\trunk\fs-myapp-test\src\main\webapp\

            ]

            2011-01-12 08:41:40.105:/myapp:INFO:  Initializing log4j from [G:\development\

            code\fs-myapp\trunk\fs-myapp-test\src\main\webapp\WEB-INF\log4j_dev.properti

            es]

            2011-01-12 08:41:41.589:/myapp:INFO:  Initializing Spring root WebApplicationC

            ontext

            Jan 12, 2011 8:41:49 AM com.sun.faces.config.WebConfiguration processBooleanPara

            meters

            WARNING: JSF1025: [/myapp] Context initialization parameter 'facelets.SKIP_COM

            MENTS' is deprecated.  The option will still be configured, but please use 'java

            x.faces.FACELETS_SKIP_COMMENTS' in the future.

            Jan 12, 2011 8:41:49 AM com.sun.faces.config.WebConfiguration processBooleanPara

            meters

            INFO: JSF1020: [/myapp] Configuration option 'javax.faces.FACELETS_SKIP_COMMEN

            TS' RESET to ENABLED

            Jan 12, 2011 8:41:49 AM com.sun.faces.config.ConfigureListener contextInitialize

            d

            INFO: Initializing Mojarra 2.0.2 (FCS b10) for context '/myapp'

            2011-01-12 08:41:51.426::INFO:  Started SelectChannelConnector@0.0.0.0:8080

            [INFO] Started Jetty Server

            [INFO] [surefire:test {execution: surefire-it}]

            [INFO] Surefire report directory: G:\development\code\fs-myapp\trunk\fs-nonpea

            r-test\target\surefire-reports

             

             

             

            -------------------------------------------------------

            T E S T S

            -------------------------------------------------------

             

             

            There are no tests to run.

             

            Results :

             

            Tests run: 0, Failures: 0, Errors: 0, Skipped: 0

             

            [INFO] ------------------------------------------------------------------------

            [INFO] BUILD SUCCESSFUL

            [INFO] ------------------------------------------------------------------------

            [INFO] Total time: 1 minute 40 seconds

            [INFO] Finished at: Wed Jan 12 08:41:54 PST 2011

            [INFO] Final Memory: 36M/247M

            [INFO] ------------------------------------------------------------------------

            2011-01-12 08:41:54.333::INFO:  Shutdown hook executing

            2011-01-12 08:41:54.833:/myapp:INFO:  Closing Spring root WebApplicationContex

            t

            2011-01-12 08:41:54.848:/myapp:INFO:  Shutting down log4j

            2011-01-12 08:41:54.848::INFO:  Shutdown hook complete

            • 3. Re: JsfUnit setup exception
              ssilvert

              Did you follow step 8?

               

               

              <build>
                  <sourceDirectory>src/test/java</sourceDirectory>
                  <testSourceDirectory>src/test/java</testSourceDirectory>
              </build>

               

              Make sure that your test classes are bundled with your WAR that is deployed to Jetty.

               

              Also make sure that your test classes extend org.apache.cactus.ServletTestCase.

               

              Stan

              1 of 1 people found this helpful
              • 4. Re: JsfUnit setup exception
                hmashruf

                Hi Stan, I included them before my earlier response.

                 

                By the way, I found that if I put these lines in sure-fire plugin entry, the test cases are discovered and ran.

                 

                <includes>

                    <include>**/*/*Test.java</include>

                </includes>

                 

                Thank you