3 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
4 <title>IDE 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="general.html" title="General">
10 <link rel="next" href="command_line_usage_recommendatio.html" title="Command line usage recommendations">
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>
22 <div class="spirit-nav">
23 <a accesskey="p" href="general.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="command_line_usage_recommendatio.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
26 <div class="titlepage"><div><div><h3 class="title">
27 <a name="boost_test.practical_usage_recommendations.ide_usage_recommendations"></a><a class="link" href="ide_usage_recommendations.html" title="IDE usage recommendations">IDE
28 usage recommendations</a>
29 </h3></div></div></div>
31 This recommendation is shown using Microsoft Visual Studio as an example,
32 but you can apply similar steps in different IDEs.
35 <a name="boost_test.practical_usage_recommendations.ide_usage_recommendations.h0"></a>
36 <span class="phrase"><a name="boost_test.practical_usage_recommendations.ide_usage_recommendations.use_custom_build_step_to_automat"></a></span><a class="link" href="ide_usage_recommendations.html#boost_test.practical_usage_recommendations.ide_usage_recommendations.use_custom_build_step_to_automat">Use
37 custom build step to automatically start test program after compilation</a>
40 I found it most convenient to put test program execution as a post-build
41 step in compilation. To do so use project property page:
44 <span class="inlinemediaobject"><img src="../../images/post_build_event.jpg"></span>
47 Full command you need in "Command Line" field is:
49 <pre class="programlisting">"$(TargetDir)$(TargetName).exe" --<a class="link" href="../utf_reference/rt_param_reference/result_code.html" title="result_code"><code class="computeroutput"><span class="identifier">result_code</span></code></a>=no --<a class="link" href="../utf_reference/rt_param_reference/report_level.html" title="report_level"><code class="computeroutput"><span class="identifier">report_level</span></code></a>=no
52 Note that both report level and result code are suppressed. This way the
53 only output you may see from this command are possible runtime errors. But
54 the best part is that you could jump through these errors using usual keyboard
55 shortcuts/mouse clicks you use for compilation error analysis:
58 <span class="inlinemediaobject"><img src="../../images/post_build_out.jpg"></span>
61 <a name="boost_test.practical_usage_recommendations.ide_usage_recommendations.h1"></a>
62 <span class="phrase"><a name="boost_test.practical_usage_recommendations.ide_usage_recommendations.if_you_got_fatal_exception_somew"></a></span><a class="link" href="ide_usage_recommendations.html#boost_test.practical_usage_recommendations.ide_usage_recommendations.if_you_got_fatal_exception_somew">If
63 you got fatal exception somewhere within test case, make debugger break at
64 the point the failure by adding extra command line argument</a>
67 If you got "memory access violation" message (or any other message
68 indication fatal or system error) when you run you test, to get more information
71 <pre class="programlisting">--<a class="link" href="../utf_reference/rt_param_reference/catch_system.html" title="catch_system_errors">catch_system_error</a>=no
74 to the test run command line:
77 <span class="inlinemediaobject"><img src="../../images/run_args.jpg"></span>
80 Now run the test again under debugger and it will break at the point of failure.
83 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
84 <td align="left"></td>
85 <td align="right"><div class="copyright-footer">Copyright © 2001-2019 Boost.Test
87 Distributed under the Boost Software License, Version 1.0. (See accompanying
88 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>)
93 <div class="spirit-nav">
94 <a accesskey="p" href="general.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="command_line_usage_recommendatio.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>