All Projects → offa → NBCndUnit

offa / NBCndUnit

Licence: GPL-3.0 License
NetBeans C/C++ unit testing plugin – supporting CppUTest, GoogleTest (gtest) / GoogleMock (gmock) and libunittest C++.

Programming Languages

java
68154 projects - #9 most used programming language
C++
36643 projects - #6 most used programming language

Projects that are alternatives of or similar to NBCndUnit

netbeans-color-codes-preview
Show colors in an editor's sidebar
Stars: ✭ 24 (+84.62%)
Mutual labels:  netbeans, netbeans-plugin
sonarlint4netbeans
SonarLint integration for Apache Netbeans
Stars: ✭ 23 (+76.92%)
Mutual labels:  netbeans, netbeans-plugin
netbeans-wordpress-plugin
Support for WordPress
Stars: ✭ 92 (+607.69%)
Mutual labels:  netbeans, netbeans-plugin
tikione-jacocoverage
NetBeans module that provides JaCoCo code coverage for Ant based Java SE, Java EE and NetBeans Module projects (JDK5,6,7,8 compatible).
Stars: ✭ 25 (+92.31%)
Mutual labels:  netbeans, netbeans-plugin
tropic
🍍 Test Runner Library
Stars: ✭ 29 (+123.08%)
Mutual labels:  unit-testing
trx2junit
Transforms XML from trx-Testresults to JUnit-Testresults / trx to JUnit XML and the other way round
Stars: ✭ 42 (+223.08%)
Mutual labels:  unit-testing
TcUnit-Runner
Program that makes it possible to automate runs of TcUnit unit tests
Stars: ✭ 23 (+76.92%)
Mutual labels:  unit-testing
testing-reactjs-examples
🧪 "What should we test in our React components" - presentation examples.
Stars: ✭ 23 (+76.92%)
Mutual labels:  unit-testing
automock
A library for testing classes with auto mocking capabilities using jest-mock-extended
Stars: ✭ 26 (+100%)
Mutual labels:  unit-testing
xspec
XSpec is a unit test and behaviour-driven development (BDD) framework for XSLT, XQuery, and Schematron.
Stars: ✭ 91 (+600%)
Mutual labels:  unit-testing
XCTestHTMLReport
Xcode-like HTML report for Unit and UI Tests
Stars: ✭ 581 (+4369.23%)
Mutual labels:  unit-testing
openjfx-docs
Getting started guide for JavaFX 11
Stars: ✭ 70 (+438.46%)
Mutual labels:  netbeans
MealsCatalogue
Flutter application using base architecture component like BLoC pattern, RxDart, Http, SQFlite, Flavor, Unit Testing (Mockito), Instrumentation Testing and etc 🔥
Stars: ✭ 45 (+246.15%)
Mutual labels:  unit-testing
specdris
A test framework for Idris
Stars: ✭ 55 (+323.08%)
Mutual labels:  unit-testing
kgb
Python function spy support for unit tests
Stars: ✭ 46 (+253.85%)
Mutual labels:  unit-testing
MockitoIn28Minutes
Learn Mockito from In28Minutes
Stars: ✭ 95 (+630.77%)
Mutual labels:  unit-testing
react-testing-talk
No description or website provided.
Stars: ✭ 12 (-7.69%)
Mutual labels:  unit-testing
apollo-graphql-tutorial
Learning apollo graphql version 2.x with Node.js
Stars: ✭ 18 (+38.46%)
Mutual labels:  unit-testing
cpptest
🛠️ Powerful, yet simple, C++ unit testing framework; new home after https://sourceforge.net/projects/cpptest/
Stars: ✭ 51 (+292.31%)
Mutual labels:  unit-testing
dummyjdbc
dummyjdbc answers database requests with dummy data to be independent of an existing database.
Stars: ✭ 20 (+53.85%)
Mutual labels:  unit-testing

NBCndUnit

CI GitHub release License NetBeans Java

NBCndUnit is a NetBeans plugin for C/C++ unit testing. It integrates the CppUTest, GoogleTest (gtest) / GoogleMock (gmock) and libunittest C++ unit testing frameworks.

Requirements

Compatibility Note:

NetBeans releases newer than 8.x don't support C / C++ yet.

Supported C/C++ unit testing frameworks

Installation

The Plugin is available through the Plugin Manager (Tools → Plugins → Available Plugins).

As an alternative, it’s also possible to download the NBM manually from the NetBeans Plugin Portal.

Signature Info

Update

Updates are delivered as usual by the NetBeans Updater.

Getting started

  1. Create a new NetBeans C/C++ project
  2. Add unit testing framework (binaries and headers) to the test settings
  3. Write tests
  4. Run them

Note: Some frameworks require verbose output.

Creating new Tests

New tests can be created either manually or using the new unit test wizard – located in the Unit Tests file category.

Examples

Example test suites are available in the examples directory.

Running tests

The tests are run as usual using the Test button.

The Test Results window shows the result of the tests.

Enabling verbose mode

CppUTest and libunittest C++ do not show test details per default, therefore the verbose mode must be set.

Test mains created using the new file wizard already have this mode enabled. For existing tests the examples below can be used.

At this point it's also possible to add further options (eg. test filter).

CppUTest

#include <CppUTest/CommandLineTestRunner.h>
#include <vector>

int main(int argc, char** argv)
{
    std::vector<const char*> args(argv, argv + argc);
    args.push_back("-v"); // Set verbose mode
    args.push_back("-c"); // Set color output (Optional)

    return RUN_ALL_TESTS(args.size(), &args[0]);
}

libunittest C++

#include <libunittest/main.hpp>
#include <vector>

int main(int argc, char** argv)
{
    std::vector<const char*> args(argv, argv + argc);
    args.push_back("-v"); // Set verbose mode

    return unittest::process(args.size(), const_cast<char**>(&args[0]));
}

Using existing Projects

NetBeans projects created from existing projects (eg. using custom Makefiles, CMake, …) do not have Test Support enabled by default.

To enable it, there are two Make-Targets and a configuration update required. For more information on this, please see Wiki → Using exsiting projects.

Note: This fature is currently experimental!

Project requirements

The project must have these Make-Targets:

Target
build-tests builds the tests, executed before running the tests (can be empty)
test executes the tests (verbose output)

Note: CMake has make test reserved, please see Wiki for a workaround.

Enable Test Support

In addition, the Netbeans Project configuration must contain a Test Files Folder. The project can be upgraded using the New File Wizzard for Unit Test / Test Main files:

New Files → Unit Tests → <select any> and enable Configure custom Project

A Test Files folder is added to the NetBeans project – not visible at file level.

This step is needed only once per project, though doing this more than once has no effect.

License

GNU General Public License (GPL)

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].