0 Replies Latest reply on May 8, 2012 10:09 AM by Marcin Kunicki

    Integration tests fails

    Marcin Kunicki Newbie

      Hi everyone
      I am new in seam and i have problem with tests

       

      I am using ant target

       

       

       

      [testng] [Parser] Running:
         [testng]   /home/masel/Programowanie/Java/Projects/galileo-SR1/ewicom/test-build/companyRegisterTest.xml
         [testng] 
         [testng] SKIPPED CONFIGURATION: @BeforeClass setupClass
         [testng] SKIPPED CONFIGURATION: @BeforeMethod begin
         [testng] SKIPPED CONFIGURATION: @AfterMethod end
         [testng] SKIPPED CONFIGURATION: @AfterClass cleanupClass
         [testng] SKIPPED: unitTestCreateCompanyCategory
         [testng] 
         [testng] ===============================================
         [testng]     Simple CompanyCategory Test
         [testng]     Tests run: 1, Failures: 0, Skips: 1
         [testng]     Configuration Failures: 0, Skips: 4
         [testng] ===============================================
         [testng] 
         [testng] FAILED CONFIGURATION: @BeforeSuite startSeam
         [testng] org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
         [testng] 
         [testng] *** CONTEXTS MISSING DEPENDENCIES: Name -> Dependency{Required State:Actual State}
         [testng] 
         [testng] jboss.jca:name=ewicomDatasource,service=DataSourceBinding
         [testng]  -> jboss:service=invoker,type=jrmp{Start:** NOT FOUND **}
         [testng]  -> jboss:service=invoker,type=jrmp{Create:** NOT FOUND **}
         [testng] 
         [testng] 
         [testng] *** CONTEXTS IN ERROR: Name -> Error
         [testng] 
         [testng] jboss:service=invoker,type=jrmp -> ** NOT FOUND **
         [testng] 
         [testng] 
         [testng]      at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:576)
         [testng]      at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:559)
         [testng]      at org.jboss.embedded.Bootstrap.bootstrapURL(Bootstrap.java:149)
         [testng]      at org.jboss.embedded.Bootstrap.bootstrap(Bootstrap.java:183)
         [testng]      at org.jboss.embedded.Bootstrap.bootstrap(Bootstrap.java:195)
         [testng]      at org.jboss.seam.mock.EmbeddedBootstrap.startAndDeployResources(EmbeddedBootstrap.java:11)
         [testng]      at org.jboss.seam.mock.AbstractSeamTest.startJbossEmbeddedIfNecessary(AbstractSeamTest.java:1024)
         [testng]      at org.jboss.seam.mock.AbstractSeamTest.startSeam(AbstractSeamTest.java:915)
         [testng]      at org.jboss.seam.mock.SeamTest.startSeam(SeamTest.java:58)
         [testng] ... Removed 15 stack frames
         [testng] SKIPPED CONFIGURATION: @BeforeClass setupClass
         [testng] SKIPPED CONFIGURATION: @BeforeMethod begin
         [testng] SKIPPED CONFIGURATION: @AfterMethod end
         [testng] SKIPPED CONFIGURATION: @AfterClass cleanupClass
         [testng] SKIPPED: addCompany
         [testng] 
         [testng] ===============================================
         [testng]     Integration Company Test
         [testng]     Tests run: 1, Failures: 0, Skips: 1
         [testng]     Configuration Failures: 1, Skips: 4
         [testng] ===============================================
         [testng] 
         [testng] 
         [testng] ===============================================
         [testng] Company register Tests
         [testng] Total tests run: 2, Failures: 0, Skips: 2
         [testng] Configuration Failures: 1, Skips: 9
         [testng] ===============================================
         [testng] 
      

       

       

       

      my ewicom-ds.xml (bootstrap/deploy)

       

       

       

      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE datasources
          PUBLIC "-//JBoss//DTD JBOSS JCA Config 1.5//EN"
          "http://www.jboss.org/j2ee/dtd/jboss-ds_1_5.dtd">
      <datasources>
         
         <local-tx-datasource>
            <jndi-name>ewicomDatasource</jndi-name>
            <use-java-context>false</use-java-context>
            <connection-url>jdbc:postgresql:ewicom</connection-url>
            <driver-class>org.postgresql.Driver</driver-class>
            <user-name>***************</user-name>
            <password>**************</password>
         </local-tx-datasource>
          
      </datasources>

       

       

       

      my tests

       

       

       

      package org.ewicom.test.companyregister;
      
      import org.jboss.seam.mock.SeamTest;
      import org.testng.annotations.Test;
      
      public class AddCompanyTest extends SeamTest {
      
           @Test
           public void addCompany() throws Exception {
      
                new FacesRequest() {
      
                     @Override
                     protected void invokeApplication() throws Exception {
                          setValue("#{credentials.username}", "masel");
                          setValue("#{credentials.password}", "qwerty");
                          invokeAction("#{identity.login}");
                     }
      
                     @Override
                     protected void renderResponse() throws Exception {
                          assert getValue("#{authenticatedMember}").equals("Marcin Kunicki (DKw)");
                     }
                     
                     
      
                }.run();
           }
      }