2011-10-25 23 views
8

Maven 3.0.3 ile Win XP'de Eclipse Indigo kullanıyorum. Eclipse'de hata ayıklamak istediğim bir Selenium 2 testi oluşturdum. Maven entegrasyon testi aşamasında çalışacak şekilde kuruldu. Konteyner olarak Tomcat ile Maven Cargo eklentisini kullanıyorum. İşte Birazdan sadece maven benim ayıklama Yapılandırma (Eclipse benim entegrasyon testi tıklayarak seçmek "Debug As" ve ardından seçtiğinizdeHata ayıklama Eclipse'de Maven entegrasyon testi

 <plugin> 
      <groupId>org.codehaus.cargo</groupId> 
      <artifactId>cargo-maven2-plugin</artifactId> 
      <configuration> 
       <container> 
        <containerId>tomcat${tomcat.major}x</containerId> 
        <zipUrlInstaller> 
         <url>http://archive.apache.org/dist/tomcat/tomcat-${tomcat.major}/v${tomcat.version}/bin/apache-tomcat-${tomcat.version}.tar.gz</url> 
         <downloadDir>${project.build.directory}/downloads</downloadDir> 
         <extractDir>${project.build.directory}/extracts</extractDir> 
        </zipUrlInstaller> 
        <output>${project.build.directory}/tomcat${tomcat.major}x.log</output> 
        <log>${project.build.directory}/cargo.log</log> 
       </container> 
       <configuration> 
        <home>${project.build.directory}/tomcat-${tomcat.version}/container</home> 
        <properties> 
         <cargo.logging>high</cargo.logging> 
         <cargo.servlet.port>8080</cargo.servlet.port> 
        </properties> 
       </configuration> 
      </configuration> 
      <executions> 
       <execution> 
        <id>start-container</id> 
        <phase>pre-integration-test</phase> 
        <goals> 
         <goal>start</goal> 
         <goal>deploy</goal> 
        </goals> 
        <configuration> 
         <deployer> 
          <deployables> 
           <deployable> 
            <groupId>${project.groupId}</groupId> 
            <artifactId>${project.artifactId}</artifactId> 
            <type>war</type> 
            <pingURL>http://localhost:8080/${project.artifactId}</pingURL> 
            <pingTimeout>30000</pingTimeout> 
            <properties> 
             <context>${project.artifactId}</context> 
            </properties> 
           </deployable> 
          </deployables> 
         </deployer> 
        </configuration> 
       </execution> 
       <execution> 
        <id>stop-container</id> 
        <phase>post-integration-test</phase> 
        <goals> 
         <goal>stop</goal> 
        </goals> 
       </execution> 
      </executions> 
     </plugin> 

     <plugin> 
      <groupId>org.apache.maven.plugins</groupId> 
      <artifactId>maven-surefire-plugin</artifactId> 
      <configuration> 
       <!-- Skip the normal tests, we'll run them in the integration-test phase --> 
       <skip>true</skip> 
      </configuration> 
      <executions> 
       <execution> 
        <phase>integration-test</phase> 
        <goals> 
         <goal>test</goal> 
        </goals> 
        <configuration> 
         <skip>false</skip> 
        </configuration> 
       </execution> 
      </executions> 
     </plugin> 

Sorun şu ki ... benim pom.xml alakalı bölüm var hedef "clean install -Dtest = TableIntegrationTest"), çalıştırdığım kesme noktasını kullanmadan çalışır (http://screencast.com/t/at0AKWwxslE). Eclipse'de JUnit/Selenium entegrasyon testinde nasıl hata ayıklama yapabilirim?

cevap

İlgili konular