测试输出文件夹未使用 mvn clean install 命令创建,而 运行 Selenium webdriver 脚本与 TestNG
test-outpout folder not created with mvn clean install command while running Selenium webdriver script with TestNG
我使用 TestNG 框架创建了基于 Maven 的 Selenium 项目。
当我从命令提示符 运行 命令 :- "mvn clean install" 然后我的脚本 运行 很好但是 "test-output" 文件夹没有创建,如果我 运行 我的脚本通过 Eclipse 右键单击 testng.xml 文件--运行 和 TestNGsuite,然后创建包含报告的测试输出文件夹。
我为 surefire 报告添加了插件并且同样工作正常但同时我也想要 "test-output" 文件夹,同时从命令提示符 运行ning "mvn clean install" 命令。请建议!!
因为我想在 jenkins 中进行相同的配置(使用 mvn clean install 命令)并想发送 emailablerepots.html 给我的前辈。
下面是我的pom.xml:-
<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>mavenTestProject</groupId>
<artifactId>MAVENprojectEmail</artifactId>
<version>0.0.1-SNAPSHOT</version>
<build>
<!-- Source directory configuration -->
<sourceDirectory>src</sourceDirectory>
<plugins>
<!-- Following plugin executes the testng tests -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.14.1</version>
<configuration>
<!-- Suite testng xml file to consider for test execution -->
<suiteXmlFiles>
<suiteXmlFile>testng.xml</suiteXmlFile>
<suiteXmlFile>testng.xml</suiteXmlFile>
</suiteXmlFiles>
</configuration>
</plugin>
<!-- Compiler plugin configures the java version to be usedfor compiling
the code -->
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<!-- Selenium Java -->
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>2.53.1</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.9.10</version>
</dependency>
</dependencies>
</project>
我遇到了同样的问题。当我仔细搜索时,我发现以前在 test-output 文件夹中创建的所有报告都在这里:
...\eclipse-workspace\<Project Name>\target\surefire-reports\
我使用 TestNG 框架创建了基于 Maven 的 Selenium 项目。 当我从命令提示符 运行 命令 :- "mvn clean install" 然后我的脚本 运行 很好但是 "test-output" 文件夹没有创建,如果我 运行 我的脚本通过 Eclipse 右键单击 testng.xml 文件--运行 和 TestNGsuite,然后创建包含报告的测试输出文件夹。
我为 surefire 报告添加了插件并且同样工作正常但同时我也想要 "test-output" 文件夹,同时从命令提示符 运行ning "mvn clean install" 命令。请建议!!
因为我想在 jenkins 中进行相同的配置(使用 mvn clean install 命令)并想发送 emailablerepots.html 给我的前辈。
下面是我的pom.xml:-
<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>mavenTestProject</groupId>
<artifactId>MAVENprojectEmail</artifactId>
<version>0.0.1-SNAPSHOT</version>
<build>
<!-- Source directory configuration -->
<sourceDirectory>src</sourceDirectory>
<plugins>
<!-- Following plugin executes the testng tests -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.14.1</version>
<configuration>
<!-- Suite testng xml file to consider for test execution -->
<suiteXmlFiles>
<suiteXmlFile>testng.xml</suiteXmlFile>
<suiteXmlFile>testng.xml</suiteXmlFile>
</suiteXmlFiles>
</configuration>
</plugin>
<!-- Compiler plugin configures the java version to be usedfor compiling
the code -->
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<!-- Selenium Java -->
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>2.53.1</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.9.10</version>
</dependency>
</dependencies>
</project>
我遇到了同样的问题。当我仔细搜索时,我发现以前在 test-output 文件夹中创建的所有报告都在这里:
...\eclipse-workspace\<Project Name>\target\surefire-reports\