How do I get the Output window in Unit by fxs21421

VIEWS: 58 PAGES: 13

									How do I get the Output window in Unit...


          Buddy Stein 5 posts since
Mar 22, 2008
When using Resharper to run unit testing with MBUnit, if I do a
Console.Out.WriteLine(item);

from within my test, I don't get any console output to the Resharper Unit Test window. Is
there a way to config this?



Thanks, I love ReSharper!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Buddy Stein



example

============================

   Test

      public void ShortCountList_TESTNAME()

      {

           ShortCount sc = new ShortCount();

           List 0);



           foreach (string item in myList)

           {



               Console.Out.WriteLine(item);



Generated by Clearspace on 2010-01-14+03:00
                                                                                            1
How do I get the Output window in Unit...


          }

Tags: unit, test, test, mbunit, runner


         Ilya Ryzhenkov 2,579 posts since
Apr 13, 2004 1. Re: How do I get the Output window in Unit test explorer Mar 22, 2008 11:32 AM

Hello,



On toolbar, find "Show output" button. You can select docking style too,

bottom or right.



Sincerely,

Ilya Ryzhenkov



JetBrains, Inc

http://www.jetbrains.com

"Develop with pleasure!"




IR> When using Resharper to run unit testing with MBUnit, if I do a

IR> Console.Out.WriteLine(item); from within my test, I don't get any

IR> console output to the Resharper Unit Test window. Is there a way to

IR> config this?

IR>

IR> Thanks, I love ReSharper!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Buddy



Generated by Clearspace on 2010-01-14+03:00
                                                                                                 2
How do I get the Output window in Unit...


IR> Stein

IR>

IR> example

IR> ============================

IR> Test

IR> public void ShortCountList_TESTNAME()

IR> {

IR> ShortCount sc = new ShortCount();

IR> List }




         Buddy Stein 5 posts since
Mar 22, 2008 2. Re: How do I get the Output window in Unit test explorer Mar 22, 2008 6:00 PM

Illya,



See attached screen cap. I'm showing the Resharper Output window on bottom, but my
console output doesn't go to the window. This happens in both VS 2005 and VS2008 with
Resharper 3.1 Full.



Code snip, below, just trying to write a little output loop




Generated by Clearspace on 2010-01-14+03:00
                                                                                                3
How do I get the Output window in Unit...


RowTest

[Row ("805CB0651CFA4943949673C357A16B75", true)]

[Row ("A681EF69788B43DB8263D1CBB31C4E02", true)]

public void Returns_If_Valid_Subscription(string SubscriptionID, bool expected)

      {



          FileHelpers fh = new FileHelpers();



          Assert.AreEqual(fh.IsValidSubscriberID(SubscriptionID), expected);



          for (int k=0; k < 100; k++)

          {

              Console.Out.WriteLine("Race " + k.ToString());



          }



      }

Attachments:
      •
          unit test with output window.jpg (32.5 K)




         Ilya Ryzhenkov 2,579 posts since
Apr 13, 2004 3. Re: How do I get the Output window in Unit test explorer Mar 22, 2008 7:41 PM

Hello,




Generated by Clearspace on 2010-01-14+03:00
                                                                                                4
How do I get the Output window in Unit...




It looks like you are using mbUnit, and it is responsibility of unit testing

plugin to report console output to ReSharper.



Albert, are you reading?



Sincerely,

Ilya Ryzhenkov



JetBrains, Inc

http://www.jetbrains.com

"Develop with pleasure!"




IR> Illya,

IR>

IR> See attached screen cap. I'm showing the Resharper Output window on

IR> bottom, but my console output doesn't go to the window. This

IR> happens in both VS 2005 and VS2008 with Resharper 3.1 Full.

IR>

IR> Code snip, below, just trying to write a little output loop

IR>




Generated by Clearspace on 2010-01-14+03:00
                                                                               5
How do I get the Output window in Unit...


IR> RowTest

IR> [Row ("805CB0651CFA4943949673C357A16B75", true)]

IR> [Row ("A681EF69788B43DB8263D1CBB31C4E02", true)]

IR> public void Returns_If_Valid_Subscription(string SubscriptionID,

IR> bool expected)

IR> {

IR> FileHelpers fh = new FileHelpers();

IR>

IR> Assert.AreEqual(fh.IsValidSubscriberID(SubscriptionID),

IR> expected);

IR>

IR> for (int k=0; k < 100; k++)

IR> {

IR> Console.Out.WriteLine("Race " + k.ToString());

IR> }

IR>

IR> }

IR>




        Guest 4. Re: How do I get the Output window in Unit test explorer Mar 22, 2008 7:41 PM



Generated by Clearspace on 2010-01-14+03:00
                                                                                                 6
How do I get the Output window in Unit...



Yes, the output shoudl be in the window ... i take a look on that.



@Buddy: Are you using MbUnit 2.4 or 3.0 Alpha?



--

Regards



Albert Weinert

MVP Visual Developer ASP.NET



http://www.afterlaunch.de

Die Konferenz zu Visual Studio 2008,

