Q: Can we execute testng (group) and cucumber (tag) tests in one command in maven I have an issue which I could not solve it after trying a lot. Actually I have an existing testng framework for GUI which gets run based on group in maven command. I have been asked to develop a BDD framework for API using rest assured and integrate it with existing testng framework(GUI) so both API and GUI can be run using one maven command by passing just group or tag for cucumber. I have put BDD packages in testng framework  testing  and am able to run tests GUI(testing) and API(BDD) by separate command but not able to run in one command. Please see below maven commands.
Command to run GUI using group

mvn clean install -Dautomation.environment=XX.10X.1X.9X -Dautomation.port=X0 -DskipUnitTests=true -Dautomation.browser=chrome -Dtestng.testsuite=Groups -Dgroups=sales

Command to run API using tag

mvn test -Dautomation.environment=XX.XXX.XX.XX -Dautomation.port=XX -DskipUnitTests=true -Dcucumber.options="--tags @sales"

Is that possible to run both by a single maven command using just group or group and tag both in single command?
Your help will be appreciated.
Regards,
Ref

A: Cucumber allows logical aggregation of tags in maven runtime args.
I would recommend organizing your Cucumber features by tags and then logically combining them in whatever you choose to execute.
Here's an answer that should help you get started: Dcucumber.options, how to have multiple tags
