Prev: "Consider app.config remapping of assembly"
Next: Lock H on Psion Teklogix 8515 Vehicle Mounted Computer - Paul G. Tobey[eMVP]
From: jrad on 28 Sep 2009 15:15 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
From: Chris Tacke, MVP on 28 Sep 2009 16:49 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(a)gmail.com> wrote in message news:fe163d9a-d9cc-45ae-8e22-7b27460e7d5d(a)k33g2000yqa.googlegroups.com... >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
From: Simon Hart [MVP] on 4 Oct 2009 11:21 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(a)gmail.com> wrote in message news:fe163d9a-d9cc-45ae-8e22-7b27460e7d5d(a)k33g2000yqa.googlegroups.com... >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
From: Matt Evans on 5 Oct 2009 19:38 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
From: Simon Hart [MVP] on 25 Oct 2009 05:31
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(a)googlemail.com> wrote in message news:613b7df6-7e66-4a53-a18b-850a3af84055(a)u36g2000prn.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 |