Running Tests
Turnkey supports running tests via Buck2.
Test Commands
# Run tests for a specific target
tk test //path/to:target-test
# Run all tests
tk test //...
# Run tests matching a pattern
tk test //src/examples/...
Language-Specific Tests
Go Tests
tk test //src/go/pkg/mypackage:mypackage_test
Rust Tests
tk test //src/rust/mycrate:mycrate-test
Python Tests
tk test //src/python/mymodule:test
Test Output
Test results are displayed in the console. For detailed output:
tk test //... -- --nocapture
Filtering Tests
Pass arguments after -- to the test runner:
# Run specific test function (Go)
tk test //pkg:pkg_test -- -run TestSpecificFunction
# Run specific test (Rust)
tk test //crate:crate-test -- specific_test_name
Continuous Testing
For development, use Buck2's file watching:
tk test //path/to:target-test --watch