Re: Console output format and Visual Studio (2005)
riemann tolow <[email protected]> Fri, 28 Nov 2008 22:29:00 +0000
| Newsgroups | gmane.comp.windows.dotnet.nunit.user |
|---|---|
| Message-ID | <[email protected]> |
--===============4251139664998944258== Content-Type: multipart/alternative; boundary="_f4fdf7da-83a3-448a-8b4d-08fd710827fc_" --_f4fdf7da-83a3-448a-8b4d-08fd710827fc_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi=2C I "hacked" NUnit.Util.StackTraceFilter to format the message there. It work= s with VS post-build event=2C but it is a hack. I may have broken the debug mode output (as it uses the same function) but = I haven't tested it yet. Charlie=2C how to make the Eventcollector writes to the out console. I can'= t see where it writes to the debug console in the first place :) thanks rmn Date: Thu=2C 27 Nov 2008 16:44:12 -0700 From: [email protected] To: [email protected] Subject: Re: [Nunit-users] Console output format and Visual Studio (2005) CC: [email protected] It's not a "simple" mod. If I remember correctly=2C I had to modify 4 or 5 = files. I don't have the code with me atm=2C but if you're interested=2C I could po= st the modifications I've made later. On Thu=2C Nov 27=2C 2008 at 12:36 PM=2C riemann tolow <[email protected]>= wrote: Hi=2C 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=2C and keep an eye out for this feature in an ulter= ior >version then! >Thank you very much for the info. > >joce. > >On Tue=2C Sep 9=2C 2008 at 7:47 PM=2C Charlie Poole ><charlie@po...>wrote: > >> Hi=2C >> >> When you run as a post-build step=2C you are not running "in debug mode = under >> Visual Studio" >> >> Many folks have independently come up with this way to integrate NUnit i= nto >> VS=2C but it's >> not how the NUnit developers pictured running NUnit under VS=2C so it >> doesn't work as >> smoothly as it could. >> >> You can of course continue to run that way=2C but without the line forma= tting >> you would >> like to see=2C or you can set up nunit-console as the debug application = and >> use the >> trace output=2C which is formatted as you want. >> >> Modifying the normal console output so that it can be used effectively i= n >> the way you >> describe has been requested as a feature and will be included in a futur= e >> release. >> >> Charlie >> >> ------------------------------ >> *From:* nunit-users-bounces@li... [mailto: >> nunit-users-bounces@li...] *On Behalf Of *Jocelyn Legault >> *Sent:* Tuesday=2C September 09=2C 2008 6:30 PM >> *To:* nunit-users@li... >> *Subject:* Re: [Nunit-users] Console output format and Visual Studio >> (2005) >> >> Anyone? >> >> On Mon=2C Sep 8=2C 2008 at 10:01 PM=2C Jocelyn Legault <jocelynlegault@g= m... >> > wrote: >> >>> Hello. >>> >>> I'm new to NUnit (and to C# in general). I'm currently trying to >>> integrate NUnit with my project=2C 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 th= e web >>> at http://www.nunit.org/index.php?p=3DvsSupport&r=3D2.2)=2C it is state= d that: >>> >>> *When the nunit-console program is run in debug mode under Visual Studi= o=2C >>>> it detects that it is running in this mode and sends output to the Vis= ual >>>> Studio output window. Output is formatted so that double clicking any = error >>>> or failure entries opens the appropriate test file at the location whe= re the >>>> failure was detected.* >>> >>> >>> To me=2C that means that the output should be such as: >>> C:\Projects\tests\TestNUnit\TestNUnit\Program.cs(24=2C10): error CS1002= : =3B >>> expected >>> >>> But instead=2C 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=2C 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 t= he >> options and I haven't seen anything that seems to do that. >> >> Thanks=2C >> >> joce. Connect to the next generation of MSN Messenger Get it now!=20 ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challeng= e Build the coolest Linux based applications with Moblin SDK & win great priz= es Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=3D100&url=3D/ _______________________________________________ Nunit-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/nunit-users _________________________________________________________________ Connect to the next generation of MSN Messenger=A0 http://imagine-msn.com/messenger/launch80/default.aspx?locale=3Den-us&sourc= e=3Dwlmailtagline= --_f4fdf7da-83a3-448a-8b4d-08fd710827fc_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <html> <head> <style> .hmmessage P { margin:0px=3B padding:0px } body.hmmessage { font-size: 10pt=3B font-family:Verdana } </style> </head> <body class=3D'hmmessage'> Hi=2C<br><br>I "hacked" NUnit.Util.StackTraceFilter to format the message t= here. It works with VS post-build event=2C but it is a hack.<br>I may have = broken the debug mode output (as it uses the same function) but I haven't t= ested it yet.<br><br>Charlie=2C how to make the Eventcollector writes to th= e out console. I can't see where it writes to the debug console in the firs= t place :)<br><br>thanks<br>rmn<br><br><hr id=3D"stopSpelling">Date: Thu=2C= 27 Nov 2008 16:44:12 -0700<br>From: [email protected]<br>To: rieman= [email protected]<br>Subject: Re: [Nunit-users] Console output format and Visua= l Studio (2005)<br>CC: [email protected]<br><br>It's not a = "simple" mod. If I remember correctly=2C I had to modify 4 or 5 files.<br>I= don't have the code with me atm=2C but if you're interested=2C I could pos= t the modifications I've made later.<br><br> <div class=3D"EC_gmail_quote">On Thu=2C Nov 27=2C 2008 at 12:36 PM=2C riema= nn tolow <span dir=3D"ltr"><=3B<a href=3D"mailto:[email protected]">rie= [email protected]</a>>=3B</span> wrote:<br><blockquote class=3D"EC_gmail_q= uote" style=3D"padding-left: 1ex=3B"> <div> Hi=2C<br><br>I am interested to now where and what modification must be mad= e to get this feature working.<br><br>I found the place where NUnit format = the exception stack under debug mode (EvenCollector) But couldn't find wher= e is formats the exception stack trace for the console ouput.<br> <br>thanks<br>rmn<br><br><br>>=3BI'll modify my version=2C and keep an ey= e out for this feature in an ulterior<br>>=3Bversion then!<br>>=3BThank= you very much for the info.<br>>=3B<br>>=3Bjoce.<br>>=3B<br>>=3BOn= Tue=2C Sep 9=2C 2008 at 7:47 PM=2C Charlie Poole<br> >=3B<=3Bcharlie@po...>=3Bwrote:<br>>=3B<br>>=3B>=3B Hi=2C<br>&g= t=3B>=3B<br>>=3B>=3B When you run as a post-build step=2C you are not= running "in debug mode under<br>>=3B>=3B Visual Studio"<br>>=3B>= =3B<br>>=3B>=3B Many folks have independently come up with this way to = integrate NUnit into<br> >=3B>=3B VS=2C but it's<br>>=3B>=3B not how the NUnit developers pi= ctured running NUnit under VS=2C so it<br>>=3B>=3B doesn't work as<br>&= gt=3B>=3B smoothly as it could.<br>>=3B>=3B<br>>=3B>=3B You can o= f course continue to run that way=2C but without the line formatting<br> >=3B>=3B you would<br>>=3B>=3B like to see=2C or you can set up nun= it-console as the debug application and<br>>=3B>=3B use the<br>>=3B&g= t=3B trace output=2C which is formatted as you want.<br>>=3B>=3B<br>>= =3B>=3B Modifying the normal console output so that it can be used effect= ively in<br> >=3B>=3B the way you<br>>=3B>=3B describe has been requested as a f= eature and will be included in a future<br>>=3B>=3B release.<br>>=3B&= gt=3B<br>>=3B>=3B Charlie<br>>=3B>=3B<br>>=3B>=3B -------------= -----------------<br>>=3B>=3B *From:* nunit-users-bounces@li... [mailto= :<br> >=3B>=3B nunit-users-bounces@li...] *On Behalf Of *Jocelyn Legault<br>&= gt=3B>=3B *Sent:* Tuesday=2C September 09=2C 2008 6:30 PM<br>>=3B>=3B= *To:* nunit-users@li...<br>>=3B>=3B *Subject:* Re: [Nunit-users] Conso= le output format and Visual Studio<br> >=3B>=3B (2005)<br>>=3B>=3B<br>>=3B>=3B Anyone?<br>>=3B>=3B= <br>>=3B>=3B On Mon=2C Sep 8=2C 2008 at 10:01 PM=2C Jocelyn Legault <= =3Bjocelynlegault@gm...<br>>=3B>=3B >=3B wrote:<br>>=3B>=3B<br>&g= t=3B>=3B>=3B Hello.<br>>=3B>=3B>=3B<br> >=3B>=3B>=3B I'm new to NUnit (and to C# in general). I'm currently t= rying to<br>>=3B>=3B>=3B integrate NUnit with my project=2C using it = as a post-build step to run the<br>>=3B>=3B>=3B tests.<br>>=3B>= =3B>=3B<br>>=3B>=3B>=3B From the local documentation file<br> >=3B>=3B>=3B file:///C:/Program%20Files/NUnit%202.4.7/doc/vsSupport.h= tml (also on the web<br>>=3B>=3B>=3B at <a href=3D"http://www.nunit.o= rg/index.php?p=3DvsSupport&=3Br=3D2.2">http://www.nunit.org/index.php?p= =3DvsSupport&=3Br=3D2.2</a>)=2C it is stated that:<br> >=3B>=3B>=3B<br>>=3B>=3B>=3B *When the nunit-console program is= run in debug mode under Visual Studio=2C<br>>=3B>=3B>=3B>=3B it de= tects that it is running in this mode and sends output to the Visual<br>>= =3B>=3B>=3B>=3B Studio output window. Output is formatted so that dou= ble clicking any error<br> >=3B>=3B>=3B>=3B or failure entries opens the appropriate test file= at the location where the<br>>=3B>=3B>=3B>=3B failure was detected= .*<br>>=3B>=3B>=3B<br>>=3B>=3B>=3B<br>>=3B>=3B>=3B To me= =2C that means that the output should be such as:<br> >=3B>=3B>=3B C:\Projects\tests\TestNUnit\TestNUnit\Program.cs(24=2C10= ): error CS1002: =3B<br>>=3B>=3B>=3B expected<br>>=3B>=3B>=3B<b= r>>=3B>=3B>=3B But instead=2C what I get is:<br>>=3B>=3B>=3B at= TestNUnit.MyFirstTest.Test1() in<br> >=3B>=3B>=3B C:\Projects\tests\TestNUnit\TestNUnit\Program.cs:line 23= <br>>=3B>=3B>=3B which is sadly not recognized by MSDev.<br>>=3B>= =3B>=3B<br>>=3B>=3B>=3B FYI=2C the post-build event command line th= at I use is:<br>>=3B>=3B>=3B "C:\Program Files\NUnit 2.4.7\bin\nunit-= console.exe" $(ProjectPath)<br> >=3B>=3B>=3B /nologo<br>>=3B>=3B>=3B<br>>=3B>=3B Is there s= ome switch I should use to format the output? I've looked at the<br>>=3B&= gt=3B options and I haven't seen anything that seems to do that.<br>>=3B&= gt=3B<br>>=3B>=3B Thanks=2C<br> >=3B>=3B<br>>=3B>=3B joce.<br><div class=3D"EC_WgoR0d"><br><hr>Conn= ect to the next generation of MSN Messenger =3B <a href=3D"http://imag= ine-msn.com/messenger/launch80/default.aspx?locale=3Den-us&=3Bsource=3Dw= lmailtagline">Get it now! </a></div> </div> <br>-----------------------------------------------------------------------= --<br> This SF.Net email is sponsored by the Moblin Your Move Developer's challeng= e<br> Build the coolest Linux based applications with Moblin SDK &=3B win grea= t prizes<br> Grand prize is a trip for two to an Open Source event anywhere in the world= <br> <a href=3D"http://moblin-contest.org/redirect.php?banner_id=3D100&=3Burl= =3D/">http://moblin-contest.org/redirect.php?banner_id=3D100&=3Burl=3D/<= /a><br>_______________________________________________<br> Nunit-users mailing list<br> <a href=3D"mailto:[email protected]">[email protected]= ceforge.net</a><br> <a href=3D"https://lists.sourceforge.net/lists/listinfo/nunit-users">https:= //lists.sourceforge.net/lists/listinfo/nunit-users</a><br> <br></blockquote></div><br><br /><hr />Connect to the next generation of MS= N Messenger=A0 <a href=3D'http://imagine-msn.com/messenger/launch80/defaul= t.aspx?locale=3Den-us&source=3Dwlmailtagline' target=3D'_new'>Get it now! <= /a></body> </html>= --_f4fdf7da-83a3-448a-8b4d-08fd710827fc_-- --===============4251139664998944258== 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=/ --===============4251139664998944258== 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 --===============4251139664998944258==--