Issue in identifying feature file/directory
Closed this issue · 2 comments
tusharkhoche commented
Hi @laxersaz , I did all that which is required for the plugin to work. I am getting error in POM that resources/features/searchflights is not a feature file or a directory. The path is correct as you can see in attached screenshot.
Here is my pom.xml
Please do let me know if I am missing something. Thanks
`
4.0.0
<groupId>com.epam</groupId>
<artifactId>cleartrip</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>cleartrip</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<maven.failsafe.plugin.version>3.0.0-M3</maven.failsafe.plugin.version>
<maven.build.helper.plugin.version>3.0.0</maven.build.helper.plugin.version>
<maven.compiler.plugin.version>3.8.0</maven.compiler.plugin.version>
<generated.runner.directory>${project.build.directory}/parallel/runners</generated.runner.directory>
<generated.feature.directory>${project.build.directory}/parallel/features</generated.feature.directory>
</properties>
<repositories>
<repository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>bintray-epam-reportportal</id>
<name>bintray</name>
<url>http://dl.bintray.com/epam/reportportal</url>
</repository>
</repositories>
<build>
<plugins>
<plugin>
<groupId>org.sonarsource.scanner.maven</groupId>
<artifactId>sonar-maven-plugin</artifactId>
<version>3.6.0.1398</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>8</source>
<target>8</target>
</configuration>
</plugin>
<plugin>
<groupId>com.trivago.rta</groupId>
<artifactId>cucable-plugin</artifactId>
<version>1.5.0</version>
<executions>
<execution>
<id>generate-test-resources</id>
<phase>generate-test-resources</phase>
<goals>
<goal>parallel</goal>
</goals>
<configuration>
<!-- This can be either a Java class file or a text based template -->
<sourceRunnerTemplateFile>src/test/java/com/epam/cleartrip/cucable.java
</sourceRunnerTemplateFile>
<!--<sourceRunnerTemplateFile>src/test/resources/cucable.template</sourceRunnerTemplateFile> -->
<!-- process all features in the given directory -->
<sourceFeatures>resources/features/searchflights</sourceFeatures>
<!-- process a specific feature file in the given directory -->
<!--<sourceFeatures>src/test/resources/features/testfeature/MyTest1.feature</sourceFeatures> -->
<!-- process a specific feature file and specific line numbers in
the given directory -->
<!--<sourceFeatures>src/test/resources/features/testfeature/MyTest1.feature:8:19</sourceFeatures> -->
<generatedFeatureDirectory>${generated.feature.directory}</generatedFeatureDirectory>
<generatedRunnerDirectory>${generated.runner.directory}</generatedRunnerDirectory>
<!-- optional: custom data that is available in Cucable placeholders
in a template -->
<!--<customPlaceholders> -->
<!--<comment>This should appear inside the template</comment> -->
<!--</customPlaceholders> -->
<!-- optional: include scenarios with certain tags -->
<!--<includeScenarioTags> -->
<!--<param>@scenarioTag1</param> -->
<!--<param>@scenarioTag2</param> -->
<!--</includeScenarioTags> -->
<!-- optional: exclude scenarios with certain tags -->
<!--<excludeScenarioTags> -->
<!--<param>@skipme</param> -->
<!--</excludeScenarioTags> -->
<!-- optional: number of test runs to create runners and features
multiple times if set to a number greater than 1 -->
<!--<numberOfTestRuns>1</numberOfTestRuns> -->
<!-- optional: generate fixed number of runners and distribute all
features round-robin. -->
<!--<desiredNumberOfRunners>2</desiredNumberOfRunners> -->
<!-- optional: Cucable log level -->
<!--<logLevel>default</logLevel> -->
<!--<logLevel>compact</logLevel> -->
<!--<logLevel>minimal</logLevel> -->
<!--<logLevel>off</logLevel> -->
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<id>add-test-source</id>
<phase>generate-test-sources</phase>
<goals>
<goal>add-test-source</goal>
</goals>
</execution>
</executions>
<configuration>
<sources>
<source>${generated.runner.directory}</source>
</sources>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>3.0.0-M3</version>
<executions>
<execution>
<id>Run parallel tests</id>
<phase>integration-test</phase>
<goals>
<goal>integration-test</goal>
</goals>
</execution>
</executions>
<configuration>
<forkCount>2</forkCount>
<testFailureIgnore>true</testFailureIgnore>
</configuration>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<!--This plugin's configuration is used to store Eclipse m2e settings
only. It has no influence on the Maven build itself. -->
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>
com.trivago.rta
</groupId>
<artifactId>
cucable-plugin
</artifactId>
<versionRange>
[1.5.1,)
</versionRange>
<goals>
<goal>parallel</goal>
</goals>
</pluginExecutionFilter>
<action>
<execute></execute>
</action>
</pluginExecution>
<pluginExecution>
<pluginExecutionFilter>
<groupId>
com.trivago.rta
</groupId>
<artifactId>
cucable-plugin
</artifactId>
<versionRange>
[1.5.0,)
</versionRange>
<goals>
<goal>parallel</goal>
</goals>
</pluginExecutionFilter>
<action>
<execute></execute>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
<dependencies>
<dependency>
<groupId>com.epam.reportportal</groupId>
<artifactId>agent-java-cucumber4</artifactId>
<version>4.0.0</version>
</dependency>
<dependency>
<groupId>com.epam.reportportal</groupId>
<artifactId>agent-java-junit</artifactId>
<version>4.1.0</version>
</dependency>
<dependency>
<groupId>com.epam.reportportal</groupId>
<artifactId>logger-java-log4j</artifactId>
<version>4.0.1</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.25</version>
</dependency>
<!-- https://mvnrepository.com/artifact/info.cukes/gherkin -->
<dependency>
<groupId>info.cukes</groupId>
<artifactId>gherkin</artifactId>
<version>2.12.2</version>
<scope>provided</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/junit/junit -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-server -->
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-server</artifactId>
<version>3.14.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-core -->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.11.1</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.logging.log4j/log4j-api -->
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>2.11.1</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-compiler-plugin -->
<dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/io.cucumber/cucumber-core -->
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-core</artifactId>
<version>4.2.3</version>
</dependency>
<!-- https://mvnrepository.com/artifact/io.cucumber/cucumber-junit -->
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-junit</artifactId>
<version>4.2.3</version>
</dependency>
<!-- https://mvnrepository.com/artifact/io.cucumber/cucumber-java8 -->
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-java</artifactId>
<version>4.2.3</version>
</dependency>
<!-- https://mvnrepository.com/artifact/io.cucumber/cucumber-jvm -->
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-jvm</artifactId>
<version>4.2.3</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-picocontainer</artifactId>
<version>4.2.3</version>
</dependency>
<!-- https://mvnrepository.com/artifact/io.cucumber/datatable -->
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>datatable</artifactId>
<version>1.1.12</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.aventstack/extentreports -->
<dependency>
<groupId>com.aventstack</groupId>
<artifactId>extentreports</artifactId>
<version>4.0.9</version>
</dependency>
</dependencies>
`
bischoffdev commented
Hi, I just tried it with a similar setup using the example project and it works correctly.
Did you try taking the example project and modifying it step by step to match your desired setup?
At first glance I cannot see any error.
tusharkhoche commented
Yeah your example project works correctly now (#111). I have just copy pasted POM settings from the example project.