question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot pass tag expression to maven-surefire-plugin

See original GitHub issue

Summary

The new multi-token expression syntax makes it impossible to declare multi token tag expression in the --tags flag inside the -Dcucumber.options flag in maven-surefire-plugin configuration.

Expected Behavior

It should be possible possible to pass multi token tag expression in the -Dcucumber.options flag.

Current Behavior

maven-surefire-plugin crashes throwing either VM crash, IllegalArgumentException or doesn’t run any tests depending on the input.

Possible Solution

Make it possible to make single token tag expression without any whitespace characters.

Steps to Reproduce (for bugs)

  1. Create a basic cucumber project using maven with maven-surefire-plugin
  2. In the pom.xml define argLine tag inside maven-surefire-plugin configuration
  3. Inside argLine tag add -Dcucumber.options=" --tags ‘not @ignored’" or -Dcucumber.options=’ --tags “not @ignored”’
  4. run mvn test

Context & Motivation

My use case is injecting tag expression from parent pom.

Your Environment

  • Version used: 3.0.2
  • Operating System and version: Linux Mint 19

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:15 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
mpkorstanjecommented, May 12, 2019

Looks like this fixed properly in maven-shared-utils/33659 but hasn’t made it into the latest Surefire yet. It will be a matter of patience.

0reactions
lock[bot]commented, May 20, 2020

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Maven Surefire Plugin – Inclusions and Exclusions of Tests
By default, the Surefire Plugin will automatically include all test classes with the following wildcard patterns:.
Read more >
Cannot execute maven test from command line using tags?
According to https://maven.apache.org/surefire/maven-surefire-plugin/examples/system-properties.html, there are 2 ways to pass "system ...
Read more >
Integration Of Maven With TestNg Using Maven Surefire Plugin
Go to Google and Type Maven Surefire plugin. · Click the link, maven.apache.org/surefire/maven-surefire-plugin and Select 'Using TestNg' link on ...
Read more >
Allure Framework
For example, suppose you have test reports automatically created by surefire maven plugin stored in the target/surefire-reports :.
Read more >
Testing Your Application - Quarkus
Because we are using JUnit 5, the version of the Surefire Maven Plugin must be set, ... quarkus.test.profile.tags=foo : In this case none...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found