test-runner

Get @CucumberOptions tag property using System.getProperty()

萝らか妹 提交于 2019-11-28 10:54:38
I am running a maven project in Eclipse for my Cucumber tests. My test runner class looks like this: @RunWith(Cucumber.class) @CucumberOptions( tags = { "@Now" }, // tags = { "@Ready" }, // tags = { "@Draft" }, features = { "src/test/java/com/myCompany/FaultReporting/Features" }, glue = { "com.myCompany.myApp.StepDefinitions" } ) public class RunnerTest { } Instead of having to hard code the tags into the test runner, I am keen to pass them in using the .command file. (i.e. using System.getProperty("cucumber.tag") However, I get an error when I add the line of code to the above test runner:

Get @CucumberOptions tag property using System.getProperty()

旧巷老猫 提交于 2019-11-27 03:53:50
问题 I am running a maven project in Eclipse for my Cucumber tests. My test runner class looks like this: @RunWith(Cucumber.class) @CucumberOptions( tags = { "@Now" }, // tags = { "@Ready" }, // tags = { "@Draft" }, features = { "src/test/java/com/myCompany/FaultReporting/Features" }, glue = { "com.myCompany.myApp.StepDefinitions" } ) public class RunnerTest { } Instead of having to hard code the tags into the test runner, I am keen to pass them in using the .command file. (i.e. using System

Visual Studio 2015 or 2017 does not discover unit tests

爷,独闯天下 提交于 2019-11-26 06:13:50
问题 EDIT 2016-10-19: The original question was about an issue specific to VS2015 CTP6 with the XUnit test runner. It\'s clear from the answers that there is a much broader issue with unit test discovery in Visual Studio which may occur in many different situations. I have cleaned up my question to reflect that. I have also included a script in my own answer that I still use to this day to solve similar problems when they appear. Many other answers have also proven helpful in better understanding