mirror of
https://github.com/boostorg/test.git
synced 2026-02-02 21:22:10 +00:00
111 lines
5.1 KiB
HTML
Executable File
111 lines
5.1 KiB
HTML
Executable File
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
|
<title>Microsoft Visual Studio .NET usage recommendations</title>
|
|
<link rel="stylesheet" href="../../../style/style.css" type="text/css">
|
|
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
|
|
<link rel="home" href="../../index.html" title="Boost Test Library">
|
|
<link rel="up" href="../usage-recommendations.html" title="The unit test framework usage recommendations">
|
|
<link rel="prev" href="generic.html" title="Generic usage recommendations">
|
|
<link rel="next" href="command-line-specific.html" title="Command line usage recommendations">
|
|
<script language="JavaScript1.2" src="../../../js/boost-test.js"></script>
|
|
</head>
|
|
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
|
<table width="100%"><tr>
|
|
<td width="10%"><a href="../../index.html"><img alt="Home" width="229" height="61" border="0" src="../../../../../../libs/test/doc/img/boost.test.logo.png"></a></td>
|
|
<td valign="middle" align="left"> > <a href="../../utf.html">The Unit Test Framework</a><a href="../../execution-monitor.html">
|
|
>
|
|
</a><a href="../usage-recommendations.html">Usage recommendations</a><a href="../examples-collection.html">
|
|
>
|
|
</a><b>Microsoft Visual Studio .NET users specific</b>
|
|
</td>
|
|
<td><div class="spirit-nav">
|
|
<a href="generic.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a href="command-line-specific.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
|
</div></td>
|
|
</tr></table>
|
|
<hr>
|
|
<div class="section">
|
|
<div class="titlepage"><div><div><h4 class="title">
|
|
<a name="utf.usage-recommendations.dot-net-specific"></a>Microsoft Visual Studio .NET usage recommendations</h4></div></div></div>
|
|
<div class="qandaset">
|
|
<a name="id550174"></a><dl>
|
|
<dt> <a href="dot-net-specific.html#id550180">
|
|
Use custom build step to automatically start test program after compilation
|
|
</a>
|
|
</dt>
|
|
<dt> <a href="dot-net-specific.html#id550255">
|
|
If you got fatal exception somewhere within test case, make debugger break at the point the failure by adding
|
|
extra command line argument
|
|
</a>
|
|
</dt>
|
|
</dl>
|
|
<table border="0" width="100%" summary="Q and A Set">
|
|
<col align="left" width="0%">
|
|
<col>
|
|
<tbody>
|
|
<tr class="question">
|
|
<td align="left" valign="top">
|
|
<a name="id550180"></a><a name="id550182"></a>
|
|
</td>
|
|
<td align="left" valign="top"><b><p>
|
|
Use custom build step to automatically start test program after compilation
|
|
</p></b></td>
|
|
</tr>
|
|
<tr class="answer">
|
|
<td align="left" valign="top"></td>
|
|
<td align="left" valign="top">
|
|
<p class="first-line-indented">
|
|
I found it most convenient to put test program execution as a post-build step in compilation. To do so use
|
|
project property page:
|
|
</p>
|
|
<div class="mediaobject"><img src="../../../img/post_build_event.jpg"></div>
|
|
<p class="first-line-indented">
|
|
Full command you need in "Command Line" field is:
|
|
</p>
|
|
<div class="cmdsynopsis"><p><code class="command">"$(TargetDir)\$(TargetName).exe"</code> --result_code=no --report_level=no </p></div>
|
|
<p class="first-line-indented">
|
|
Note that both report level and result code are suppressed. This way the only output you may see from this
|
|
command are possible runtime errors. But the best part is that you could jump through these errors using usual
|
|
keyboard shortcuts/mouse clicks you use for compilation error analysis:
|
|
</p>
|
|
<div class="mediaobject"><img src="../../../img/post_build_out.jpg"></div>
|
|
</td>
|
|
</tr>
|
|
<tr class="question">
|
|
<td align="left" valign="top">
|
|
<a name="id550255"></a><a name="id550258"></a>
|
|
</td>
|
|
<td align="left" valign="top"><b><p>
|
|
If you got fatal exception somewhere within test case, make debugger break at the point the failure by adding
|
|
extra command line argument
|
|
</p></b></td>
|
|
</tr>
|
|
<tr class="answer">
|
|
<td align="left" valign="top"></td>
|
|
<td align="left" valign="top">
|
|
<p class="first-line-indented">
|
|
If you got "memory access violation" message (or any other message indication fatal or system error) when you
|
|
run you test, to get more information of error location add --catch_system_errors=no to the test run command
|
|
line:
|
|
</p>
|
|
<div class="mediaobject"><img src="../../../img/run_args.jpg"></div>
|
|
<p class="first-line-indented">
|
|
Now run the test again under debugger and it will break at the point of failure.
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
|
<td align="left"></td>
|
|
<td align="right"><div class="copyright-footer">Copyright © 2001-2012 Gennadiy Rozental</div></td>
|
|
</tr></table>
|
|
<hr>
|
|
<div class="spirit-nav">
|
|
<a accesskey="p" href="generic.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../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-specific.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
|
|
</div>
|
|
</body>
|
|
</html>
|