Re: Console output format and Visual Studio (2005)
"Charlie Poole" <[email protected]> Thu, 27 Nov 2008 21:48:38 -0800
| Newsgroups | gmane.comp.windows.dotnet.nunit.user |
|---|---|
| Message-ID | <007601c9511c$f9144880$6401a8c0@ferrari> |
This is a multi-part message in MIME format. --===============1556271922752403076== Content-Type: multipart/alternative; boundary="----=_NextPart_000_0077_01C950D9.EAF10880" This is a multi-part message in MIME format. ------=_NextPart_000_0077_01C950D9.EAF10880 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Yes, if you want to modify NUnit in a way that *all* its stack traces are VS2005 compatible, you have to change more places. But for this request, it would only need to be modified in EventCollector, provided you want it to work just as the debug code works. BTW, there is a pending request to have NUnit do this for you. Charlie _____ From: Jocelyn Legault [mailto:[email protected]] Sent: Thursday, November 27, 2008 3:44 PM To: riemann tolow Cc: [email protected] Subject: Re: [Nunit-users] Console output format and Visual Studio (2005) It's not a "simple" mod. If I remember correctly, I had to modify 4 or 5 files. I don't have the code with me atm, but if you're interested, I could post the modifications I've made later. On Thu, Nov 27, 2008 at 12:36 PM, riemann tolow <[email protected]> wrote 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 <http://www.nunit.org/index.php?p=vsSupport&r=2.2> &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> ------------------------------------------------------------------------- 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 <http://moblin-contest.org/redirect.php?banner_id=100&url=/> &url=/ _______________________________________________ Nunit-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/nunit-users ------=_NextPart_000_0077_01C950D9.EAF10880 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"> <META content=3D"MSHTML 6.00.6000.16705" name=3DGENERATOR></HEAD> <BODY> <DIV><SPAN class=3D890254505-28112008><FONT face=3DArial color=3D#0000ff = size=3D2>Yes,=20 if you want to modify NUnit in a way that *all* its stack traces are=20 VS2005</FONT></SPAN></DIV> <DIV><SPAN class=3D890254505-28112008><FONT face=3DArial color=3D#0000ff = size=3D2>compatible, you have to change more places. But for this = request, it=20 would</FONT></SPAN></DIV> <DIV><SPAN class=3D890254505-28112008><FONT face=3DArial color=3D#0000ff = size=3D2>only=20 need to be modified in EventCollector, provided you want it to=20 work</FONT></SPAN></DIV> <DIV><SPAN class=3D890254505-28112008><FONT face=3DArial color=3D#0000ff = size=3D2>just=20 as the debug code works.</FONT></SPAN></DIV> <DIV><SPAN class=3D890254505-28112008><FONT face=3DArial color=3D#0000ff = size=3D2></FONT></SPAN> </DIV> <DIV><SPAN class=3D890254505-28112008><FONT face=3DArial color=3D#0000ff = size=3D2>BTW,=20 there is a pending request to have NUnit do this for = you.</FONT></SPAN></DIV> <DIV><SPAN class=3D890254505-28112008><FONT face=3DArial color=3D#0000ff = size=3D2></FONT></SPAN> </DIV> <DIV><SPAN class=3D890254505-28112008><FONT face=3DArial color=3D#0000ff = size=3D2>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 size=3D2><B>From:</B> Jocelyn Legault=20 [mailto:[email protected]] <BR><B>Sent:</B> Thursday, November = 27, 2008=20 3:44 PM<BR><B>To:</B> riemann tolow<BR><B>Cc:</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>It's not a "simple" mod. If I remember correctly, I had to = modify 4=20 or 5 files.<BR>I don't have the code with me atm, but if you're = interested, I=20 could post the modifications I've made later.<BR><BR> <DIV class=3Dgmail_quote>On Thu, Nov 27, 2008 at 12:36 PM, riemann = tolow <SPAN=20 dir=3Dltr><<A=20 href=3D"mailto:[email protected]">[email protected]</A>></SPAN> = wrote<FONT face=3DArial><FONT color=3D#0000ff><FONT size=3D2><SPAN=20 class=3D890254505-28112008> </SPAN></FONT></FONT></FONT></DIV> <DIV class=3Dgmail_quote><FONT face=3DArial><FONT = color=3D#0000ff><FONT size=3D2><SPAN=20 class=3D890254505-28112008></SPAN></FONT></FONT></FONT> </DIV> <DIV class=3Dgmail_quote><FONT face=3DArial><FONT = color=3D#0000ff><FONT size=3D2><SPAN=20 = class=3D890254505-28112008> </SPAN></FONT></FONT></FONT>Hi,<BR><BR>I= am=20 interested to now where and what modification must be made to get this = feature=20 working.<BR><BR>I found the place where NUnit format the exception = stack under=20 debug mode (EvenCollector) But couldn't find where is formats the = exception=20 stack trace for the console = ouput.<BR><BR>thanks<BR>rmn<BR><BR><BR>>I'll=20 modify my version, and keep an eye out for this feature in an=20 ulterior<BR>>version then!<BR>>Thank you very much for the=20 info.<BR>><BR>>joce.<BR>><BR>>On Tue, Sep 9, 2008 at 7:47 = PM,=20 Charlie 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 <A=20 href=3D"http://www.nunit.org/index.php?p=3DvsSupport&r=3D2.2"=20 = target=3D_blank>http://www.nunit.org/index.php?p=3DvsSupport&r=3D2.2<= /A>), it is=20 stated that:<BR>>>><BR>>>> *When the nunit-console = program=20 is run in debug mode under Visual Studio,<BR>>>>> it = detects that=20 it is running in this mode and sends output to the = Visual<BR>>>>>=20 Studio output window. Output is formatted so that double clicking any=20 error<BR>>>>> or failure entries opens the appropriate = test file=20 at the location where the<BR>>>>> failure was=20 detected.*<BR>>>><BR>>>><BR>>>> To me, that = means=20 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></DIV> <BLOCKQUOTE class=3Dgmail_quote=20 style=3D"PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: = rgb(204,204,204) 1px solid"> <DIV> <DIV class=3DWgoR0d><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_blank>Get it now!=20 = </A></DIV></DIV><BR>-----------------------------------------------------= --------------------<BR>This=20 SF.Net email is sponsored by the Moblin Your Move Developer's=20 challenge<BR>Build the coolest Linux based applications with Moblin = SDK=20 & win great prizes<BR>Grand prize is a trip for two to an Open = Source=20 event anywhere in the world<BR><A=20 = href=3D"http://moblin-contest.org/redirect.php?banner_id=3D100&url=3D= /"=20 = target=3D_blank>http://moblin-contest.org/redirect.php?banner_id=3D100&am= p;url=3D/</A><BR>_______________________________________________<BR>Nunit= -users=20 mailing list<BR><A=20 = href=3D"mailto:[email protected]">[email protected]= eforge.net</A><BR><A=20 href=3D"https://lists.sourceforge.net/lists/listinfo/nunit-users"=20 = target=3D_blank>https://lists.sourceforge.net/lists/listinfo/nunit-users<= /A><BR><BR></BLOCKQUOTE><BR></BLOCKQUOTE></BODY></HTML> ------=_NextPart_000_0077_01C950D9.EAF10880-- --===============1556271922752403076== 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=/ --===============1556271922752403076== 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 --===============1556271922752403076==--