To run all tests:
$ python path/to/black_box_tests.py --platform PLATFORM --config CONFIG
e.g. $ python path/to/black_box_tests.py --platform linux-x64x11 --config devel
To run an individual test:
$ python path/to/black_box_tests.py --platform PLATFORM --config CONFIG --test_name TEST_NAME
e.g. $ python path/to/black_box_tests.py --platform linux-x64x11 --config devel --test_name preload_font
You can apply --gtest_filter through --target_params, e.g. $ python path/to/black_box_tests.py --platform linux-x64x11 --config devel --test_name web_platform_tests --target_params=“--gtest_filter=fetch/*”
Note: When declaring a gtest_filter, it will override the filters defined in GetWebPlatformTestFilters in configuration.py.
If you see a HTTPConnection error which eventually causes a TimeoutException for the test, you might want to add “--server_binding_address localhost” in your python command.
Each script in tests/ includes one python unittest test case. In a test script, you can perform any webdriver operations on Cobalt through BlackBoxCobaltRunner class.