From 6846e37d884dfb619eeefc95737fd0ed937626ea Mon Sep 17 00:00:00 2001 From: Greg Gauthier Date: Fri, 27 Jan 2023 12:47:29 +0000 Subject: [PATCH] fix surefix config --- pom.xml | 25 +++++-------------- .../example/webtests/features/login.feature | 2 +- .../example/webtests/runner/DemoRunner.java | 12 +++++++-- src/test/resources/cucumber.properties | 2 +- src/test/resources/junit-platform.properties | 2 +- 5 files changed, 19 insertions(+), 24 deletions(-) diff --git a/pom.xml b/pom.xml index 9c29090..be273a9 100644 --- a/pom.xml +++ b/pom.xml @@ -120,21 +120,6 @@ - - - dev - - @dev - - - - qa - - @qa - - - - @@ -152,10 +137,12 @@ maven-surefire-plugin 3.0.0-M7 - - - ${cucumber.filter.tags} - + + src/test/java/org/example/webtests + + **/*DemoRunner.java + + diff --git a/src/test/java/org/example/webtests/features/login.feature b/src/test/java/org/example/webtests/features/login.feature index 86011a0..0e35007 100644 --- a/src/test/java/org/example/webtests/features/login.feature +++ b/src/test/java/org/example/webtests/features/login.feature @@ -1,5 +1,5 @@ # Sample Cucumber test using the SWAGLABS site - +@login_feature Feature: Login Description: Demonstration of cucumber with Junit, and Playwright diff --git a/src/test/java/org/example/webtests/runner/DemoRunner.java b/src/test/java/org/example/webtests/runner/DemoRunner.java index 08b4dd2..9947436 100644 --- a/src/test/java/org/example/webtests/runner/DemoRunner.java +++ b/src/test/java/org/example/webtests/runner/DemoRunner.java @@ -8,8 +8,16 @@ import org.junit.runner.RunWith; @CucumberOptions( features = "src/test/java/org/example/webtests/features/", glue = {"org.example.webtests.steps"}, - plugin = {"pretty"}, - publish = true + plugin = { + "pretty", + "html:target/cucumber-html-report", + "json:target/cucumber.json", + "pretty:target/cucumber-pretty.txt", + "usage:target/cucumber-usage.json", + "junit:target/cucumber-results.xml" + }, + publish = false, + stepNotifications = true ) public class DemoRunner { diff --git a/src/test/resources/cucumber.properties b/src/test/resources/cucumber.properties index f4f676c..4525b19 100644 --- a/src/test/resources/cucumber.properties +++ b/src/test/resources/cucumber.properties @@ -1,2 +1,2 @@ -cucumber.publish.enabled=true +cucumber.publish.enabled=false cucumber.publish.quiet=true \ No newline at end of file diff --git a/src/test/resources/junit-platform.properties b/src/test/resources/junit-platform.properties index f4f676c..4525b19 100644 --- a/src/test/resources/junit-platform.properties +++ b/src/test/resources/junit-platform.properties @@ -1,2 +1,2 @@ -cucumber.publish.enabled=true +cucumber.publish.enabled=false cucumber.publish.quiet=true \ No newline at end of file