Author Topic: Java unit testing only debugs test methods with a 'test' prefix  (Read 3018 times)

Marcel

  • Senior Community Member
  • Posts: 261
  • Hero Points: 26
SE still has some affinity for test methods named testSomethingOrOther. In the following example, you can debug 'testOne' from the unit testing window, but you cannot do the same for 'twoTest', SE complains that it cannot execute a test for which it has no source file.

 @Test
  public void testOne(){
  }

  @Test
  public void twoTest() {
  }

On a side note: The unit testing window is weak instrument to run tests from.  Ideally it should build and show a tree of all the unit tests in the project. Instead it just shows test(s) you last ran and never updates for tests run in the debugger. Every mistake when trying to run a test wipes out the tests tree. This happens more often than you might think because the SE unit testing framework is highly dependent on an accurate tag file, so after adding new tests it is often necessary to rebuild the project tags before being able to run them. Furthermore SE should add support for testNG.

Clark

  • Moderator
  • Senior Community Member
  • *
  • Posts: 6866
  • Hero Points: 528
Re: Java unit testing only debugs test methods with a 'test' prefix
« Reply #1 on: August 23, 2014, 05:01:16 PM »
Thanks for the post. I will add this too our features list.

Lee

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1299
  • Hero Points: 130
Re: Java unit testing only debugs test methods with a 'test' prefix
« Reply #2 on: August 25, 2014, 03:45:46 PM »
Could you post an example that reproduces the issue where it cannot execute test which has no source file?  I was unable to reproduce this using samples I have on hand.

Marcel

  • Senior Community Member
  • Posts: 261
  • Hero Points: 26
Re: Java unit testing only debugs test methods with a 'test' prefix
« Reply #3 on: August 26, 2014, 01:59:31 AM »
@Lee - I can no longer reproduce the problem, I keep getting stuck on the test runner exception (outdated vsjunit, reported) and the unittest recursion error (reported as well).  I will try to repro again after the next beta drop.

Lee

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1299
  • Hero Points: 130
Re: Java unit testing only debugs test methods with a 'test' prefix
« Reply #4 on: August 26, 2014, 01:11:38 PM »
Thanks for checking.  We have updated vsjunit and are hoping to to have the recursion error fixed for next beta drop.