testng-eclipse icon indicating copy to clipboard operation
testng-eclipse copied to clipboard

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

Open hankolerd opened this issue 7 years ago • 1 comments

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

  • [x] Maven
  • [ ] Gradle
  • [ ] Ant
  • [ ] Eclipse Buildpath (aka. Use "TestNG Library" for your project in Eclipse)

Operating System

  • [ ] Windows
  • [ ] Linux
  • [x] OSX

Eclipse Environment

org.testng-6.14.2.rxx
org.testng.eclipse-6.14.0.xx
org.testng.eclipse.maven-6.14.0.xx

hankolerd avatar Oct 19 '18 21:10 hankolerd

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.

missedone avatar Oct 20 '18 01:10 missedone