testing.md (googletest-release-1.11.0) | : | testing.md (googletest-release-1.12.0) | ||
---|---|---|---|---|
skipping to change at line 521 | skipping to change at line 521 | |||
##### RecordProperty {#Test::RecordProperty} | ##### RecordProperty {#Test::RecordProperty} | |||
`static void Test::RecordProperty(const std::string& key, const std::string& | `static void Test::RecordProperty(const std::string& key, const std::string& | |||
value)` \ | value)` \ | |||
`static void Test::RecordProperty(const std::string& key, int value)` | `static void Test::RecordProperty(const std::string& key, int value)` | |||
Logs a property for the current test, test suite, or entire invocation of the | Logs a property for the current test, test suite, or entire invocation of the | |||
test program. Only the last value for a given key is logged. | test program. Only the last value for a given key is logged. | |||
The key must be a valid XML attribute name, and cannot conflict with the ones | The key must be a valid XML attribute name, and cannot conflict with the ones | |||
already used by GoogleTest (`name`, `status`, `time`, `classname`, `type_param`, | already used by GoogleTest (`name`, `file`, `line`, `status`, `time`, | |||
and `value_param`). | `classname`, `type_param`, and `value_param`). | |||
`RecordProperty` is `public static` so it can be called from utility functions | `RecordProperty` is `public static` so it can be called from utility functions | |||
that are not members of the test fixture. | that are not members of the test fixture. | |||
Calls to `RecordProperty` made during the lifespan of the test (from the moment | Calls to `RecordProperty` made during the lifespan of the test (from the moment | |||
its constructor starts to the moment its destructor finishes) are output in XML | its constructor starts to the moment its destructor finishes) are output in XML | |||
as attributes of the `<testcase>` element. Properties recorded from a fixture's | as attributes of the `<testcase>` element. Properties recorded from a fixture's | |||
`SetUpTestSuite` or `TearDownTestSuite` methods are logged as attributes of the | `SetUpTestSuite` or `TearDownTestSuite` methods are logged as attributes of the | |||
corresponding `<testsuite>` element. Calls to `RecordProperty` made in the | corresponding `<testsuite>` element. Calls to `RecordProperty` made in the | |||
global context (before or after invocation of `RUN_ALL_TESTS` or from the | global context (before or after invocation of `RUN_ALL_TESTS` or from the | |||
End of changes. 1 change blocks. | ||||
2 lines changed or deleted | 2 lines changed or added |