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">&lt=3B<a href=3D"mailto:[email protected]">rie=
[email protected]</a>&gt=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>&gt=3BI'll modify my version=2C and keep an ey=
e out for this feature in an ulterior<br>&gt=3Bversion then!<br>&gt=3BThank=
 you very much for the info.<br>&gt=3B<br>&gt=3Bjoce.<br>&gt=3B<br>&gt=3BOn=
 Tue=2C Sep 9=2C 2008 at 7:47 PM=2C Charlie Poole<br>
&gt=3B&lt=3Bcharlie@po...&gt=3Bwrote:<br>&gt=3B<br>&gt=3B&gt=3B Hi=2C<br>&g=
t=3B&gt=3B<br>&gt=3B&gt=3B When you run as a post-build step=2C you are not=
 running "in debug mode under<br>&gt=3B&gt=3B Visual Studio"<br>&gt=3B&gt=
=3B<br>&gt=3B&gt=3B Many folks have independently come up with this way to =
integrate NUnit into<br>
&gt=3B&gt=3B VS=2C but it's<br>&gt=3B&gt=3B not how the NUnit developers pi=
ctured running NUnit under VS=2C so it<br>&gt=3B&gt=3B doesn't work as<br>&=
gt=3B&gt=3B smoothly as it could.<br>&gt=3B&gt=3B<br>&gt=3B&gt=3B You can o=
f course continue to run that way=2C but without the line formatting<br>
&gt=3B&gt=3B you would<br>&gt=3B&gt=3B like to see=2C or you can set up nun=
it-console as the debug application and<br>&gt=3B&gt=3B use the<br>&gt=3B&g=
t=3B trace output=2C which is formatted as you want.<br>&gt=3B&gt=3B<br>&gt=
=3B&gt=3B Modifying the normal console output so that it can be used effect=
ively in<br>
&gt=3B&gt=3B the way you<br>&gt=3B&gt=3B describe has been requested as a f=
eature and will be included in a future<br>&gt=3B&gt=3B release.<br>&gt=3B&=
gt=3B<br>&gt=3B&gt=3B Charlie<br>&gt=3B&gt=3B<br>&gt=3B&gt=3B -------------=
-----------------<br>&gt=3B&gt=3B *From:* nunit-users-bounces@li... [mailto=
:<br>
&gt=3B&gt=3B nunit-users-bounces@li...] *On Behalf Of *Jocelyn Legault<br>&=
gt=3B&gt=3B *Sent:* Tuesday=2C September 09=2C 2008 6:30 PM<br>&gt=3B&gt=3B=
 *To:* nunit-users@li...<br>&gt=3B&gt=3B *Subject:* Re: [Nunit-users] Conso=
le output format and Visual Studio<br>
&gt=3B&gt=3B (2005)<br>&gt=3B&gt=3B<br>&gt=3B&gt=3B Anyone?<br>&gt=3B&gt=3B=
<br>&gt=3B&gt=3B On Mon=2C Sep 8=2C 2008 at 10:01 PM=2C Jocelyn Legault &lt=
=3Bjocelynlegault@gm...<br>&gt=3B&gt=3B &gt=3B wrote:<br>&gt=3B&gt=3B<br>&g=
t=3B&gt=3B&gt=3B Hello.<br>&gt=3B&gt=3B&gt=3B<br>
&gt=3B&gt=3B&gt=3B I'm new to NUnit (and to C# in general). I'm currently t=
rying to<br>&gt=3B&gt=3B&gt=3B integrate NUnit with my project=2C using it =
as a post-build step to run the<br>&gt=3B&gt=3B&gt=3B tests.<br>&gt=3B&gt=
=3B&gt=3B<br>&gt=3B&gt=3B&gt=3B From the local documentation file<br>
&gt=3B&gt=3B&gt=3B file:///C:/Program%20Files/NUnit%202.4.7/doc/vsSupport.h=
tml (also on the web<br>&gt=3B&gt=3B&gt=3B at <a href=3D"http://www.nunit.o=
rg/index.php?p=3DvsSupport&amp=3Br=3D2.2">http://www.nunit.org/index.php?p=
=3DvsSupport&amp=3Br=3D2.2</a>)=2C it is stated that:<br>
&gt=3B&gt=3B&gt=3B<br>&gt=3B&gt=3B&gt=3B *When the nunit-console program is=
 run in debug mode under Visual Studio=2C<br>&gt=3B&gt=3B&gt=3B&gt=3B it de=
tects that it is running in this mode and sends output to the Visual<br>&gt=
=3B&gt=3B&gt=3B&gt=3B Studio output window. Output is formatted so that dou=
ble clicking any error<br>
&gt=3B&gt=3B&gt=3B&gt=3B or failure entries opens the appropriate test file=
 at the location where the<br>&gt=3B&gt=3B&gt=3B&gt=3B failure was detected=
.*<br>&gt=3B&gt=3B&gt=3B<br>&gt=3B&gt=3B&gt=3B<br>&gt=3B&gt=3B&gt=3B To me=
=2C that means that the output should be such as:<br>
&gt=3B&gt=3B&gt=3B C:\Projects\tests\TestNUnit\TestNUnit\Program.cs(24=2C10=
): error CS1002: =3B<br>&gt=3B&gt=3B&gt=3B expected<br>&gt=3B&gt=3B&gt=3B<b=
r>&gt=3B&gt=3B&gt=3B But instead=2C what I get is:<br>&gt=3B&gt=3B&gt=3B at=
 TestNUnit.MyFirstTest.Test1() in<br>
&gt=3B&gt=3B&gt=3B C:\Projects\tests\TestNUnit\TestNUnit\Program.cs:line 23=
<br>&gt=3B&gt=3B&gt=3B which is sadly not recognized by MSDev.<br>&gt=3B&gt=
=3B&gt=3B<br>&gt=3B&gt=3B&gt=3B FYI=2C the post-build event command line th=
at I use is:<br>&gt=3B&gt=3B&gt=3B "C:\Program Files\NUnit 2.4.7\bin\nunit-=
console.exe" $(ProjectPath)<br>
&gt=3B&gt=3B&gt=3B /nologo<br>&gt=3B&gt=3B&gt=3B<br>&gt=3B&gt=3B Is there s=
ome switch I should use to format the output? I've looked at the<br>&gt=3B&=
gt=3B options and I haven't seen anything that seems to do that.<br>&gt=3B&=
gt=3B<br>&gt=3B&gt=3B Thanks=2C<br>
&gt=3B&gt=3B<br>&gt=3B&gt=3B joce.<br><div class=3D"EC_WgoR0d"><br><hr>Conn=
ect to the next generation of MSN Messenger&nbsp=3B  <a href=3D"http://imag=
ine-msn.com/messenger/launch80/default.aspx?locale=3Den-us&amp=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 &amp=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&amp=3Burl=
=3D/">http://moblin-contest.org/redirect.php?banner_id=3D100&amp=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==--