Home > The Unit Test Framework > User's guide > Runtime configuration > Parameters reference
PrevNext

Runtime parameters reference

Each parameter specification includes: the full parameter name, corresponding environment variable name, command line argument name, acceptable values and a long description. The default value for the parameter is bold in the acceptable values list. All values are case sensitive and are required to exactly match the parameter specification.
每個參數的定義包括:參數全名,對應的環境變量名稱,命令行參數名稱,可接受的值和一個長的描述。 參數的默認值在可接受值的列表中以粗體表示。 所有的值都是大小寫敏感的,需要精確匹配參數定義。

Parameter Name : Automatically attach debugger in case of system failure
如果碰到系統錯誤自動連接到調試器
Environment variable name : BOOST_TEST_AUTO_START_DBG
Command line argument name : auto_start_dbg
Acceptable Values :
no
yes
debugger identifier
Description :

specifies whether Boost.Test should try to attach a debugger in case if fatal system error occurs. If value is "yes" the default debugger configured for the platform is going to be attempted. Alternatively the debugger identified by the argument value of the parameter is used. For more details on advanced debugger support in Boost.Test check section dedicated to Boost.Test debug API.
指定 Boost.Test 在碰到致命系統錯誤時是否試圖連接到調試器。 如果值為 "yes",平台默認的調試器會試圖被應用。或者使用由參數值指定的調試器。 關於 Boost.Test 中調試器的高級支持請參見 Boost.Test 調試 API 章節。


Parameter Name : Print build info 打印編譯信息
Environment variable name : BOOST_TEST_BUILD_INFO
Command line argument name : build_info
Acceptable Values :
no
yes
Description :

makes the framework to print build information that include: platform, compiler, STL implementation in use and boost version.
框架打印編譯信息,包括:平台,編譯器,使用的 STL 實現和 boost 版本。


Parameter Name : Catch system errors 捕獲系統錯誤
Environment variable name : BOOST_TEST_CATCH_SYSTEM_ERRORS
Command line argument name : catch_system_errors
Acceptable Values :
yes
no
Description :

value "no" prohibits the framework from catching asynchronous system events. This could be used for test programs executed within GUI or to get a coredump for stack analysis. See usage recommendations page for more details.
參數值為 "no" 阻止框架捕獲異步系統事件。這可以在測試在 GUI 中運行或從核心轉儲中分析棧時使用。 更多細節請參見使用推薦頁。


Parameter Name : Detect memory leaks 檢查內存洩漏
Environment variable name : BOOST_TEST_DETECT_MEMORY_LEAK
Command line argument name : build_info
Acceptable Values :
0
1
integer value > 1
Description :

