Re: Console output format and Visual Studio (2005)
"Jocelyn Legault" <[email protected]> Tue, 9 Sep 2008 23:13:55 -0600
| Newsgroups | gmane.comp.windows.dotnet.nunit.user |
|---|---|
| Message-ID | <[email protected]> |
--===============1567607672== Content-Type: multipart/alternative; boundary="----=_Part_122_10882838.1221023635232" ------=_Part_122_10882838.1221023635232 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline I'll modify my version, and keep an eye out for this feature in an ulterior version then! Thank you very much for the info. joce. On Tue, Sep 9, 2008 at 7:47 PM, Charlie Poole <[email protected]>wrote: > Hi, > > When you run as a post-build step, you are not running "in debug mode under > Visual Studio" > > Many folks have independently come up with this way to integrate NUnit into > VS, but it's > not how the NUnit developers pictured running NUnit under VS, so it > doesn't work as > smoothly as it could. > > You can of course continue to run that way, but without the line formatting > you would > like to see, or you can set up nunit-console as the debug application and > use the > trace output, which is formatted as you want. > > Modifying the normal console output so that it can be used effectively in > the way you > describe has been requested as a feature and will be included in a future > release. > > Charlie > > ------------------------------ > *From:* [email protected] [mailto: > [email protected]] *On Behalf Of *Jocelyn Legault > *Sent:* Tuesday, September 09, 2008 6:30 PM > *To:* [email protected] > *Subject:* Re: [Nunit-users] Console output format and Visual Studio > (2005) > > Anyone? > > On Mon, Sep 8, 2008 at 10:01 PM, Jocelyn Legault <[email protected] > > wrote: > >> Hello. >> >> I'm new to NUnit (and to C# in general). I'm currently trying to >> integrate NUnit with my project, using it as a post-build step to run the >> tests. >> >> From the local documentation file >> file:///C:/Program%20Files/NUnit%202.4.7/doc/vsSupport.html (also on the web >> at http://www.nunit.org/index.php?p=vsSupport&r=2.2), it is stated that: >> >> *When the nunit-console program is run in debug mode under Visual Studio, >>> it detects that it is running in this mode and sends output to the Visual >>> Studio output window. Output is formatted so that double clicking any error >>> or failure entries opens the appropriate test file at the location where the >>> failure was detected.* >> >> >> To me, that means that the output should be such as: >> C:\Projects\tests\TestNUnit\TestNUnit\Program.cs(24,10): error CS1002: ; >> expected >> >> But instead, what I get is: >> at TestNUnit.MyFirstTest.Test1() in >> C:\Projects\tests\TestNUnit\TestNUnit\Program.cs:line 23 >> which is sadly not recognized by MSDev. >> >> FYI, the post-build event command line that I use is: >> "C:\Program Files\NUnit 2.4.7\bin\nunit-console.exe" $(ProjectPath) >> /nologo >> >> Is there some switch I should use to format the output? I've looked at the >> options and I haven't seen anything that seems to do that. >> >> Thanks, >> >> joce. >> > > ------=_Part_122_10882838.1221023635232 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline <div dir="ltr">I'll modify my version, and keep an eye out for this feature in an ulterior version then!<br>Thank you very much for the info.<br> <br>joce.<br><br><div class="gmail_quote">On Tue, Sep 9, 2008 at 7:47 PM, Charlie Poole <span dir="ltr"><<a href="mailto:[email protected]">[email protected]</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> <div> <div><span><font color="#0000ff" size="2" face="Arial">Hi,</font></span></div> <div><span><font color="#0000ff" size="2" face="Arial"></font></span> </div> <div><span><font color="#0000ff" size="2" face="Arial">When you run as a post-build step, you are not running "in debug mode under Visual Studio"</font></span></div> <div><span><font color="#0000ff" size="2" face="Arial"></font></span> </div> <div><span><font color="#0000ff" size="2" face="Arial">Many folks have independently come up with this way to integrate NUnit into VS, but it's</font></span></div> <div><span><font color="#0000ff" size="2" face="Arial">not how the</font></span><span><font color="#0000ff" size="2" face="Arial"> NUnit developers pictured running NUnit under VS, so it doesn't work as</font></span></div> <div><span><font color="#0000ff" size="2" face="Arial">smoothly as it could.</font></span></div> <div><span><font color="#0000ff" size="2" face="Arial"></font></span> </div> <div><span><font color="#0000ff" size="2" face="Arial">You can of course continue to run that way, but without the line formatting you would</font></span></div> <div><span><font color="#0000ff" size="2" face="Arial">like to see, or you can set up nunit-console as the debug application and use the </font></span></div> <div><span><font color="#0000ff" size="2" face="Arial">trace output, which is formatted as you want.</font></span></div> <div><span><font color="#0000ff" size="2" face="Arial"></font></span> </div> <div><span><font color="#0000ff" size="2" face="Arial">Modifying the normal console output so that it can be used effectively in the way you</font></span></div> <div><span><font color="#0000ff" size="2" face="Arial">describe has </font></span><span><font color="#0000ff" size="2" face="Arial">been requested as a feature and will be included in a future release.</font></span></div> <div><span><font color="#0000ff" size="2" face="Arial"></font></span> </div> <div><span><font color="#0000ff" size="2" face="Arial">Charlie</font></span></div><br> <blockquote dir="ltr" style="border-left: 2px solid rgb(0, 0, 255); padding-left: 5px; margin-left: 5px; margin-right: 0px;"> <div dir="ltr" align="left" lang="en-us"> <hr> <font size="2" face="Tahoma"><b>From:</b> <a href="mailto:[email protected]" target="_blank">[email protected]</a> [mailto:<a href="mailto:[email protected]" target="_blank">[email protected]</a>] <b>On Behalf Of </b>Jocelyn Legault<br><b>Sent:</b> Tuesday, September 09, 2008 6:30 PM<br><b>To:</b> <a href="mailto:[email protected]" target="_blank">[email protected]</a><br><b>Subject:</b> Re: [Nunit-users] Console output format and Visual Studio (2005)<br></font><br></div><div><div></div><div class="Wj3C7c"> <div></div> <div dir="ltr">Anyone?<br><br> <div class="gmail_quote">On Mon, Sep 8, 2008 at 10:01 PM, Jocelyn Legault <span dir="ltr"><<a href="mailto:[email protected]" target="_blank">[email protected]</a>></span> wrote:<br> <blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> <div dir="ltr">Hello.<br><br>I'm new to NUnit (and to C# in general). I'm currently trying to integrate NUnit with my project, using it as a post-build step to run the tests.<br><br>From the local documentation file file:///C:/Program%20Files/NUnit%202.4.7/doc/vsSupport.html (also on the web at <a href="http://www.nunit.org/index.php?p=vsSupport&r=2.2" target="_blank">http://www.nunit.org/index.php?p=vsSupport&r=2.2</a>), it is stated that:<br><br> <blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><i>When the nunit-console program is run in debug mode under Visual Studio, it detects that it is running in this mode and sends output to the Visual Studio output window. Output is formatted so that double clicking any error or failure entries opens the appropriate test file at the location where the failure was detected.</i></blockquote> <div><br>To me, that means that the output should be such as: <br><font face="courier new,monospace">C:\Projects\tests\TestNUnit\TestNUnit\Program.cs(24,10): error CS1002: ; expected<br><font face="arial,helvetica,sans-serif"><br>But instead, what I get is:<br><span style="font-family: courier new,monospace;">at TestNUnit.MyFirstTest.Test1() in C:\Projects\tests\TestNUnit\TestNUnit\Program.cs:line 23</span><br style="font-family: courier new,monospace;">which is sadly not recognized by MSDev.<br><br>FYI, the post-build event command line that I use is: <br>"C:\Program Files\NUnit 2.4.7\bin\nunit-console.exe" $(ProjectPath) /nologo <br><br></font></font><font face="courier new,monospace"><font face="arial,helvetica,sans-serif">Is there some switch I should use to format the output? I've looked at the options and I haven't seen anything that seems to do that.<br></font></font><br><font face="courier new,monospace"><font face="arial,helvetica,sans-serif">Thanks,<br><br>joce.<br></font></font></div></div></blockquote></div><br></div></div></div></blockquote> </div> </blockquote></div><br></div> ------=_Part_122_10882838.1221023635232-- --===============1567607672== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ --===============1567607672== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Nunit-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/nunit-users --===============1567607672==--