Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 269939 - Test Results window hangs when running CUnit test
Test Results window hangs when running CUnit test
Product: cnd
Classification: Unclassified
Component: UnitTest Support
PC Linux
: P2 (vote)
: 8.2
Assigned To: ilia
Depends on:
  Show dependency treegraph
Reported: 2017-02-27 19:18 UTC by secular
Modified: 2017-04-20 14:28 UTC (History)
0 users

See Also:
Issue Type: DEFECT

Screenshot showing Test Results window (88.33 KB, image/png)
2017-02-27 19:18 UTC, secular

Note You need to log in before you can comment on or make changes to this bug.
Description secular 2017-02-27 19:18:00 UTC
Created attachment 163724 [details]
Screenshot showing Test Results window

I am running ubuntu 16.04 LTS. I am new to CUnit and new to NetBeans. I had this problem in NetBeans 8.1 so uninstalled it and installed NetBeans 8.2 instead. However this problem still exists, hence my reporting it.

I followed the helpful NetBeans tutorial for creating a test C project with the Factorial function and then creating a unit test.

The problem is that the Test Results window hangs - as shown in the screenshot it says "Running..." and that "0.00%" of the tests have passed. However, the single unit test runs in next to no time and its output is correctly shown in the Output window. Nothing I can do seems to fix the Test Results window. Even after waiting for 5 minutes the Test Results window still says exactly the same thing. Clearly it is a bug.

I tried renaming the test to test_Factorial instead of testFactorial, but this didn't help - in fact it meant the test didn't run successfully at all (is this by design or is it another unrelated bug?)

(Personal note: I hope someone can help as I had really hoped to use NetBeans after hearing good things about it. In the meantime I am going to have to investigate alternative IDEs that support CUnit.)
Comment 1 soldatov 2017-02-28 08:23:13 UTC
Expected CUnit output:

NetBeans expects such lines:
  Test: test1 ...passed
  Test: test2 ...FAILED

In your case I see summary only.
Comment 2 soldatov 2017-02-28 09:34:47 UTC
I can reproduce this bug on Ubuntu 16.04

1) If I launch test in "CppApplication_1 (Build, Build Tests...)" tab I see only:
     CUnit - A unit testing framework for C - Version 2.1-3
2) If I select "Debug Test" menu item I see valid output:
  Test: testFoo ...FAILED
    1. tests/newcunittest.c:22  - 0
3) If I replace CU_basic_set_mode(CU_BRM_VERBOSE); on CU_basic_set_mode(CU_BRM_NORMAL); I see full output, but NetBeans can't parse this format.
Comment 3 secular 2017-03-01 17:20:47 UTC
I am glad you are able to reproduce. I get the bug simply by following the excellent tutorial on this webpage:

It occurs when I get to the "Run the C Unit Test" section. The "Test Results" hangs and does not show the expected output shown in the tutorial screenshot.

Do you think this will be an easy bug to fix? A patch would be extremely helpful to me. Thanks!
Comment 4 soldatov 2017-03-02 10:07:26 UTC
I am not a developer and I can't evaluate required time.
Comment 5 ilia 2017-03-02 11:06:38 UTC
I will evaluate this bug soon.
Comment 6 ilia 2017-04-03 16:21:45 UTC
Fixed in internal repository, Fixed build will be available for download within a week.
Comment 7 Quality Engineering 2017-04-11 01:52:35 UTC
Integrated into 'main-silver', will be available in build *201704110002* on (upload may still be in progress)

User: Ilia Gromov <>
Log: Fixed #269939 - Test Results window hangs when running CUnit test
(transplanted from 5fcd1e5e3d86b7f1fa70a07eef918614db3b44a1)
Comment 8 ilia 2017-04-13 10:37:40 UTC Changesets: # Fixed #269939 - Test Results window hangs when running CUnit test # Fixed #269939 - Test Results window hangs when running CUnit test. i18n
Comment 9 soldatov 2017-04-20 14:28:59 UTC
Verified in NetBeans IDE 8.2 (Build 201704181436)

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo