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>&nbsp;</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>&nbsp;</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>&lt;<A=20
  href=3D"mailto:[email protected]">[email protected]</A>&gt;</SPAN> =

  wrote<FONT face=3DArial><FONT color=3D#0000ff><FONT size=3D2><SPAN=20
  class=3D890254505-28112008>&nbsp;</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>&nbsp;</DIV>
  <DIV class=3Dgmail_quote><FONT face=3DArial><FONT =
color=3D#0000ff><FONT size=3D2><SPAN=20
  =
class=3D890254505-28112008>&nbsp;</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>&gt;I'll=20
  modify my version, and keep an eye out for this feature in an=20
  ulterior<BR>&gt;version then!<BR>&gt;Thank you very much for the=20
  info.<BR>&gt;<BR>&gt;joce.<BR>&gt;<BR>&gt;On Tue, Sep 9, 2008 at 7:47 =
PM,=20
  Charlie Poole<BR>&gt;&lt;charlie@po...&gt;wrote:<BR>&gt;<BR>&gt;&gt;=20
  Hi,<BR>&gt;&gt;<BR>&gt;&gt; When you run as a post-build step, you are =
not=20
  running "in debug mode under<BR>&gt;&gt; Visual=20
  Studio"<BR>&gt;&gt;<BR>&gt;&gt; Many folks have independently come up =
with=20
  this way to integrate NUnit into<BR>&gt;&gt; VS, but it's<BR>&gt;&gt; =
not how=20
  the NUnit developers pictured running NUnit under VS, so =
it<BR>&gt;&gt;=20
  doesn't work as<BR>&gt;&gt; smoothly as it =
could.<BR>&gt;&gt;<BR>&gt;&gt; You=20
  can of course continue to run that way, but without the line=20
  formatting<BR>&gt;&gt; you would<BR>&gt;&gt; like to see, or you can =
set up=20
  nunit-console as the debug application and<BR>&gt;&gt; use =
the<BR>&gt;&gt;=20
  trace output, which is formatted as you want.<BR>&gt;&gt;<BR>&gt;&gt;=20
  Modifying the normal console output so that it can be used effectively =

  in<BR>&gt;&gt; the way you<BR>&gt;&gt; describe has been requested as =
a=20
  feature and will be included in a future<BR>&gt;&gt;=20
  release.<BR>&gt;&gt;<BR>&gt;&gt; Charlie<BR>&gt;&gt;<BR>&gt;&gt;=20
  ------------------------------<BR>&gt;&gt; *From:* =
nunit-users-bounces@li...=20
  [mailto:<BR>&gt;&gt; nunit-users-bounces@li...] *On Behalf Of *Jocelyn =

  Legault<BR>&gt;&gt; *Sent:* Tuesday, September 09, 2008 6:30 =
PM<BR>&gt;&gt;=20
  *To:* nunit-users@li...<BR>&gt;&gt; *Subject:* Re: [Nunit-users] =
Console=20
  output format and Visual Studio<BR>&gt;&gt; =
(2005)<BR>&gt;&gt;<BR>&gt;&gt;=20
  Anyone?<BR>&gt;&gt;<BR>&gt;&gt; On Mon, Sep 8, 2008 at 10:01 PM, =
Jocelyn=20
  Legault &lt;jocelynlegault@gm...<BR>&gt;&gt; &gt;=20
  wrote:<BR>&gt;&gt;<BR>&gt;&gt;&gt; =
Hello.<BR>&gt;&gt;&gt;<BR>&gt;&gt;&gt; I'm=20
  new to NUnit (and to C# in general). I'm currently trying =
to<BR>&gt;&gt;&gt;=20
  integrate NUnit with my project, using it as a post-build step to run=20
  the<BR>&gt;&gt;&gt; tests.<BR>&gt;&gt;&gt;<BR>&gt;&gt;&gt; From the =
local=20
  documentation file<BR>&gt;&gt;&gt;=20
  file:///C:/Program%20Files/NUnit%202.4.7/doc/vsSupport.html (also on =
the=20
  web<BR>&gt;&gt;&gt; at <A=20
  href=3D"http://www.nunit.org/index.php?p=3DvsSupport&amp;r=3D2.2"=20
  =
target=3D_blank>http://www.nunit.org/index.php?p=3DvsSupport&amp;r=3D2.2<=
/A>), it is=20
  stated that:<BR>&gt;&gt;&gt;<BR>&gt;&gt;&gt; *When the nunit-console =
program=20
  is run in debug mode under Visual Studio,<BR>&gt;&gt;&gt;&gt; it =
detects that=20
  it is running in this mode and sends output to the =
Visual<BR>&gt;&gt;&gt;&gt;=20
  Studio output window. Output is formatted so that double clicking any=20
  error<BR>&gt;&gt;&gt;&gt; or failure entries opens the appropriate =
test file=20
  at the location where the<BR>&gt;&gt;&gt;&gt; failure was=20
  detected.*<BR>&gt;&gt;&gt;<BR>&gt;&gt;&gt;<BR>&gt;&gt;&gt; To me, that =
means=20
  that the output should be such as:<BR>&gt;&gt;&gt;=20
  C:\Projects\tests\TestNUnit\TestNUnit\Program.cs(24,10): error CS1002: =

  ;<BR>&gt;&gt;&gt; expected<BR>&gt;&gt;&gt;<BR>&gt;&gt;&gt; But =
instead, what I=20
  get is:<BR>&gt;&gt;&gt; at TestNUnit.MyFirstTest.Test1() =
in<BR>&gt;&gt;&gt;=20
  C:\Projects\tests\TestNUnit\TestNUnit\Program.cs:line =
23<BR>&gt;&gt;&gt; which=20
  is sadly not recognized by MSDev.<BR>&gt;&gt;&gt;<BR>&gt;&gt;&gt; FYI, =
the=20
  post-build event command line that I use is:<BR>&gt;&gt;&gt; =
"C:\Program=20
  Files\NUnit 2.4.7\bin\nunit-console.exe" =
$(ProjectPath)<BR>&gt;&gt;&gt;=20
  /nologo<BR>&gt;&gt;&gt;<BR>&gt;&gt; Is there some switch I should use =
to=20
  format the output? I've looked at the<BR>&gt;&gt; options and I =
haven't seen=20
  anything that seems to do that.<BR>&gt;&gt;<BR>&gt;&gt;=20
  Thanks,<BR>&gt;&gt;<BR>&gt;&gt; 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&nbsp; <A=20
    =
href=3D"http://imagine-msn.com/messenger/launch80/default.aspx?locale=3De=
n-us&amp;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
    &amp; 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&amp;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==--