positive value tells the framework to detect the memory leaks (if any). Any value greater then 1 in addition is treated as leak allocation number and setup runtime breakpoint. In other words setting this parameter to the positive value N greater than 1 causes the framework to set a breakpoint at Nth memory allocation (don't do that from the command line - only when you are under debugger). Note: if your test program produce memory leaks notifications, they are combined with allocation number values you could use to set a breakpoint. Currently only applies to MS family of compilers.
正值告訴框架檢測內存洩漏 (如果有)。大於 1 的值作為洩漏申請次數,並安裝運行時斷點。 換句話說,將這個參數設為大於 1 的正值 N,會使得框架在第 N 次內存申請上設置斷點 (不要在命令行這麼做 - 只有在調試器下)。 注意,如果你的測試程序產生內存洩漏通知,它會和你可以用來設置斷點的申請次數一起出現。 現在只能應用於 MS 一族的編譯器。


Parameter Name : [Do not] trap floating point exceptions
[不]陷入浮點數異常
Environment variable name : BOOST_TEST_DETECT_FP_EXCEPTIONS
Command line argument name : detect_fp_exceptions
Acceptable Values :
no
yes
Description :

enables/disable hardware traps for the floating point exception if they are supported. By default is disabled.
為浮點數異常開啟 / 關閉硬件陷入,如果支持的話。默認關閉。


Parameter Name : The log format 日誌格式
Environment variable name : BOOST_TEST_LOG_FORMAT
Command line argument name : log_format
Acceptable Values :
HRF - human readable format 可讀格式
XML - XML format for automated output processing
XML - XML 格式用於輸出的自動處理
Description :

allows selecting the UTF log format from the list of formats supplied by the framework. To specify custom log format use the unit_test_log API.
UTF 提供的格式列表中選擇日誌格式。 使用 unit_test_log API 自定義日誌格式。


Parameter Name : The UTF log level UTF 日誌級別
Environment variable name : BOOST_TEST_LOG_LEVEL
Command line argument name : log_level
Acceptable Values :

all -

report all log messages including the passed test notification
報告包括成功測試通知的所有日誌信息

success -

the same as all 和 all 相同

test_suite -

show test suite messages 顯示測試套件信息

message -

show user messages 顯示用戶信息

warning -

report warnings issued by user 報告用戶發出的警告

error -

report all error conditions 報告所有錯誤情況

cpp_exception -

report uncaught c++ exception
報告未捕獲的 C++ 異常

system_error -

report system originated non-fatal errors (for example, timeout or floating point exception)
報告系統引起的非致命錯誤 (例如,超時或浮點數異常)

fatal_error -

report only user or system originated fatal errors (for example, memory access violation)
只報告用戶或系統引起的致命錯誤 (例如,內存訪問越界)

nothing -

do not report any information 不報告任何信息
Description :

allows setting the UTF log level in a range from a complete log, when all successful tests are confirmed and all test suite messages are included, to an empty log when nothing is logged a test output stream. Note that log levels are accumulating, in other words each log level includes also all the information reported by less restrictive ones.
設置 UTF 日誌級別,從完全的日誌,包含所有成功測試,所有測試套件的信息, 到空的日誌,測試輸出流中沒有任何日誌。 注意日誌級別是遞增的,換句話說,每個日誌級別都包含低一級日誌的所有內容。


Parameter Name : The output format 輸出格式
Environment variable name : BOOST_TEST_OUTPUT_FORMAT
Command line argument name : output_format
Acceptable Values :
HRF - human readable format 可讀格式
XML - XML format for automated output processing
XML - XML 格式,用於輸出的自動處理
Description :

combines an effect of report_format and log_format parameters. Has higher priority than either one of them if specified.
report_format 和 log_format 參數的集合。相對於另外兩個有更高的優先級。


Parameter Name : Random seed for random order of test cases
測試用例隨機順序的隨機數種子
Environment variable name : BOOST_TEST_RANDOM
Command line argument name : random
Acceptable Values :
0
1
integer value > 1
Description :

positive value makes the framework to run the test cases in random order. Also if this value is greater than 1, it's used as a random seed. In other case random seed is generated based on current time.
正值使得框架以隨機順序運行測試用例。同樣如果值大於 1,它將作為隨機數種子。 否則基於當前時間生成隨機數種子。


Parameter Name : The report format 報告格式
Environment variable name : BOOST_TEST_REPORT_FORMAT
Command line argument name : report
Acceptable Values :
HRF - human readable format 可讀格式
XML - XML format for automated output processing
XML - XML 格式,用於輸出自動處理
Description :

allows selecting the UTF report format from the list of formats supplied by the framework. To specify custom report format use unit_test_report API.
允許從 UTF 框架提供的格式列表中選擇報告格式。 使用 unit_test_report API 自定義報告格式。


Parameter Name : The results report level 結果報告級別
Environment variable name : BOOST_TEST_LOG_FORMAT
Command line argument name : log_format
Acceptable Values :
no
confirm
short
detailed
Description :

allows setting the level of detailization for the testing results report generated by the framework. Use value "no" to eliminate the results report completely. See the the section called 「Test report output」 for description of different report formats.
選擇框架生成的測試結果報告的細節程度。使用值 "no" 完全去掉結果報告。 不同報告格式的說明請參見 「測試報告輸出」 一章


Parameter Name : [Do not] return result code [不]返回結果代碼
Environment variable name : BOOST_TEST_RESULT_CODE
Command line argument name : result_code
Acceptable Values :
yes
no
Description :

value "no" enforces the framework to always return zero result code. This could be used for test programs executed within GUI. See usage recommendations section for more details.
值為 "no" 強迫框架總是返回 0 結果代碼。這可以應用於測試程序用 GUI 執行。 更多細節參見使用建議


Parameter Name : Test units to run 要運行的測試單元
Environment variable name : BOOST_TESTS_TO_RUN
Command line argument name : run_test
Acceptable Values :
specification of test units to run
Description :

specifies which test units to run.
指定要運行的測試單元


Parameter Name : Show progress 顯示進度
Environment variable name : BOOST_TEST_SHOW_PROGRESS
Command line argument name : show_progress
Acceptable Values :
no
yes
Description :

makes the framework to print progress information.
使框架打印進度信息


Parameter Name : Use alternative stack 使用備用棧
Environment variable name : BOOST_TEST_USE_ALT_STACK
Command line argument name : use_alt_stack
Acceptable Values :
yes
no
Description :

specifies whether or not the Boost.Test Execution Monitor should employ an alternative stack for signals processing on platforms where they are supported.
指定 Boost.Test Execution Monitor 在支持的平台上是否使用備用棧處理信息。



PrevUpHomeNext