How to do i specify a custom made cucumber plugin in the test runner ?
Am getting the following error
java.lang.IllegalArgumentException: The plugin specification 'UD.Plugin' has a problem:
Could not load plugin class 'UD.Plugin'.
Plugin specifications should have the format of PLUGIN[:[PATH|[URI [OPTIONS]]]
What is the expected format,
if my plugin is at Src/main/UD and the runner is at Src/Test/TestRunner
Note: i m using cucumber 4
CodePudding user response:
no custom plugin specification supported by cucumber
CodePudding user response:
Mention
cucumber.plugin = com.test.support.ReportPlugin
in junit-platform.properties
My plugin file is in src/test/java/com.test.support
and properties file is in
src/test/resources/junit-platform.properties
my relevant pom config is
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>5.7.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-java</artifactId>
<version>6.9.1</version>
<scope>test</scope>
</dependency>
plugin file looks like this
package com.test.support;
import io.cucumber.plugin.EventListener;
import io.cucumber.plugin.event.*;
import java.net.URI;
import java.util.Map;
import java.util.TreeMap;
import java.util.UUID;
public class ReportPlugin implements EventListener {
....
....