7 Replies Latest reply on Mar 12, 2008 2:03 PM by jugovi

    Integration Test Errors

      I am trying to get the test enviroment setup for my application.


      Environment
      Seam 2.0.1 GA/ JBoss 4.2.2


      I have a stripped down Integration Test which does nothing


      public class ReportActionTest extends SeamTest 
      
      {       
      
              @Test
      
              public void testReportComponent() throws Exception
      
              {
      
                      new ComponentTest()
      
                      {
      
                              protected void testComponents() throws Exception
      
                              {
      
                                      System.out.println("Running Test... Done");
      
                              }
      
                      }.run();
      
              }
      
      }
      
      



      When I run the test I get the following errors


      [testng] FAILED CONFIGURATION: @BeforeClass init
      
         [testng] org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete depl
      
      oyments (SEE PREVIOUS ERRORS FOR DETAILS):
      
         [testng] *** CONTEXTS MISSING DEPENDENCIES: Name -> Dependency{Required State:Actual State}
      
         [testng] cpsTestDatasource
      
         [testng] cpsTestDatasourceBootstrap
      
         [testng]  -> CachedConnectionManager{Configured:** NOT FOUND **}
      
         [testng]  -> TransactionManager{Configured:** NOT FOUND **}
      
         [testng]  -> InitialContextProperties{Configured:** NOT FOUND **}
      
         [testng] *** CONTEXTS IN ERROR: Name -> Error
      
         [testng] InitialContextProperties -> ** NOT FOUND **
      
         [testng] TransactionManager -> ** NOT FOUND **
      
         [testng] CachedConnectionManager -> ** NOT FOUND **
      
         [testng]     at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java
      
      :576)
      
         [testng]     at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.jav
      
      a:559)
      
         [testng]     at org.jboss.embedded.DeploymentGroup.process(DeploymentGroup.java:128)
      
         [testng]     at org.jboss.embedded.Bootstrap.deployResourceBases(Bootstrap.java:289)
      
         [testng]     at org.jboss.seam.mock.EmbeddedBootstrap.startAndDeployResources(EmbeddedBootstrap.java
      
      :15)
      
         [testng]     at org.jboss.seam.mock.BaseSeamTest.startJbossEmbeddedIfNecessary(BaseSeamTest.java:104
      
      1)
      
         [testng]     at org.jboss.seam.mock.BaseSeamTest.startSeam(BaseSeamTest.java:935)
      
         [testng]     at org.jboss.seam.mock.BaseSeamTest.init(BaseSeamTest.java:923)
      
         [testng]     at org.jboss.seam.mock.SeamTest.init(SeamTest.java:42)
      
         [testng] ... Removed 22 stack frames
      
         [testng] SKIPPED CONFIGURATION: @BeforeMethod begin
      
         [testng] SKIPPED CONFIGURATION: @AfterMethod end
      
         [testng] SKIPPED CONFIGURATION: @AfterClass cleanup
      
         [testng] SKIPPED: testReportComponent
      
         [testng] ===============================================
      
         [testng]     Report Action Test
      
         [testng]     Tests run: 1, Failures: 0, Skips: 1
      
         [testng]     Configuration Failures: 1, Skips: 3
      
         [testng] ===============================================
      
         [testng] ===============================================
      
         [testng] Functional Test
      
         [testng] Total tests run: 1, Failures: 0, Skips: 1
      
         [testng] Configuration Failures: 1, Skips: 3
      
         [testng] ===============================================
      
              



      I've verified that I dont have any jboss-system jars in my test classpath. I have my cps-ds.xml datasource definition in the test-directory. I havent made any changes to the bootstrap directory. It is the same one generated by seam-gen.


      Any ideas highly appreciated.


      Thanks in Advance


        • 1. Re: Integration Test Errors

          Where should the datasource definition for the test setup reside. The ant task has the following..



          <target name="buildtest" depends="compiletest" description="Build the tests">
                    <copy todir="${test.dir}">
                         <fileset dir="${basedir}/resources">
                              <exclude name="META-INF/persistence*.xml"/>
                              <exclude name="import*.sql"/>
                              <exclude name="${project.name}-*-ds.xml"/>     
                         </fileset>
                    </copy>
                    <copy tofile="${test.dir}/META-INF/persistence.xml" 
                             file="${basedir}/resources/META-INF/persistence-test.xml"
                       overwrite="true"/>
          
                    <copy tofile="${test.dir}/import.sql" 
                             file="${basedir}/resources/import-test.sql"
                       overwrite="true"/>
                    <copy todir="${test.dir}" flatten="true">
                         <fileset dir="${src.test.dir}">
                              <include name="**/*Test.xml" />
                         </fileset>
                    </copy>
               </target>


          All the data sources from the test.dir are excluded. I would have expected to see something like



                    <copy tofile="${test.dir}/${project.name}-ds.xml" 
                             file="${basedir}/resources/${project.name}-test-ds.xml"
                       overwrite="true"/>




          What is the correct way to setup the test datasource. Where should it reside?


          Thanks in Advance

          • 2. Re: Integration Test Errors
            pmuir

            put it in bootstrap/deploy

            • 3. Re: Integration Test Errors
              chaituis017

              Hi even i have the same problem i added the ds.xml under the bootstrap/deploy getting the same error is there anything else i need to do to make the testng working.

              • 4. Re: Integration Test Errors
                pmuir

                Is your -ds.xml deployed?

                • 5. Re: Integration Test Errors
                  chaituis017

                  Thanks for the response,


                  yes its deployed

                  • 6. Re: Integration Test Errors
                    jugovi

                    I have stumbled on the same problem.
                    Naga have you foind any solutions?
                    Copying ds.xml didn't work.


                    thanks

                    • 7. Re: Integration Test Errors
                      jugovi

                      I found my error, the ds.xml in meta-inf had a capital letter where it souldn't have.