2017-05-31 5 views
0

に表示されていない私は、エクステント・レポートのMavenの依存関係追加しました:ランナークラスでキュウリ-extentreports埋め込まれたスクリーンショットは、

<dependency> 
      <groupId>com.vimalselvam</groupId> 
      <artifactId>cucumber-extentsreport</artifactId> 
      <version>2.0.4</version> 
     </dependency> 

<dependency> 
      <groupId>com.aventstack</groupId> 
      <artifactId>extentreports</artifactId> 
      <version>3.0.5</version> 
      <scope>provided</scope> 
     </dependency>. 

を私はCucucmberオプションでプラグインを指定しています

@CucumberOptions(
     features={"src/test/java/features/Exception.feature"},strict = true 
     ,glue={"com.selenium.wrapper","stepDefinitaion"}, 
     format = { "pretty","html:target/site/cucumber-pretty","html:target/cucumber-report","json:target/cucumber.json" }, 
     plugin = {"com.cucumber.listener.ExtentCucumberFormatter:output/report.html"} 

とは

// *スクリーンショットを撮ると

それを保存するためのコードを追加します。私は、スクリーンショットを追加するコードを追加した@Afterフック
Reporter.addScreenCaptureFromPath("path of the screenshot"); 

白紙画像が追加され、実行した後:あなたは.JPGファイルとして保存されたスクリーンショットを埋め込むながら.pngの file.Iが同じ問題に直面していたとして、スクリーンショットを保存 image 2 shows the blank screenshot

+0

スクリーンショットファイルを手動で見ることはできますか? –

+0

はいスクリーンショットは指定されたパスで利用可能です –

答えて

関連する問題