testng-team / testng-eclipse

Eclipse plug-in for TestNG
https://testng.org
194 stars 164 forks source link

Run/Debug Configuration option to rescan project Test files on each invocation #404

Open hankolerd opened 6 years ago

hankolerd commented 6 years ago

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

org.testng-6.14.2.rxx
org.testng.eclipse-6.14.0.xx
org.testng.eclipse.maven-6.14.0.xx
missedone commented 6 years ago

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.