7 Replies Latest reply on Mar 12, 2008 2:03 PM by Julien Godin-Viau

    Integration Test Errors

    Jack C Newbie

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

      Seam 2.0.1 GA/ JBoss 4.2.2

      I have a stripped down Integration Test which does nothing

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

      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
         [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
         [testng]     at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.jav
         [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
         [testng]     at org.jboss.seam.mock.BaseSeamTest.startJbossEmbeddedIfNecessary(BaseSeamTest.java:104
         [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
          Jack C Newbie

          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"/>     
                    <copy tofile="${test.dir}/META-INF/persistence.xml" 
                    <copy tofile="${test.dir}/import.sql" 
                    <copy todir="${test.dir}" flatten="true">
                         <fileset dir="${src.test.dir}">
                              <include name="**/*Test.xml" />

          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" 

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

          Thanks in Advance

          • 2. Re: Integration Test Errors
            Pete Muir Master

            put it in bootstrap/deploy

            • 3. Re: Integration Test Errors
              Naga Chaitanya Newbie

              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
                Pete Muir Master

                Is your -ds.xml deployed?

                • 5. Re: Integration Test Errors
                  Naga Chaitanya Newbie

                  Thanks for the response,

                  yes its deployed

                  • 6. Re: Integration Test Errors
                    Julien Godin-Viau Newbie

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


                    • 7. Re: Integration Test Errors
                      Julien Godin-Viau Newbie

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