Я использую TestNG + Cucumber и у меня есть параметры огурца:
@CucumberOptions(
features = "src/main/resources/features",
glue = { "com.my.stepdefs" },
tags = { "@MyTags" },
plugin = { "pretty",
"html:target/cucumber-reports/cucumber-pretty",
"json:target/cucumber-reports/CucumberTestReport.json",
"rerun:target/cucumber-reports/rerun.txt",
"junit:target/cucumber-reports/Cucumber.xml" },
monochrome = false,
dryRun = false)
Когда я запускаю эти тесты с mvn, проверьте с помощью следующего плагина:
<plugin>
<groupId>net.masterthought</groupId>
<artifactId>maven-cucumber-reporting</artifactId>
<version>3.8.0</version>
<executions>
<execution>
<id>execution</id>
<phase>verify</phase>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<projectName>com.my.project</projectName>
<outputDirectory>target/cucumber-reports/advanced-reports</outputDirectory>
<cucumberOutput>target/cucumber-reports/CucumberTestReport.json</cucumberOutput>
<buildNumber>1</buildNumber>
<parallelTesting>false</parallelTesting>
<maven.test.failure.ignore>true</maven.test.failure.ignore>
</configuration>
</execution>
</executions>
</plugin>
Отчеты генерируются в target/cucumber-reports
и выглядят очень красиво. Правильный CSS стиль.
Но когда я запускаю тест из плагина Eclipse + TestNG, при форматировании файла не хватает ключевых частей стилей CSS, и он выглядит очень плоским.
Is Есть что-то, что мне нужно сделать, чтобы получить правильное CSS форматирование, как мы получаем из плагина mvn?