HighTechTalks DotNet Forums  

Microsoft.VisualStudio.TestTools

Dotnet Framework (Compact Framework) microsoft.public.dotnet.framework.compactframework


Discuss Microsoft.VisualStudio.TestTools in the Dotnet Framework (Compact Framework) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
jrad
 
Posts: n/a

Default Microsoft.VisualStudio.TestTools - 09-28-2009 , 02:15 PM






I have created a .NET cf dll that I use in a WM application.
I have created unit tests for these classes using VS2008.
I would like to create a .NET CF application that someone can run on a
WM device to run these unit tests without needing VS2008.

Is there some sample code that shows how to iterate through the tests
in a unit test library, run them and get the result using
Microsoft.VisualStudio.TestTools assembly?

Thanks,
JR

Reply With Quote
  #2  
Old   
Chris Tacke, MVP
 
Posts: n/a

Default Re: Microsoft.VisualStudio.TestTools - 09-28-2009 , 03:49 PM






I'm not sure what the usefulness of being able to run tests outside of the
dev environment is, but it's pretty simple. Just use refelction to load up
all classes with the TestClass attribute and execute them. An exception
(which is what an assert failure ends up being) is a failure. Of course
doing this you lose any ability to have a TestContext, DeploymentItems, etc.
You also don't get a nice set of reportable testresults.


--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded community
http://community.OpenNETCF.com


"jrad" <joe.radjavitch (AT) gmail (DOT) com> wrote

Quote:
I have created a .NET cf dll that I use in a WM application.
I have created unit tests for these classes using VS2008.
I would like to create a .NET CF application that someone can run on a
WM device to run these unit tests without needing VS2008.

Is there some sample code that shows how to iterate through the tests
in a unit test library, run them and get the result using
Microsoft.VisualStudio.TestTools assembly?

Thanks,
JR

Reply With Quote
  #3  
Old   
Simon Hart [MVP]
 
Posts: n/a

Default Re: Microsoft.VisualStudio.TestTools - 10-04-2009 , 10:21 AM



You also wouldn't get code coverage report. Very pointless activity if you
ask me.
--
Simon Hart
Visual Developer - Device Application Development MVP
http://www.simonrhart.com

"jrad" <joe.radjavitch (AT) gmail (DOT) com> wrote

Quote:
I have created a .NET cf dll that I use in a WM application.
I have created unit tests for these classes using VS2008.
I would like to create a .NET CF application that someone can run on a
WM device to run these unit tests without needing VS2008.

Is there some sample code that shows how to iterate through the tests
in a unit test library, run them and get the result using
Microsoft.VisualStudio.TestTools assembly?

Thanks,
JR

Reply With Quote
  #4  
Old   
Matt Evans
 
Posts: n/a

Default Re: Microsoft.VisualStudio.TestTools - 10-05-2009 , 06:38 PM



Can you get code coverage reports for smart device unit tests? Can you
tell me how, as I understood it didn't work for smart device based
unit testing?

Thanks

Matt

Reply With Quote
  #5  
Old   
Christian Resma Helle
 
Posts: n/a

Default Re: Microsoft.VisualStudio.TestTools - 10-06-2009 , 12:53 AM



No you won't get any reports out of it unless the test runner actually
integrates with Visual Studio

But if what you really want is a test runner you can deploy then you should
check out the test runner included in the old mobile client software
factory? It's a simple application that one can deploy to the device and run
the unit tests on the device. But as previously mentioned, you won't get
decent reports out of it...

--
Regards,
Christian Resma Helle
http://christian-helle.blogspot.com

"Matt Evans" <im.djmatty (AT) googlemail (DOT) com> wrote

Quote:
Can you get code coverage reports for smart device unit tests? Can you
tell me how, as I understood it didn't work for smart device based
unit testing?

Thanks

Matt

Reply With Quote
  #6  
Old   
Chris Tacke, MVP
 
Posts: n/a

Default Re: Microsoft.VisualStudio.TestTools - 10-06-2009 , 08:25 AM



Studio can already deploy and run tests (with test edition or better
anyway) - am I missing something?

-Chris


"Christian Resma Helle" <xtianism (AT) hotmail (DOT) com> wrote

Quote:
No you won't get any reports out of it unless the test runner actually
integrates with Visual Studio

But if what you really want is a test runner you can deploy then you
should check out the test runner included in the old mobile client
software factory? It's a simple application that one can deploy to the
device and run the unit tests on the device. But as previously mentioned,
you won't get decent reports out of it...

--
Regards,
Christian Resma Helle
http://christian-helle.blogspot.com

