uvgrtp-base/test
Joni Räsänen e2234029d0 tests: Add tests for small NAL units
Add tests for very small NAL units (4+ bytes for h264 and 6+ for
h265/h266).
2022-11-23 13:41:42 +02:00
..
CMakeLists.txt tests: Add unit test for H.26x start code lookup (SCL) 2022-10-24 15:10:25 +03:00
README.md doc: Update link to examples folder 2022-02-28 12:04:09 +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 tests: Update enum names to correct ones in tests 2022-09-21 08:40:06 +03:00
test_3_rtcp.cpp rtcp: Add field t APP that tells the payload length 2022-09-05 07:37:10 +03:00
test_4_formats.cpp tests: Add tests for small NAL units 2022-11-23 13:41:42 +02:00
test_5_srtp_zrtp.cpp zrtp: Update flag names used to determine the ZRTP mode 2022-09-22 07:46:40 +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_common.hh tests: Add tests for small NAL units 2022-11-23 13:41:42 +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.

GCC (Linux)

Install Crypto++. 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. Add the location of compiled Crypto++ library to uvgrtp_test -> Properties -> Linker -> General -> Additional Library Directories unless it is found in PATH. 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.

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.