caraya icon indicating copy to clipboard operation
caraya copied to clipboard

Folder discovery falsely discovers tests when there are exactly 0 defined

Open derek-noreen opened this issue 9 months ago • 1 comments

How to reproduce:

Test code (LV 2021) - test folders.zip

  1. Extract test folders.zip
  2. Using "Tools → Caraya → Select and Run Tests on Disk...", select "no tests" folder
  • Expected behavior: "Defined Tests" stays empty
  • Actual behavior: "Defined Tests" populates with "no test"
  1. Click "Run All Tests" button
  • Expected behavior: button doesn't activate with no tests
  • Actual behavior: "no test.vi" runs with a blocking dialog
  1. Select "one test" folder
  • Single tests populates correctly, "no test.vi" does not run

Note: this also affects the VI-based running Discover Tests.vi, not just the GUI

Affected versions

I observed the above in v1.4.3.147.

After downgrading to v1.3.0.137, the behavior is as expected (no tests discovered in "no tests" folder).

Probable cause

src/classes/Test Runner.Folder/Find Test and Suite Index.vi and Remove test suites.vi don't handle the 0 tests case properly where there are no links discovered to define test VIs.

derek-noreen avatar Apr 29 '24 21:04 derek-noreen