私は魅力レポートを使用しています。私のレポートは正しく生成されますが、私はスクリーンショットとコンソール出力はレポートに添付されません。ここでコンソール出力に、report-selenium webdriver、testng、mavenに添付されたスクリーンショットを取得します。
は私のpom.xmlです:
<?xml version="1.0" encoding="UTF-8"?>
<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>com.testproject</groupId>
<artifactId>tests</artifactId>
<version>0.1-SNAPSHOT</version>
<properties>
<aspectj.version>1.8.10</aspectj.version>
</properties>
<dependencies>
<dependency>
<groupId>io.qameta.allure</groupId>
<artifactId>allure-testng</artifactId>
<version>2.0-BETA14</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.11</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>3.4.0</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-server</artifactId>
<version>3.4.0</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>3.16</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>3.16</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.5.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.20</version>
<configuration>
<argLine>
-javaagent:"${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar"
</argLine>
<suiteXmlFiles>
<suiteXmlFile>testng.xml</suiteXmlFile>
</suiteXmlFiles>
</configuration>
<dependencies>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<version>${aspectj.version}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</project>
それが壊れてテストを実行するのにかかる時間/ステータス合格/不合格を示し の添付のスクリーンショットをご覧ください。しかし、コンソールの出力はそれに接続されていません。失敗したテストケースのスクリーンショットも、フォルダsurefire-reports/screenshotsに保存されています。私はそれらを添付してレポートを魅力的にする必要があります。誰かがこの出力を得るために追加する必要があることを知ってもらえますか?
ありがとうございます!
あなたが行ったことについて質問に十分な詳細を追加しない場合(経験している問題をシミュレートするためにおそらく他人によって実行される可能性があるコードスニペットを共有する必要があります)、あなたが期待していることは、あなたの質問が閉鎖される可能性が非常に高いことです。文脈の詳細であなたの質問を充実させてください。 –