Use Windows Mobile test framework for automated testing of Windows Mobile programs-(1) Introduction to Microsoft Windows Mobile test framework

Source: Internet
Author: User
Open the MEDC 2007 course list page and you will see the title of a course, "use Windows Mobile test framework for automated testing". suddenly, the new Windows Mobile 6 SDK seems to contain Windows Mobile test framework, in this case, open the zip package "tools \ Windows Mobile test framework \ Windows Mobile test" under the wm6 installation directory.

I really don't know. I was shocked at first glance ...... Microsoft released this framework separately. In fact, this set of things seems to be included in the CE tool kit of Windows CE 5, but now it seems to be proposed separately for promotion. So I will also write a series about it and everyone will study this Windows Mobile test framework.

1. Introduction to Microsoft Windows Mobile test framework

Windows Mobile test framework (wmtf) is an automated testing framework used internally by Microsoft on Windows CE/Windows Mobile. With this framework, we can easily use it to simulate users'ProgramTo perform multiple tests, such as functions, UI, and localization.
The overall structure of this framework is shown in:

The green section is provided by Microsoft in the Windows Mobile test framework.
The orange uial requires Microsoft's tool in the Windows Mobile test framework for self-production and a few modifications.
The blue part is what we need to do by ourselves.

2. Introduction to various levels of Windows Mobile test framework
1) utils. Net:
This layer provides many common objects or. in. Net FX.. Net CF, such as process/device information/memory/Registry, etc ......
2) Logging:
This layer, as its name implies, encapsulates the logging function to record the testing process and results. Of course, this logging mechanism is very good, not only can be used here, you can even use it in the development process or even desktop program development.
3) datk:
The full name of datk is device automation toolkit. It is a set of class libraries that reflect all the standard controls on Windows CE. For example, text box, list box, button, etc. At the same time, there is a main object in this layer called windowsfinder, which is almost the core part of datk and even wmtf. You can use it to specify conditions (such as type, text, process, and so on) to find a control, bind the control to a datk control, and then your Code To operate on this datk control, you can call the actual control. This is actually the core part of the Windows Mobile test framework.
4) Mobility Toolkit:
In the future, we will refer to MTK for short. MTK mainly adds many unique objects for mobile devices based on datk. It can be considered as an extension of datk.
5) uial:
Uial (ui prepare action layer), which is a reflection of the interface of the application you want to test. You must create uial-layer code for each interface you want to test (using tools provided by Microsoft) to test the program. A typical uial Layer Code usually contains four parts.
A. Dialog Box class: it is an shadow of the dialog box you want to test. It should also contain the datk controls of all the controls on the interface.
B. Application class: Used to start this dialog box.
C. idnholder class: used to find the localized resource text in the dialog box.
D. Self-Test code: Hehe... From this layer, we need to perform a test.
6) area libraries:
At this layer, we usually encapsulate some reusable steps. For example, you need to open a dialog box in your test program, and this step is obviously reusable (maybe we need to open this dialog box repeatedly to test different places ). Then we can encapsulate the steps for opening the program and then open the dialog box into area libraries for future reuse.
7) Test Cases & Test suites:
This layer is usually referred to as the tests layer. Obviously, this layer is used to write our test code. Similar to nunit. Use suite to organize some test cases together.

Finally, the test engine tux. NET will call the test code in the tests layer to test the program according to your test script.

Now, you may have a preliminary impression on Windows Mobile test framework? Maybe it's still dizzy, hehe... It doesn't matter. In the subsequent chapters, I will show you one after another.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.