Skip to content

Commit

Permalink
Add information on tracing in adapter (#1016)
Browse files Browse the repository at this point in the history
* add information tracing in adapter

* auto-fix all linting errors

---------

Co-authored-by: Sean Killeen <[email protected]> 1a5e446
  • Loading branch information
SeanKilleen committed Feb 10, 2025
1 parent 28eebca commit 9863165
Show file tree
Hide file tree
Showing 3 changed files with 721 additions and 710 deletions.
13 changes: 12 additions & 1 deletion articles/vs-test-adapter/Debugging.html
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,16 @@
<article class="content wrap" id="_content" data-uid="">
<h1 id="debugging-the-nunit3testadapter">Debugging the NUnit3TestAdapter</h1>

<h2 id="enable-tracing">Enable Tracing</h2>
<p>Before debugging the adapter, check the trace outputs, which can be enabled using runsettings, either from a file or
the command line.</p>
<p>Enable the following <a href="https://docs.nunit.org/articles/vs-test-adapter/Tips-And-Tricks.html#dumpxmltestdiscovery-and-dumpxmltestresults">features</a>:</p>
<pre><code class="lang-xml"> &lt;DumpXmlTestDiscovery&gt;true&lt;/DumpXmlTestDiscovery&gt;
&lt;DumpXmlTestResults&gt;true&lt;/DumpXmlTestResults&gt;
</code></pre>
<p>This will create a Dump folder under the executing bin directory, containing one file for each setting. These files
include both the input from the testhost and the resulting data returned by the framework/engine.</p>
<h2 id="enabling-debugging">Enabling debugging</h2>
<p>Debugging the adapter is done by first creating a debug version of the adapter.
You can then enable a debug run by passing one of the NUnit debug settings using runsettings.</p>
<p>The symbols are:</p>
Expand All @@ -97,7 +107,8 @@ <h1 id="debugging-the-nunit3testadapter">Debugging the NUnit3TestAdapter</h1>
<p>From command line, you can set these by adding</p>
<pre><code class="lang-cmd">dotnet test -- NUnit.DebugExecution=true
</code></pre>
<p>If you want to do this using Visual Studio, you must add a runsettings file, and add these settings there to the NUnit section.</p>
<p>If you want to do this using Visual Studio, you must add a runsettings file, and add these settings there to the NUnit
section.</p>
<p>A detailed explanation of the process can be found in <a href="https://hermit.no/debugging-the-nunit3testadapter-take-2/">this blog post</a></p>
<h2 id="debugging-earlier-versions">Debugging earlier versions</h2>
<p>See <a href="https://hermit.no/debugging-the-nunit3testadapter/">this blog post</a> for details on that process.</p>
Expand Down
2 changes: 1 addition & 1 deletion index.json
Original file line number Diff line number Diff line change
Expand Up @@ -3477,7 +3477,7 @@
"articles/vs-test-adapter/Debugging.html": {
"href": "articles/vs-test-adapter/Debugging.html",
"title": "Debugging the NUnit3TestAdapter | NUnit Docs",
"keywords": "Debugging the NUnit3TestAdapter Debugging the adapter is done by first creating a debug version of the adapter. You can then enable a debug run by passing one of the NUnit debug settings using runsettings. The symbols are: NUnit.DebugExecution NUnit.DebugDiscovery NUnit.Debug The last setting is equal to setting both of the two above. From command line, you can set these by adding dotnet test -- NUnit.DebugExecution=true If you want to do this using Visual Studio, you must add a runsettings file, and add these settings there to the NUnit section. A detailed explanation of the process can be found in this blog post Debugging earlier versions See this blog post for details on that process."
"keywords": "Debugging the NUnit3TestAdapter Enable Tracing Before debugging the adapter, check the trace outputs, which can be enabled using runsettings, either from a file or the command line. Enable the following features: <DumpXmlTestDiscovery>true</DumpXmlTestDiscovery> <DumpXmlTestResults>true</DumpXmlTestResults> This will create a Dump folder under the executing bin directory, containing one file for each setting. These files include both the input from the testhost and the resulting data returned by the framework/engine. Enabling debugging Debugging the adapter is done by first creating a debug version of the adapter. You can then enable a debug run by passing one of the NUnit debug settings using runsettings. The symbols are: NUnit.DebugExecution NUnit.DebugDiscovery NUnit.Debug The last setting is equal to setting both of the two above. From command line, you can set these by adding dotnet test -- NUnit.DebugExecution=true If you want to do this using Visual Studio, you must add a runsettings file, and add these settings there to the NUnit section. A detailed explanation of the process can be found in this blog post Debugging earlier versions See this blog post for details on that process."
},
"articles/vs-test-adapter/Index.html": {
"href": "articles/vs-test-adapter/Index.html",
Expand Down
Loading

0 comments on commit 9863165

Please sign in to comment.