This page outlines how the Launchable CLI interfaces with GoogleTest.
After running tests, point the CLI to your test report files to collect test results and train the model:
# run the tests however you normally do
launchable record tests --build <BUILD NAME> googletest ./report
The high level flow for subsetting is:
- 1.Get the full list of tests/test paths and pass that to
launchable subsetwith an optimization target for the subset
launchable subsetwill get a subset from the Launchable platform and output that list to a text file
- 3.Pass the text file into your test runner to run only those tests
To retrieve a subset of tests, first list all the tests you would normally run and pass that to
./my-test --gtest_list_tests | launchable subset \
--build <BUILD NAME> \
--confidence <TARGET> \
googletest > launchable-subset.txt
--buildshould use the same
<BUILD NAME>value that you used before in
launchable record build.
This creates a file called
launchable-subset.txtthat you can pass into your command to run tests:
./my-test --gtest_filter="$(cat launchable-subset.txt)"