2 Replies Latest reply on Jan 4, 2009 8:53 AM by Mritunjay Kumar

    How to make JSFUnit test case a part of build process.

    Mritunjay Kumar Newbie

      I want to make my JSFUnit test case part of build process, so whenever we take build our test case related with JSFUnit will execute and generate a report and output it to a definite location.

      Please suggest us how to achieve this.

      Regards,
      Mritunjay

        • 1. Re: How to make JSFUnit test case a part of build process.
          Stan Silvert Master

          Hi,

          See the articles under "Building and Running Tests" at the bottom of this wiki page:

          http://www.jboss.org/community/docs/DOC-10967


          Regards,

          Stan

          • 2. Re: How to make JSFUnit test case a part of build process.
            Mritunjay Kumar Newbie

            To make JSFunit test part of the maven build process we need to cobfigure this plugin on pom.xml

            <plugin>
             <groupId>org.codehaus.mojo</groupId>
             <artifactId>was6-maven-plugin</artifactId>
             <version>1.0</version>
             <executions>
             <execution>
             <id>wsStopServer-pre-integration-test</id>
             <phase>pre-integration-test</phase>
             <goals>
             <goal>wsStopServer</goal>
             </goals>
             </execution>
             <execution>
             <id>wsAdmin-pre-integration-test</id>
             <phase>pre-integration-test</phase>
             <goals>
             <goal>wsAdmin</goal>
             </goals>
             <configuration>
             <language>jython</language>
             <script>wsScript.py</script>
             </configuration>
             </execution>
             <execution>
             <id>wsStartServer-pre-integration-test</id>
             <phase>pre-integration-test</phase>
             <goals>
             <goal>wsStartServer</goal>
             </goals>
             </execution>
             <execution>
             <id>wsUninstallApp-post-integration-test</id>
             <phase>post-integration-test</phase>
             <goals>
             <goal>wsUninstallApp</goal>
             </goals>
             </execution>
             <execution>
             <id>wsStopServer-post-integration-test</id>
             <phase>post-integration-test</phase>
             <goals>
             <goal>wsStopServer</goal>
             </goals>
             </execution>
             </executions>
             <configuration>
             <wasHome>C:\Program Files\IBM\SDP70\runtimes\bi_v61</wasHome>
             <conntype>NONE</conntype>
             <host>localhost</host>
             <username>admin</username>
             <user>admin</user>
             <password>admin</password>
             <profileName>ProcSrv03</profileName>
             <verbose>true</verbose>
             <updateExisting>false</updateExisting>
             </configuration>
             </plugin>
            


            and the wsScript.py is

            #
            #Author Mritunjay Kumar
            #
            
            print "Installing the application"
            
            #Install the application
            print AdminApp.install("C:/JSFUnitMaven/JSFUnitMavenTest/target/JSFUnitMavenTest.war", "[-contextroot JSFUnitMavenTest -defaultbinding.virtual.host default_host -usedefaultbindings]")
            
            print "Saving the configuration"
            
            AdminConfig.save().
            

            Thanks Stan for you support.