Closed VinnieM closed 5 years ago
It is correct that the class name is being renamed as there can be multiple runners that each need to have a distinct class name. This is also stated in the documentation (https://github.com/trivago/cucable-plugin#using-a-java-file-as-a-runner-template):
--
If you use a java file (e.g. src/test/java/some/template/CucableJavaTemplate.java), the [CUCABLE:FEATURE] placeholder as well as the class name will be substituted for the generated feature file name(s). The [CUCABLE:RUNNER] placeholder will be replaced by the runner class name.
--
Can you describe what the bug is in your case? Because for me it looks like it is working as expected.
I guess the problem was that my Class name was called Runner and inside that I was using the instance of the class TestNgCucumberRunner. While replacing the class name (Runner), and since I was using TestNgCucumberRunner I guess the replacing went haywire.
When I change the name of the my Class from Runner to something else, it seems to be working as expected.
Describe the bug Inside my Runner class I have created an instance of the class TestNGCucumberRunner, this is being replaced by the generated class name.
Firstly let me say that I am not sure if this plugin is supposed to be used with TestNg.
My Runner class looks like this..
After the automatic code generation this is the code I get
PS: I might be wrong, but is it searching for the word Runner and then replacing them with the class name?