Debug Test File doesn't always execute tests

Issue #7 new
Christopher Chiaverini created an issue

While experimenting with the new Debug Test File functionality, I noticed that it doesn't always execute the test file.

Steps to reproduce:

  1. Start an AVD
  2. Build and Run the NBAndroidDebugProject (Hello World!)
  3. Inovke the 'Debug Test File' target on the the TokenUnitTest in the NBAndroidDebugTestProject - In my case, the NBAndroidDebugProject activity is not killed, and the test is not run.
  4. Invoke the 'Debug Test File' target again - In my case, it briefly appears that debugger tries to attach, and then the Test Results window appears, but no tests are run.
  5. Subsequent attempts to execute the 'Debug Test File' target should reproduce the same behavior as noted in #4
  6. Run the 'Test File' target. The test will be successfully executed. The Test Results window will reflect this.
  7. Run the 'Debug Test File' target. The test will be successfully executed, and any breakpoints present will be hit.

At this point, the 'Debug Test File' target seems to work indefinitely, for the duration of the NetBeans session. After restarting NetBeans it seems that the target works successfully in some cases, but not all of the time.

In order to reproduce this in my AVD to generate the test steps, I took the following steps:

  1. Execute the 'Clean' target in both projects
  2. Close NetBeans
  3. Manually uninstall the MainActivity and test project in the AVD
  4. Restart the AVD
  5. Resume the steps above.

Other relevant high-level info:

Product Version: NetBeans IDE 7.3.1 (Build 201306052037) Java: 1.7.0_25; Java HotSpot(TM) 64-Bit Server VM 23.25-b01 Runtime: Java(TM) SE Runtime Environment 1.7.0_25-b15 System: Linux version 3.8.0-31-generic running on amd64; UTF-8; en_US (nb)

Also, please find a NetBeans messages.log attached for more specific info.

Comments (1)

  1. Radim Kubacki

    I need to fix test execution to work more reliably first - it means to make sure the application itself is deployed and then to deploy and start test application. Thanks for the report.

  2. Log in to comment