The maven-surefire-plugin supports scanning the project to find Test files, by scanning something akin to **Test**.java. When creating a TestNG Run/Debug/Coverage configuration, there should be an option to scan the project on each execution.
If you right-click a project and select Run As -> TestNG Test than it creates a Run Configuration that references every Test file by name, which means it is using same/similar scan behavior to find the test classes already.
The problem however is if you choose to add a new Test class, remove an existing Test class, or rename any Test class. You now need to manually update the Run configuration to reflect the Test file changes. The workaround is of course to delete the existing run configuration and use the right-click action again. However, if your run configuration has additional arguments other than the default than this too is problematic.
It seems the scan code is already part of TestNG plugin. This request is simple to create a configuration option to allow it to be triggered on each invocation, instead of only running the scanner once on first invocation.
The Dependency Management tool for your project
[x] Maven
[ ] Gradle
[ ] Ant
[ ] Eclipse Buildpath (aka. Use "TestNG Library" for your project in Eclipse)
sounds like it's relate to #322, as long as adding the refactoring support (basically, sort of listening on the file changes), the launch configuration will be updated accordingly.
Problem Statement
The maven-surefire-plugin supports scanning the project to find Test files, by scanning something akin to
**Test**.java
. When creating a TestNG Run/Debug/Coverage configuration, there should be an option to scan the project on each execution.If you right-click a project and select
Run As -> TestNG Test
than it creates a Run Configuration that references every Test file by name, which means it is using same/similar scan behavior to find the test classes already.The problem however is if you choose to add a new Test class, remove an existing Test class, or rename any Test class. You now need to manually update the Run configuration to reflect the Test file changes. The workaround is of course to delete the existing run configuration and use the right-click action again. However, if your run configuration has additional arguments other than the default than this too is problematic.
It seems the scan code is already part of TestNG plugin. This request is simple to create a configuration option to allow it to be triggered on each invocation, instead of only running the scanner once on first invocation.
The Dependency Management tool for your project
Operating System
Eclipse Environment