All Projects → Azure → ctest

Azure / ctest

Licence: other
A simple portable C test runner

Programming Languages

c
50402 projects - #5 most used programming language
CMake
9771 projects
C++
36643 projects - #6 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to ctest

Acutest
Simple header-only C/C++ unit testing facility.
Stars: ✭ 170 (+900%)
Mutual labels:  test-runner, tests, testing-tools
Cypress
Fast, easy and reliable testing for anything that runs in a browser.
Stars: ✭ 35,145 (+206635.29%)
Mutual labels:  test-runner, tests, testing-tools
Nunit Console
NUnit Console runner and test engine
Stars: ✭ 168 (+888.24%)
Mutual labels:  test-runner, testing-tools
Junit Dataprovider
A TestNG like dataprovider runner for JUnit with many additional features
Stars: ✭ 226 (+1229.41%)
Mutual labels:  test-runner, testing-tools
Htmltestrunner
A Test Runner in python, for Human Readable HTML Reports
Stars: ✭ 228 (+1241.18%)
Mutual labels:  test-runner, testing-tools
Pytest Ui
Text User Interface for running python tests
Stars: ✭ 23 (+35.29%)
Mutual labels:  test-runner, testing-tools
Meissa
Cross-platform Distributed Test Runner. Executes tests in parallel, time balanced on multiple machines.
Stars: ✭ 66 (+288.24%)
Mutual labels:  test-runner, testing-tools
Specjour
distributed rspec & cucumber via bonjour
Stars: ✭ 214 (+1158.82%)
Mutual labels:  test-runner, testing-tools
eat
Json based scenario testing tool(which can have test for functional and non-functional)
Stars: ✭ 41 (+141.18%)
Mutual labels:  test-runner, testing-tools
BadMedicine
Library and CLI for randomly generating medical data like you might get out of an Electronic Health Records (EHR) system
Stars: ✭ 18 (+5.88%)
Mutual labels:  tests, testing-tools
test junkie
Highly configurable testing framework for Python
Stars: ✭ 72 (+323.53%)
Mutual labels:  test-runner, testing-tools
Vstest
Visual Studio Test Platform is the runner and engine that powers test explorer and vstest.console.
Stars: ✭ 624 (+3570.59%)
Mutual labels:  test-runner, testing-tools
playwright-test
Run unit tests with several runners or benchmark inside real browsers with playwright.
Stars: ✭ 81 (+376.47%)
Mutual labels:  tests, testing-tools
Zunit
A powerful testing framework for ZSH projects
Stars: ✭ 140 (+723.53%)
Mutual labels:  test-runner, testing-tools
Testfx
MSTest V2 framework and adapter
Stars: ✭ 391 (+2200%)
Mutual labels:  test-runner, testing-tools
Dredd
Language-agnostic HTTP API Testing Tool
Stars: ✭ 3,770 (+22076.47%)
Mutual labels:  test-runner, tests
Openrunner
Computest Openrunner: Benchmark and functional testing for frontend-heavy web applications
Stars: ✭ 16 (-5.88%)
Mutual labels:  test-runner, testing-tools
bron
🏃‍♂️ Fast & tiny test runner for Node.js
Stars: ✭ 17 (+0%)
Mutual labels:  test-runner, testing-tools
ts-mock-imports
Intuitive mocking library for Typescript class imports
Stars: ✭ 103 (+505.88%)
Mutual labels:  tests, testing-tools
PixelTest
Fast, modern, simple iOS snapshot testing written purely in Swift.
Stars: ✭ 56 (+229.41%)
Mutual labels:  tests, testing-tools

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

ctest

ctest is a simple portable C test runner.

Setup

  1. Clone ctest by:
git clone https://github.com/Azure/ctest
  1. Create a folder called cmake (or any name of your choice).

  2. Switch to the cmake folder and run

cmake ..

Build

Switch to the cmake folder and run:

cmake --build .

Installation and Use

Optionally, you may choose to install ctest on your machine:

  1. Switch to the cmake folder and run

    cmake --build . --target install
    

    or

    Linux:

    sudo make install
    

    Windows:

    msbuild /m INSTALL.vcxproj
    
  2. Use it in your project (if installed)

    find_package(ctest REQUIRED CONFIG)
    target_link_library(yourlib ctest)
    

Building the tests

In order to build the tests use the run_unittests cmake option:

cmake .. -Drun_unittests:bool=ON

Example

#include "ctest.h"
#include "SomeUnitUnderTest.h"

CTEST_BEGIN_TEST_SUITE(SimpleTestSuiteOneTest)

CTEST_FUNCTION(Test1)
{
    // arrange

    // act
    int x = SomeFunction();

    // assert
    CTEST_ASSERT_ARE_EQUAL(int, 42, x);
}

CTEST_END_TEST_SUITE(SimpleTestSuiteOneTest)
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].