Unit Testing Asterisk

Hello!

I have a question about the Unit Tests within asterisk, not the Testsuite. Using menuselect, I can either --enable-category MENUSELECT_TESTS menuselect.makeopts or --enable TEST_FRAMEWORK menuselect.makeopts

What’s the difference between these two options?

Any help will be highly appreciated.

The first enables all of the unit tests. The second enables test events and functionality in Asterisk used by tests in the testsuite.

1 Like

The second also enables some selective unit tests, that can be executed by test execute [test name] inside the asterisk console. So, why is that?

In some cases that will happen because the unit tests can not be externally written as a separate module to test the functionality without a lot of work to expose things that shouldn’t normally be exposed.

Yeah I figured. I have been ardently reading the source code.

1 Like