如何将黄瓜报告保存到项目路径中?

时间:2019-01-30 10:58:56

标签: java selenium-webdriver cucumber

我有一个创建Cucumber Reports的自动化测试,但是我想将Cucumber.json和Cucumber Report保存在项目结构之外。

现在我有以下代码:

  

@RunWith(Cucumber.class)@CucumberOptions(严格=否,功能=   “ src / main / java / FaixaVS_NaoCadastrado / FaixaVS_NaoCadastrado / FaixaVS_NaoCadastrado.feature”,   胶= {“ StepDefinition”},格式= {“漂亮”,   “ json:target / cucumber.json”},标签= {“〜@ ignore”})

在POM.XML上:

 <plugin>
    <groupId>net.masterthought</groupId>
    <artifactId>maven-cucumber-reporting</artifactId>
    <version>2.0.0</version>
    <executions>
      <execution>
        <id>execution</id>
        <phase>verify</phase>
        <goals>
          <goal>generate</goal>
        </goals>
        <configuration>
          <projectName>Compra no Receba em Casa</projectName>
          <outputDirectory>${project.build.directory}/cucumber-pretty/cucumber-reports</outputDirectory>
          <cucumberOutput>${project.build.directory}/cucumber.json</cucumberOutput>
          <skippedFails>true</skippedFails>
          <enableFlashCharts>false</enableFlashCharts>
          <checkBuildResult>false</checkBuildResult>
          <buildNumber>v01</buildNumber>
        </configuration>
      </execution>
    </executions>
  </plugin>
</plugins>

如何更改此报告的保存方式,例如桌面路径?谢谢。

0 个答案:

没有答案