-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Currently, the command does not allow to embed a JUnit test method starting from the @Test annotation. Test suites usually have more than one test method. We cannot reference a method having start="@Test".
The annotation which follows @Test is usually @DisplayName("value"). Although, display names are usually unique within a test suite, it is not possible to reference the start of the method using start="@Test*@DisplayName(\"value\")". This is so because start assumes that it's only one line number, not a sequence of numbers. That's why matching for the above start value fails.
A workaround for this problem is to put @DisplayName on the same line with @Test. This is what I did, but it's not customary in Java to put several method annotations on the same line.
We need to either be able to reference methods by their names (including references to the nested classes) OR support multi-line reference in start and end.