Re: Console output format and Visual Studio (2005)
"Charlie Poole" <[email protected]> Thu, 27 Nov 2008 15:49:39 -0800
| Newsgroups | gmane.comp.windows.dotnet.nunit.user |
|---|---|
| Message-ID | <003c01c950ea$d19fcd10$6401a8c0@ferrari> |
This is a multi-part message in MIME format. --===============7527769134649331516== Content-Type: multipart/alternative; boundary="----=_NextPart_000_003D_01C950A7.C37C8D10" This is a multi-part message in MIME format. ------=_NextPart_000_003D_01C950A7.C37C8D10 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit You would have to modify EventCollector in the nunit-console project so that it wrote out to console the same strings it currently writes to debug. Charlie _____ From: riemann tolow [mailto:[email protected]] Sent: Thursday, November 27, 2008 11:37 AM To: [email protected] Subject: Re: [Nunit-users] Console output format and Visual Studio (2005) Hi, I am interested to now where and what modification must be made to get this feature working. I found the place where NUnit format the exception stack under debug mode (EvenCollector) But couldn't find where is formats the exception stack trace for the console ouput. thanks rmn >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 ><charlie@po...>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:* nunit-users-bounces@li... [mailto: >> nunit-users-bounces@li...] *On Behalf Of *Jocelyn Legault >> *Sent:* Tuesday, September 09, 2008 6:30 PM >> *To:* nunit-users@li... >> *Subject:* Re: [Nunit-users] Console output format and Visual Studio >> (2005) >> >> Anyone? >> >> On Mon, Sep 8, 2008 at 10:01 PM, Jocelyn Legault <jocelynlegault@gm... >> > 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. _____ Connect to the next generation of MSN Messenger Get it now! <http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-us&source= wlmailtagline> ------=_NextPart_000_003D_01C950A7.C37C8D10 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=3DContent-Type content=3D"text/html; = charset=3Dus-ascii"> <STYLE>.hmmessage P { PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: = 0px; PADDING-TOP: 0px } BODY.hmmessage { FONT-SIZE: 10pt; FONT-FAMILY: Verdana } </STYLE> <META content=3D"MSHTML 6.00.6000.16705" name=3DGENERATOR></HEAD> <BODY class=3Dhmmessage> <DIV><SPAN class=3D343524723-27112008><FONT face=3DArial = color=3D#0000ff>You would=20 have to modify EventCollector in the nunit-console project so that it = wrote out=20 to</FONT></SPAN></DIV> <DIV><SPAN class=3D343524723-27112008><FONT face=3DArial = color=3D#0000ff>console the=20 same strings it currently writes to debug.</FONT></SPAN></DIV> <DIV><SPAN class=3D343524723-27112008><FONT face=3DArial=20 color=3D#0000ff></FONT></SPAN> </DIV> <DIV><SPAN class=3D343524723-27112008><FONT face=3DArial=20 color=3D#0000ff>Charlie</FONT></SPAN></DIV><BR> <BLOCKQUOTE=20 style=3D"PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px = solid; MARGIN-RIGHT: 0px"> <DIV class=3DOutlookMessageHeader lang=3Den-us dir=3Dltr align=3Dleft> <HR tabIndex=3D-1> <FONT face=3DTahoma><B>From:</B> riemann tolow = [mailto:[email protected]]=20 <BR><B>Sent:</B> Thursday, November 27, 2008 11:37 AM<BR><B>To:</B>=20 [email protected]<BR><B>Subject:</B> Re: [Nunit-users] = Console=20 output format and Visual Studio (2005)<BR></FONT><BR></DIV> <DIV></DIV>Hi,<BR><BR>I am interested to now where and what = modification must=20 be made to get this feature working.<BR><BR>I found the place where = NUnit=20 format the exception stack under debug mode (EvenCollector) But = couldn't find=20 where is formats the exception stack trace for the console=20 ouput.<BR><BR>thanks<BR>rmn<BR><BR><BR>>I'll modify my version, and = keep an=20 eye out for this feature in an ulterior<BR>>version = then!<BR>>Thank you=20 very much for the info.<BR>><BR>>joce.<BR>><BR>>On Tue, = Sep 9,=20 2008 at 7:47 PM, Charlie=20 Poole<BR>><charlie@po...>wrote:<BR>><BR>>>=20 Hi,<BR>>><BR>>> When you run as a post-build step, you are = not=20 running "in debug mode under<BR>>> Visual=20 Studio"<BR>>><BR>>> Many folks have independently come up = with=20 this way to integrate NUnit into<BR>>> VS, but it's<BR>>> = not how=20 the NUnit developers pictured running NUnit under VS, so = it<BR>>>=20 doesn't work as<BR>>> smoothly as it = could.<BR>>><BR>>> You=20 can of course continue to run that way, but without the line=20 formatting<BR>>> you would<BR>>> like to see, or you can = set up=20 nunit-console as the debug application and<BR>>> use = the<BR>>>=20 trace output, which is formatted as you want.<BR>>><BR>>>=20 Modifying the normal console output so that it can be used effectively = in<BR>>> the way you<BR>>> describe has been requested as = a=20 feature and will be included in a future<BR>>>=20 release.<BR>>><BR>>> Charlie<BR>>><BR>>>=20 ------------------------------<BR>>> *From:* = nunit-users-bounces@li...=20 [mailto:<BR>>> nunit-users-bounces@li...] *On Behalf Of *Jocelyn = Legault<BR>>> *Sent:* Tuesday, September 09, 2008 6:30 = PM<BR>>>=20 *To:* nunit-users@li...<BR>>> *Subject:* Re: [Nunit-users] = Console=20 output format and Visual Studio<BR>>> = (2005)<BR>>><BR>>>=20 Anyone?<BR>>><BR>>> On Mon, Sep 8, 2008 at 10:01 PM, = Jocelyn=20 Legault <jocelynlegault@gm...<BR>>> >=20 wrote:<BR>>><BR>>>> = Hello.<BR>>>><BR>>>> I'm=20 new to NUnit (and to C# in general). I'm currently trying = to<BR>>>>=20 integrate NUnit with my project, using it as a post-build step to run=20 the<BR>>>> tests.<BR>>>><BR>>>> From the = local=20 documentation file<BR>>>>=20 file:///C:/Program%20Files/NUnit%202.4.7/doc/vsSupport.html (also on = the=20 web<BR>>>> at = http://www.nunit.org/index.php?p=3DvsSupport&r=3D2.2),=20 it is stated that:<BR>>>><BR>>>> *When the = nunit-console=20 program is run in debug mode under Visual Studio,<BR>>>>> = it=20 detects that it is running in this mode and sends output to the=20 Visual<BR>>>>> Studio output window. Output is formatted = so that=20 double clicking any error<BR>>>>> or failure entries opens = the=20 appropriate test file at the location where the<BR>>>>> = failure=20 was detected.*<BR>>>><BR>>>><BR>>>> To me, = that=20 means that the output should be such as:<BR>>>>=20 C:\Projects\tests\TestNUnit\TestNUnit\Program.cs(24,10): error CS1002: = ;<BR>>>> expected<BR>>>><BR>>>> But = instead, what I=20 get is:<BR>>>> at TestNUnit.MyFirstTest.Test1() = in<BR>>>>=20 C:\Projects\tests\TestNUnit\TestNUnit\Program.cs:line = 23<BR>>>> which=20 is sadly not recognized by MSDev.<BR>>>><BR>>>> FYI, = the=20 post-build event command line that I use is:<BR>>>> = "C:\Program=20 Files\NUnit 2.4.7\bin\nunit-console.exe" = $(ProjectPath)<BR>>>>=20 /nologo<BR>>>><BR>>> Is there some switch I should use = to=20 format the output? I've looked at the<BR>>> options and I = haven't seen=20 anything that seems to do that.<BR>>><BR>>>=20 Thanks,<BR>>><BR>>> joce.<BR><BR> <HR> Connect to the next generation of MSN Messenger <A=20 = href=3D"http://imagine-msn.com/messenger/launch80/default.aspx?locale=3De= n-us&source=3Dwlmailtagline"=20 target=3D_new>Get it now! </A></BLOCKQUOTE></BODY></HTML> ------=_NextPart_000_003D_01C950A7.C37C8D10-- --===============7527769134649331516== 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=/ --===============7527769134649331516== 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 --===============7527769134649331516==--