Unit Testing Framework (Devices)

Smart device unit tests use a version of the Unit Testing Framework that is known as the Device Unit Testing Framework. The Device Unit Testing Framework is an assembly that provides the same functionality as the Unit Testing Framework. However, it is compiled for the .NET Compact Framework instead of the .NET Framework and runs on a device or emulator instead of a desktop computer. Because smart device unit tests do not support all unit tests features, the Device Unit Testing Framework contains only a relevant subset of the types in the Unit Testing Framework. The Device Unit Testing Framework occupies the same Microsoft.VisualStudio.TestTools.UnitTesting namespace as the Unit Testing Framework. When you create a smart device unit test, Visual Studio automatically adds a reference to the Device Unit Testing Framework assembly (Microsoft.VisualStudio.SmartDevice.UnitTestFramework.dll). Use the Device Unit Testing Framework just as you use the Unit Testing Framework.

Note

Your target device or emulator must have version 2.0 or 3.5 of the .NET Compact Framework installed. For more information, see How to: Install the .NET Compact Framework on a Device.

Differences between Device Unit Testing Framework and Unit Testing Framework

Assembly Location

The default location of the Device Unit Testing Framework assembly is drive:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\PublicAssemblies\Microsoft.VisualStudio.SmartDevice.UnitTestFramework.dll.

Unsupported Types

Smart device test projects do not support data-driven unit tests. As a result, the Device Unit Testing Framework does not support the following types:

Smart device unit tests do not support testing ASP.NET and Web services. As a result, the Device Unit Testing Framework does not support the following types:

Smart device applications do not have an app.config file. As a result, the Device Unit Testing Framework does not support the following types:

See Also

Other Resources

Working with Smart Device Unit Tests