command_line_usage_recommendatio.html 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. <html>
  2. <head>
  3. <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
  4. <title>Command line usage recommendations</title>
  5. <link rel="stylesheet" href="../../boostbook.css" type="text/css">
  6. <meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
  7. <link rel="home" href="../../index.html" title="Boost.Test">
  8. <link rel="up" href="../practical_usage_recommendations.html" title="Practical usage recommendations">
  9. <link rel="prev" href="ide_usage_recommendations.html" title="IDE usage recommendations">
  10. <link rel="next" href="tutorials.html" title="Tutorials">
  11. </head>
  12. <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
  13. <table cellpadding="2" width="100%"><tr>
  14. <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
  15. <td align="center"><a href="../../../../../../index.html">Home</a></td>
  16. <td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
  17. <td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
  18. <td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
  19. <td align="center"><a href="../../../../../../more/index.htm">More</a></td>
  20. </tr></table>
  21. <hr>
  22. <div class="spirit-nav">
  23. <a accesskey="p" href="ide_usage_recommendations.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../practical_usage_recommendations.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="tutorials.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
  24. </div>
  25. <div class="section">
  26. <div class="titlepage"><div><div><h3 class="title">
  27. <a name="boost_test.practical_usage_recommendations.command_line_usage_recommendatio"></a><a class="link" href="command_line_usage_recommendatio.html" title="Command line usage recommendations">Command
  28. line usage recommendations</a>
  29. </h3></div></div></div>
  30. <h5>
  31. <a name="boost_test.practical_usage_recommendations.command_line_usage_recommendatio.h0"></a>
  32. <span class="phrase"><a name="boost_test.practical_usage_recommendations.command_line_usage_recommendatio.if_you_got_fatal_exception_somew"></a></span><a class="link" href="command_line_usage_recommendatio.html#boost_test.practical_usage_recommendations.command_line_usage_recommendatio.if_you_got_fatal_exception_somew">If
  33. you got fatal exception somewhere within test case, make program generate
  34. core-dump by adding extra command line argument</a>
  35. </h5>
  36. <p>
  37. If you got "memory access violation" message (or any other message
  38. indication fatal or system error) when you run you test, to get more information
  39. about the error location add
  40. </p>
  41. <pre class="programlisting">--<a class="link" href="../utf_reference/rt_param_reference/catch_system.html" title="catch_system_errors">catch_system_error</a>=no
  42. </pre>
  43. <p>
  44. to the test run command line. Now run the test again and it will create a
  45. core-dump you could analyze using you preferable debugger. Or run it under
  46. debugger in a first place and it will break at the point of failure.
  47. </p>
  48. <h5>
  49. <a name="boost_test.practical_usage_recommendations.command_line_usage_recommendatio.h1"></a>
  50. <span class="phrase"><a name="boost_test.practical_usage_recommendations.command_line_usage_recommendatio.how_to_use_test_module_build_wit"></a></span><a class="link" href="command_line_usage_recommendatio.html#boost_test.practical_usage_recommendations.command_line_usage_recommendatio.how_to_use_test_module_build_wit">How
  51. to use test module build with Boost.Test framework under management of automated
  52. regression test facilities?</a>
  53. </h5>
  54. <p>
  55. My first recommendation is to make sure that the test framework catches all
  56. fatal errors by adding argument
  57. </p>
  58. <pre class="programlisting">--<a class="link" href="../utf_reference/rt_param_reference/catch_system.html" title="catch_system_errors">catch_system_error</a>=yes
  59. </pre>
  60. <p>
  61. to all test modules invocations. Otherwise test program may produce unwanted
  62. dialogs (depends on compiler and OS) that will halt you regression tests
  63. run. The second recommendation is to suppress result report output by adding
  64. </p>
  65. <pre class="programlisting">--<a class="link" href="../utf_reference/rt_param_reference/report_level.html" title="report_level">report_level</a>=no
  66. </pre>
  67. <p>
  68. argument and test log output by adding
  69. </p>
  70. <pre class="programlisting">--<a class="link" href="../utf_reference/rt_param_reference/log_level.html" title="log_level">log_level</a>=nothing
  71. </pre>
  72. <p>
  73. argument, so that test module won't produce undesirable output no one is
  74. going to look at anyway. We recommend relying only on result code that will
  75. be consistent for all test programs. An alternative to my second recommendation
  76. is direct both log and report to separate file you could analyze later on.
  77. Moreover you can make Boost.Test to produce them in XML or JUNIT format using
  78. </p>
  79. <pre class="programlisting">--<a class="link" href="../utf_reference/rt_param_reference/output_format.html" title="output_format">output_format</a>=XML
  80. </pre>
  81. <p>
  82. or
  83. </p>
  84. <pre class="programlisting">--<a class="link" href="../utf_reference/rt_param_reference/log_format.html" title="log_format">log_format</a>=JUNIT
  85. </pre>
  86. <p>
  87. and use some automated tool that will format this information as you like.
  88. </p>
  89. </div>
  90. <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
  91. <td align="left"></td>
  92. <td align="right"><div class="copyright-footer">Copyright &#169; 2001-2019 Boost.Test
  93. contributors<p>
  94. Distributed under the Boost Software License, Version 1.0. (See accompanying
  95. file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
  96. </p>
  97. </div></td>
  98. </tr></table>
  99. <hr>
  100. <div class="spirit-nav">
  101. <a accesskey="p" href="ide_usage_recommendations.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../practical_usage_recommendations.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="tutorials.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
  102. </div>
  103. </body>
  104. </html>