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>&nbsp;</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>&gt;I'll modify my version, and =
keep an=20
  eye out for this feature in an ulterior<BR>&gt;version =
then!<BR>&gt;Thank you=20
  very much for the info.<BR>&gt;<BR>&gt;joce.<BR>&gt;<BR>&gt;On Tue, =
Sep 9,=20
  2008 at 7:47 PM, Charlie=20
  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 =
http://www.nunit.org/index.php?p=3DvsSupport&amp;r=3D2.2),=20
  it is stated that:<BR>&gt;&gt;&gt;<BR>&gt;&gt;&gt; *When the =
nunit-console=20
  program is run in debug mode under Visual Studio,<BR>&gt;&gt;&gt;&gt; =
it=20
  detects that it is running in this mode and sends output to the=20
  Visual<BR>&gt;&gt;&gt;&gt; Studio output window. Output is formatted =
so that=20
  double clicking any error<BR>&gt;&gt;&gt;&gt; or failure entries opens =
the=20
  appropriate test file at the location where the<BR>&gt;&gt;&gt;&gt; =
failure=20
  was detected.*<BR>&gt;&gt;&gt;<BR>&gt;&gt;&gt;<BR>&gt;&gt;&gt; To me, =
that=20
  means 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><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_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==--