2016-10-06 8 views
1

을 표시하지 않습니다. 스크린 샷을 첨부했습니다. 나는 메이븐 테스트 또한확실한 보고서는 내가 받는다는</p> <p>내가 어떤 오류가 발생하지 오전하지만 메이븐 테스트로 실행했을 때 나는 또한 테스트 의 실행 결과를 얻고 있지 않다과 확실한 보고서를 구성한 테스트 결과

[INFO] Scanning for projects...[![enter image description here][1]][1] 
[INFO] 
[INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1 
[INFO]                   
[INFO] ------------------------------------------------------------------------ 
[INFO] Building TestApp 0.0.1-SNAPSHOT 
[INFO] ------------------------------------------------------------------------ 
[INFO] Downloading: http://repo.maven.apache.org/maven2/org/testng/testng/maven-metadata.xml 
[INFO] Downloaded: http://repo.maven.apache.org/maven2/org/testng/testng/maven-metadata.xml (3 KB at 1.0 KB/sec) 
[WARNING] The POM for org.testng:testng:jar:5.14.3 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details 
[WARNING] The POM for org.testng:testng:jar:5.14.4 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details 
[WARNING] The POM for org.testng:testng:jar:5.14.5 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details 
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ TestApp --- 
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent! 
[INFO] Copying 3 resources 
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ TestApp --- 
[INFO] Nothing to compile - all classes are up to date 
[INFO] 
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ TestApp --- 
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent! 
[INFO] skip non existing resourceDirectory E:\Workspace_Test\TestApp\src\test\resources 
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ TestApp --- 
[INFO] Nothing to compile - all classes are up to date 
[INFO] 
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ TestApp --- 
[INFO] Surefire report directory: E:\Workspace_Test\TestApp\target\surefire-reports 

------------------------------------------------------- 
T E S T S 
------------------------------------------------------- 
Running com.goibibo.tests.Tests 
Configuring TestNG with: [email protected]df17 
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 56.983 sec 

Results : 

Tests run: 1, Failures: 0, Errors: 0, Skipped: 0 

[INFO] ------------------------------------------------------------------------ 
[INFO] BUILD SUCCESS 
[INFO] ------------------------------------------------------------------------ 
[INFO] Total time: 01:05 min 
[INFO] Finished at: 2016-10-06T11:20:23+05:30 
[INFO] Final Memory: 12M/158M 
[INFO] ------------------------------------------------------------------------ 

부착 받는다는 프로젝트 구조의 스크린 샷과 enter image description here 보고서 스크린 샷

pom.xml 파일을 찾을으로 실행하면 다음과 같은 로그가 표시됩니다 Maven 프로젝트

의도 적절한 구조 당신이 TestNG를 사용하는 경우

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 
    <modelVersion>4.0.0</modelVersion> 
    <groupId>TestApp</groupId> 
    <artifactId>TestApp</artifactId> 
    <version>0.0.1-SNAPSHOT</version> 
    <build> 
<!-- <sourceDirectory>src</sourceDirectory>--> 
     <resources> 
      <resource> 
       <directory>Data</directory> 
       <excludes> 
        <exclude>**/*.java</exclude> 
       </excludes> 
      </resource> 
     </resources> 

      <plugins> 
       <plugin> 
        <artifactId>maven-compiler-plugin</artifactId> 
        <version>3.1</version> 
        <configuration> 
         <fork>true</fork> 
         <executable>C:\Program Files\Java\jdk1.8.0_101\bin\javac.exe</executable> 
         <source>1.8</source> 
         <target>1.8</target> 
        </configuration> 
       </plugin> 


       <plugin> 
        <groupId>org.apache.maven.plugins</groupId> 
        <artifactId>maven-surefire-report-plugin</artifactId> 
        <version>2.19.1</version> 
        <configuration> 
         <!-- <reportsDirectory>>${test.results.dir}/${run.time}</reportsDirectory> --> 
         <outputDirectory>${basedir}/target/surefire-reports/</outputDirectory> 
        </configuration> 
        <!-- <executions> <execution> <phase>test</phase> <goals> <goal>report-only</goal> 
         </goals> </execution> </executions> --> 
       </plugin> 

      </plugins> 

      </build> 
    <dependencies> 
     <dependency> 
      <groupId>org.seleniumhq.selenium</groupId> 
      <artifactId>selenium-java</artifactId> 
      <version>2.53.1</version> 
     </dependency> 
     <dependency> 
      <groupId>org.uncommons</groupId> 
      <artifactId>reportng</artifactId> 
      <version>1.1.4</version> 
     </dependency> 
     <dependency> 
      <groupId>org.testng</groupId> 
      <artifactId>testng</artifactId> 
      <version>6.9.10</version> 
      <scope>compile</scope> 
     </dependency> 
     <dependency> 
      <groupId>com.google.inject</groupId> 
      <artifactId>guice</artifactId> 
      <scope>compile</scope> 
      <version>2.0</version> 
     </dependency> 
     <dependency> 
      <groupId>com.google.code.gson</groupId> 
      <artifactId>gson</artifactId> 
      <scope>compile</scope> 
      <version>2.7</version> 
     </dependency> 
     <dependency> 
      <groupId>io.appium</groupId> 
      <artifactId>java-client</artifactId> 
      <scope>compile</scope> 
      <version>2.1.0</version> 
     </dependency> 
     <dependency> 
      <groupId>org.apache.velocity</groupId> 
      <artifactId>velocity</artifactId> 
      <scope>compile</scope> 
      <version>1.7</version> 
     </dependency> 
    </dependencies> 
</project> 
+0

먼저 수정이 오류 :'org.testng : TestNG를 : 항아리 : 5.14.3 ... 나는 이미' – khmarbaise

+0

\t \t \t org.testng \t \t \t TestNG를 \t \t \t 6.9.10 \t \t \t 컴파일 \t \t

답변

0

을 다음과 같이 것은,이 글이 도움이 될 수 있습니다 :

https://maven.apache.org/surefire/maven-surefire-plugin/examples/testng.html

+0

이전에는 CSSN이없는 공백 보고서가 표시되었으며 이제는 0 %가 testng 보고서를 표시하고 있습니다. –

+0

TestNG/JUnit을 사용하고 있습니까? POM 파일을 제공 할 수 있습니까? –

+0

pom.xml 파일을 추가했습니다 –