首页 > 解决方案 > Cucumber Cluecumber 报告 - POM:在 POM 文件中传递命令行,而不是在终端中输入

问题描述

嗨社区:我正在运行黄瓜执行,在此过程之后,我必须通过终端中的命令行使用命令生成 Cluecumber 报告mvn cluecumber-report:reporting

我寻找的想法是在 POM 文件插件中添加此命令,以便在执行后生成此报告,而不是手动键入该命令。

这是在我的 pom 中配置的插件:

       <plugin>
            <groupId>com.trivago.rta</groupId>
            <artifactId>cluecumber-report-plugin</artifactId>
            <version>2.3.4</version>
            <executions>
                <execution>
                    <id>report</id>
                    <phase>post-integration-test</phase>
                    <goals>
                        <goal>reporting</goal>
                    </goals>
                </execution>
            </executions>
            <configuration>
                <sourceJsonReportDirectory>${project.build.directory}/cluecumber-report</sourceJsonReportDirectory>
                <generatedHtmlReportDirectory>${project.build.directory}/cluecumber-report/cluecumber_report_${maven.build.timestamp}</generatedHtmlReportDirectory>
                <customCss>custom/cluecumber.css</customCss>
                <skip>false</skip>  <!-- This property is used to skip the report generation. The default value is false -->
                <failScenariosOnPendingOrUndefinedSteps>false</failScenariosOnPendingOrUndefinedSteps>
                <expandBeforeAfterHooks>false</expandBeforeAfterHooks>
                <expandStepHooks>false</expandStepHooks>
                <expandDocStrings>false</expandDocStrings>
                <customPageTitle>This is the Page title</customPageTitle> <!-- This is for changing the report title -->
                <!-- Here below it's possible  to change the colors -->
                <customStatusColorPassed>#017FAF</customStatusColorPassed>
                <customStatusColorFailed>#C94A38</customStatusColorFailed>
                <customStatusColorSkipped>#F48F00</customStatusColorSkipped>
                <customParameters>
                        <Custom_Parameter>This is the First Navigation Test</Custom_Parameter>
                        <Custom_URL>http://www.google.com</Custom_URL>
                        <_Text>The goal here is going to Google.com and search for an specific idea and continue the flow</_Text>
                </customParameters>
            </configuration>
        </plugin>

有没有办法做到这一点?提前致谢。

标签: mavencommand-linepom.xmlmaven-plugincucumber-jvm

解决方案


推荐阅读