Skip to main content

Running tests

The container project includes both basic unit tests and integration tests to ensure functionality and reliability.

Basic tests

To run the basic test suite:
make test
This runs the standard unit tests for the project.

Integration tests

Integration tests verify that all components work together correctly:
make integration
Integration tests may take longer to run as they test real container operations, including VM creation and network setup.

Running all tests

To build the project and run all tests in sequence:
make all test integration
This command:
1

Builds the project

Compiles all binaries and helper services
2

Runs unit tests

Executes the basic test suite
3

Runs integration tests

Executes the integration test suite

Testing release builds

To test a release build configuration:
BUILD_CONFIGURATION=release make all test integration
Testing release builds is important to catch optimization-related issues that may not appear in debug builds.

Test requirements

Before running tests, ensure you have:
  • Mac with Apple silicon
  • macOS 15 minimum, macOS 26 recommended
  • Xcode 26 installed and set as the active developer directory
  • Container services stopped (if running)
Some tests may require elevated privileges or specific network configurations. Make sure you have administrator access when needed.

Continuous testing during development

When actively developing, you can run tests frequently:
# Make changes to code
make clean all test
This ensures your changes don’t break existing functionality.

Testing with local dependencies

When testing changes to the Containerization package:
1

Configure local dependency

Set up the local containerization dependency as described in the building guide.
2

Build and test

Run the full build and test suite:
make clean all test integration
3

Verify changes

Ensure that your changes in both projects work correctly together.

Debugging test failures

If tests fail:
  1. Check the error output - Test failures include detailed error messages
  2. Verify requirements - Ensure all build requirements are met
  3. Check services - Make sure no container services are running that might interfere
  4. Review recent changes - Consider what code changes might have caused the failure
  5. Run individually - Try running make test and make integration separately to isolate the issue
For more advanced debugging, see the debugging guide for information on attaching debuggers to XPC helpers.

Build docs developers (and LLMs) love