Windows Server 2008 und SQL Server 2008

am 11.04.2008



"Ilya Ryzhenkov" <orangy@jetbrains.com> schrieb im Newsbeitrag

news:76a2bd0b1538938ca5a5f9668fb53@news.intellij.net...

         Hello,

>

         It looks like you are using mbUnit, and it is responsibility of unit

         testing plugin to report console output to ReSharper.

         Albert, are you reading?



Generated by Clearspace on 2010-01-14+03:00
                                                                                7
How do I get the Output window in Unit...


>

         Sincerely,

         Ilya Ryzhenkov

>

         JetBrains, Inc

         http://www.jetbrains.com

         "Develop with pleasure!"




         Buddy Stein 5 posts since
Mar 22, 2008 5. Re: How do I get the Output window in Unit test explorer Mar 23, 2008 5:17 AM

Thanks for pointing me in the right direction. When you mentioned the output was handled
by the Plugin, I downloaded and installed this recent plugin and it works perfectly. The
console output goes to the Resharper Test Runner output window.




http://mbunit-resharper.googlecode.com/files/ReSharper-MbUnit-Beta6.zip




I love ReSharper!!!!! Awesome product,



Thanks




Generated by Clearspace on 2010-01-14+03:00
                                                                                                8
How do I get the Output window in Unit...


Buddy Stein



       Guest 6. Re: How do I get the Output window in Unit test explorer Mar 23, 2008 11:19 AM

Did you manage to get the plugin to work with R# 4.0?



I'm using the mbUnit GUI - I just wish I could double click on a failing

test and be taken to the code ....



Regards

Jeremy



"Buddy Stein" <no_reply@jetbrains.com> wrote in message

news:7161860.19231206238712312.JavaMail.jive@app4.labs.intellij.net...

         Thanks for pointing me in the right direction. When you mentioned the

         output was handled by the Plugin, I downloaded and installed this recent

         plugin and it works perfectly. The console output goes to the Resharper

         Test Runner output window.

>

>

         http://mbunit-resharper.googlecode.com/files/ReSharper-MbUnit-Beta6.zip

>

>

>



Generated by Clearspace on 2010-01-14+03:00
                                                                                                 9
How do I get the Output window in Unit...


          I love ReSharper!!!!! Awesome product,

>

          Thanks

          Buddy Stein




         Buddy Stein 5 posts since
Mar 22, 2008 7. Re: How do I get the Output window in Unit test explorer Mar 23, 2008 5:48 PM

I haven't tried Release 4.0 yet.




Buddy Stein



       Guest 8. Re: How do I get the Output window in Unit test explorer Mar 24, 2008 9:22 PM

Albert,



OK - noted



Thanks

Jeremy



"Buddy Stein" <no_reply@jetbrains.com> wrote in message

news:27196688.20221206283716411.JavaMail.jive@app4.labs.intellij.net...



Generated by Clearspace on 2010-01-14+03:00
                                                                                                10
How do I get the Output window in Unit...


>I haven't tried Release 4.0 yet.

>

>

         Buddy Stein




       Guest 9. Re: How do I get the Output window in Unit test explorer Mar 23, 2008 7:03 PM

"Jeremy Holt" <no_reply@jetbrains.com> schrieb



         Did you manage to get the plugin to work with R# 4.0?



No, currently not, 4.0 is a again a major change on the UTE and it seems

that R# 4 has undergone a great refactoring so that many things are

on other places and a simple compile against the new assemblies is not

possible. So i have to investigate more.



But not yet. Sorry, the Unit Test Explorer from R# will changed more in the

near future so that an adaption of the plug in makes no sense yet.



--

Regards




Generated by Clearspace on 2010-01-14+03:00
                                                                                                11
How do I get the Output window in Unit...


Albert Weinert

MVP Visual Developer ASP.NET



http://www.afterlaunch.de

Die Konferenz zu Visual Studio 2008,

Windows Server 2008 und SQL Server 2008

am 11.04.2008




       Guest 10. Re: How do I get the Output window in Unit test explorer Mar 24, 2008 2:59 PM

"Jeremy Holt" <no_reply@jetbrains.com> schrieb im Newsbeitrag

news:fs53qv$mqu$1@is.intellij.net...



         Did you manage to get the plugin to work with R# 4.0?

>

         I'm using the mbUnit GUI - I just wish I could double click on a failing

         test and be taken to the code ....



http://code.google.com/p/mbunit-resharper/downloads/list



Beta 7 runs on R# 4.0 (compiled against 476)




Generated by Clearspace on 2010-01-14+03:00
                                                                                                 12
How do I get the Output window in Unit...


it's only i quick port, no new features or bugs fixed ... maybe intruced


some new/old bugs



So, spread the word!

--

Regards



Albert Weinert

MVP Visual Developer ASP.NET



http://www.afterlaunch.de

Die Konferenz zu Visual Studio 2008,

Windows Server 2008 und SQL Server 2008

am 11.04.2008




Generated by Clearspace on 2010-01-14+03:00
                                                                           13

								
To top