2017-05-07 1 views
0

maven, surefire 및 jenkins를 사용하여 SoapUI xml 프로젝트 파일을 실행하려고합니다. 빌드가 완료된 후 모든 빌드가 완료되면 Jenkins에 표시되는 Junit 보고서 (매우 기본적인 정보 - 테스트 케이스 이름 및 상태)SoapUI, Maven, Surefire 및 Jenkins 통합

보고서와 로그를 표시하려면 surefire를 사용하고 싶습니다. 로그 파일의 경우 target/surfire-report/all * .xml 및 * .txt). 확실한 보고서 및 로그 파일을 표시하도록 젠킨스를 구성하는 방법은 무엇입니까?

여기 내 pom.xml 파일

<pluginRepositories> 
    <pluginRepository> 
     <id>smartbear-sweden-plugin-repository</id> 
     <url>http://www.soapui.org/repository/maven2/</url> 
    </pluginRepository> 
</pluginRepositories> 
<build> 
    <plugins> 
     <plugin> 
      <groupId>com.smartbear.soapui</groupId> 
      <artifactId>soapui-maven-plugin</artifactId> 
      <version>5.3.0</version> 
      <configuration> 
       <projectFile>${basedir}/src/test/java/Test-API-soapui-project.xml</projectFile> 
       <outputFolder>${basedir}/target/surefire-reports/</outputFolder> 
       <junitReport>true</junitReport> 
       <exportwAll>true</exportwAll> 
       <printReport>true</printReport> 
      </configuration> 
      <executions> 
       <execution> 
        <id>soapUI</id> 
        <phase>integration-test</phase> 
        <goals> 
         <goal>test</goal> 
        </goals> 
       </execution> 
      </executions> 
      <dependencies> 
       <dependency> 
        <groupId>com.smartbear.soapui</groupId> 
        <artifactId>soapui</artifactId> 
        <version>5.3.0</version> 
        <exclusions> 
         <exclusion> 
          <groupId>javafx</groupId> 
          <artifactId>jfxrt</artifactId> 
         </exclusion> 
        </exclusions> 
       </dependency> 
      </dependencies> 
     </plugin> 
     <plugin> 
      <groupId>org.apache.maven.plugins</groupId> 
      <artifactId>maven-surefire-report-plugin</artifactId> 
      <version>2.20</version> 
     </plugin> 
    </plugins> 
</build> 

답변

1

이 고정있어 확실하지,하지만 이것은 내가 그것을 한 방법이다.

프로젝트 빌드 용 젠킨스에서 추가 빌드 후 조치 게시 junit 테스트 보고서 결과. 테스트 보고서 XML을으로 설정하면 보고서가 작성된 대상/surefire-reports 디렉터리를 가리킬 수 있습니다. 아래의 예에서는 config 디렉토리에있는 하위 모듈 "dev"에서 테스트를 실행하고 있습니다. Jenkins가 xmls 보고서를 찾을 수없는 경우 빨간색 오류 메시지를 표시하고 xmls 보고서를 찾았을 때 아무 것도 표시하지 않으므로 알맞은시기를 알 수 있습니다.

희망이 도움이됩니다.

enter image description here

관련 문제