"Matt Evans" <im.djmatty (AT) googlemail (DOT) com> wrote in message
news:613b7df6-7e66-4a53-a18b-850a3af84055 (AT) u36g2000prn (DOT) googlegroups.com...
Can you get code coverage reports for smart device unit tests? Can you
tell me how, as I understood it didn't work for smart device based
unit testing?

Thanks

Matt

Reply With Quote
  #7  
Old   
Christian Resma Helle
 
Posts: n/a

Default Re: Microsoft.VisualStudio.TestTools - 10-07-2009 , 04:23 AM



Hi Chris,

The reason I suggested the MCSF test runner is because the developer wanted
an application to deploy and run unit tests on someone else's device.

The test runner included in the mobile client software factory was just a
stand alone application that one can deploy to the device. The MCSF was
initially designed before the release of VS2005, at that time there was no
support for smart device unit testing

--
Regards,
Christian Resma Helle
http://christian-helle.blogspot.com


"Chris Tacke, MVP" <ctacke.at.opennetcf.dot.com> wrote

Quote:
Studio can already deploy and run tests (with test edition or better
anyway) - am I missing something?

-Chris


"Christian Resma Helle" <xtianism (AT) hotmail (DOT) com> wrote in message
news:2F53882C-1304-40C3-A833-3E804D572903 (AT) microsoft (DOT) com...
No you won't get any reports out of it unless the test runner actually
integrates with Visual Studio

But if what you really want is a test runner you can deploy then you
should check out the test runner included in the old mobile client
software factory? It's a simple application that one can deploy to the
device and run the unit tests on the device. But as previously mentioned,
you won't get decent reports out of it...

--
Regards,
Christian Resma Helle
http://christian-helle.blogspot.com

"Matt Evans" <im.djmatty (AT) googlemail (DOT) com> wrote in message
news:613b7df6-7e66-4a53-a18b-850a3af84055 (AT) u36g2000prn (DOT) googlegroups.com...
Can you get code coverage reports for smart device unit tests? Can you
tell me how, as I understood it didn't work for smart device based
unit testing?

Thanks

Matt


Reply With Quote
  #8  
Old   
Chris Tacke, MVP
 
Posts: n/a

Default Re: Microsoft.VisualStudio.TestTools - 10-08-2009 , 09:47 AM



Ah. Makes good sense then.

-Chris

"Christian Resma Helle" <xtianism (AT) hotmail (DOT) com> wrote

Quote:
Hi Chris,

The reason I suggested the MCSF test runner is because the developer
wanted an application to deploy and run unit tests on someone else's
device.

The test runner included in the mobile client software factory was just a
stand alone application that one can deploy to the device. The MCSF was
initially designed before the release of VS2005, at that time there was no
support for smart device unit testing

--
Regards,
Christian Resma Helle
http://christian-helle.blogspot.com


"Chris Tacke, MVP" <ctacke.at.opennetcf.dot.com> wrote in message
news:157E4199-30B5-4B35-9929-EA89BE377AD3 (AT) microsoft (DOT) com...
Studio can already deploy and run tests (with test edition or better
anyway) - am I missing something?

-Chris


"Christian Resma Helle" <xtianism (AT) hotmail (DOT) com> wrote in message
news:2F53882C-1304-40C3-A833-3E804D572903 (AT) microsoft (DOT) com...
No you won't get any reports out of it unless the test runner actually
integrates with Visual Studio

But if what you really want is a test runner you can deploy then you
should check out the test runner included in the old mobile client
software factory? It's a simple application that one can deploy to the
device and run the unit tests on the device. But as previously
mentioned, you won't get decent reports out of it...

--
Regards,
Christian Resma Helle
http://christian-helle.blogspot.com

"Matt Evans" <im.djmatty (AT) googlemail (DOT) com> wrote in message
news:613b7df6-7e66-4a53-a18b-850a3af84055 (AT) u36g2000prn (DOT) googlegroups.com...
Can you get code coverage reports for smart device unit tests? Can you
tell me how, as I understood it didn't work for smart device based
unit testing?

Thanks

Matt


Reply With Quote
  #9  
Old   
Simon Hart [MVP]
 
Posts: n/a

Default Re: Microsoft.VisualStudio.TestTools - 10-25-2009 , 03:31 AM



If I remember correctly, code coverage only works for smart devices when the
target config is set to local i.e. executing the tests hosted on the desktop
instead of the device emulator. The added benefit of doing this, is you can
debug these tests as well - which you can't if you execute the tests on the
emulator.
--
Simon Hart
Visual Developer - Device Application Development MVP
http://www.simonrhart.com

"Matt Evans" <im.djmatty (AT) googlemail (DOT) com> wrote

Quote:
Can you get code coverage reports for smart device unit tests? Can you
tell me how, as I understood it didn't work for smart device based
unit testing?

Thanks

Matt

Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.