uvgrtp-base/test
Heikki Tampio b5905bcae2 v3c: Automatically disable Start Code related functionality when format is V3C 2024-01-12 13:14:59 +02:00
..
CMakeLists.txt build: Be more user friendly if git or pkgconfig are not found 2023-05-11 10:29:16 +03:00
README.md doc: Update test suite instructions 2022-12-14 15:52:31 +02:00
main.cpp build: Completely Redesigned CMake files (#44) 2021-08-08 22:18:40 +02:00
test_1_version.cpp Merge branch 'example_improvements' 2022-02-22 14:03:49 +02:00
test_2_rtp.cpp v3c: Improve V3C tests 2024-01-12 13:14:19 +02:00
test_3_rtcp.cpp multipelx: Add more checks in RTCP multiplex tests 2023-06-26 14:04:30 +03:00
test_4_formats.cpp v3c: Automatically disable Start Code related functionality when format is V3C 2024-01-12 13:14:59 +02:00
test_5_srtp_zrtp.cpp common: Small fixes to function names, etc 2023-08-02 13:30:21 +03:00
test_6_scl_unit_test.cpp tests: Add more tests for start code lookup 2022-10-28 16:01:44 +03:00
test_7_ipv6.cpp v3c: Improve V3C tests 2024-01-12 13:14:19 +02:00
test_common.hh v3c: Improve V3C tests 2024-01-12 13:14:19 +02:00

README.md

Testing uvgRTP

Testing uvgRTP is meant for the developers of uvgRTP. After each major change, it is recommended to run the automated tests. New automated tests can be a great help in validating the functionality of new features as well as helping detect bugs caused by later changes.

These tests are not meant to be readable examples. For that you might want to check out examples.

Building the automated tests

uvgRTP uses GoogleTest framework for automated testing. The automated tests are run separately after the build process. First, build uvgRTP normally. Running the CMake will create a new folder called test under the build folder, where you can find the necessary files for building the test suite.

GCC (Linux)

Install Crypto++ if you want to test encryption. After this, run make in build/test folder. This will create a program called uvgrtp_test. Run this program to run the automated tests.

MSVC (Windows)

Open the generated solution. Building the uvgrtp_test will generate the program in Debug/Release folder. Run the uvgrtp_test.exe to start the automated tests. Using a command line is recommended so the results don't disappear after finishing.

See the build instruction for how to integrate Crypto++ to test suite.

Current test suites

Currently, the automated tests consist of the following test suites:

The tests should be coded in such a way to make the tests themselves as resilient as possible to problems while also validating that the uvgRTP output is correct. In other words, it is more helpful if a check is false than if the test suite crashes.

Creating new tests

New tests can be created by adding a new function in one of the existing files or creating a new file. Each file should only contain tests from a single test suite and all tests of one test suite should be located in a single file. New files have to also be added to the local CMakeLists.txt file.

You can read about GoogleTest framework here.