In this article we’ll discuss basic points in testing applications that provide USB device redirection in terminal services.
Written by: Mariya Kolotova, Junior QA Specialist, Apriorit Inc.
Users enjoy possibility to work with the remote computer as with the local one, without getting up from a chair, for several years already. Terminal sessions – so-called remote access – give a user a lot of possibilities. They are not only redirecting of desktop wallpapers and themes of the remote computer but also more useful features such as device redirecting.
The most known remote access tool is Windows Remote Desktop Connection (RDC). It is built in the Windows OS and uses RDP for the work. This tool successfully implements all of the functions mentioned above, and its features are improved with the next versions.
However RDC possibilities concerning device redirection depend much on:
- Type of the redirected device
- Operating systems of the remote computer
- Operating systems of the client which the access is performed from.
For example, redirection of Plug and Play devices is available only in Windows Vista Enterprise and Windows Vista Ultimate when connecting to and remote computer running Windows Vista.
The most popular portable devices for today are USB devices, and they must keep their mobility in the remote work. So there are applications specially created not only to redirect USB device but also to provide management of them during the terminal sessions. In this article we will consider testing of such applications based on the RDP protocol.
There are an enormous great number of USB devices for today:
- Devices for information storing: common flash stores, USB drives, pocket computers;
- Multimedia USB devices: web cameras, players, photo cameras;
- Office equipment: USB printers, USB scanners.
And there are many others. But for testing of USB redirection this list is absolutely sufficientJ.
Before starting to talk about testing, I want to give a bit of useful information.
Majority of USB devices works on the base of USB 2.0 specification, although USB 1.0 still can be met.
USB stores can also differ by the file system which they are formatted for. The most widespread file system is FAT 32, but the stores of large capacity can be formatted for NTFS.
Some devices – for example USB printers and cameras – require the additional installation of drivers. This moment requires more attention, because not only these devices should be redirected in the terminal session and identified but also their drivers should work correctly, without slow down of the session and trying the user’s patience.
Work with the devices in a terminal session ideally should not differ from the local work with them – that, a user working with his favorite web cam should not wait for ages while he is able to make same pictures at last or see the dear face of his interlocutor. In other hand while improving the functioning speed we must remember about the quality.
Testing of remote work with a computer and redirecting of USB devices means the presence of the proper environment and also that applications implementing the corresponding functions have client-server architecture. Computer which the access is performed from is a client, and computer which we connect to in a terminal session is server.
The different amount of users can be provided with the remote access – it depends on the operating system. Windows XP, for example, supports only one session, while server systems are multiuser.
All above-mentioned features of applications and architecture must be taken into account when testing applications that provide USB redirection.
First point to pay attention is correct detection of the devices on the client side. It means the correct representation of the name and properties. The last is important, though it is not a factor blocking the subsequent testing in the case of failing.
Figure 1. USB flash is shown in the Device Manager
In the general case the testing of our application will include Functional, Stress and Configuration testing.
Functional testing consists of two basic parts:
- Functioning of the device itself
- Testing of management tools of device redirecting in the terminal session.
Tests on device functioning for flash or drive are:
- Copying of the files/folders of different size from/to the device
- Creating the files/folders on the device
- Playing multimedia of large size from the device
- Editing documents on the device
Multimedia USB devices (web cameras) should be used maximally (on purpose, certainly): shooting video, photographing and playing should work without annoying user with long delays.
The simplest tools of device redirection management in terminal sessions are small window applications on the client and server. Minimum options which can be provided are startshutdown of the device redirection, automatic redirection, etc. Check list can be formed accordingly to these options. You should also pay attention on:
- The changing of the device status on the client side is performed correctly
- The time of device redirection in a session is minimal, that means that is does not exceed time that flash drive needs to be shown locally in the system.
- Properties and the status on the server side are represented correctly.
Stress tests are especially important. Because all work on device redirection takes a place in a network, here we are interested mainly in disconnects of different types. They can happen in any place – from controller domain and basic server to our client machine. It’s not a problem to organize controller domain disconnect in the testing lab, and client machine and server disconnections are the ordinal cases.
Disconnect of the device itself is also included in the stress testing. During performing it you should take into account that the application should process disconnections correctly at different levels. At application level it suggests the device disconnection by means of the interface – usually it takes place after pressing the corresponding button. But hardware disconnect is more insidious method. Here the verification of application work is performed, for example, by the disconnecting of device cable not only in a rest state but also in the process of direct work with it in a session.
Developing the strategy of the Configuration testing you should take into account different combinations of 32 and 64 bit operating systems of client and server with the different versions of RDP (5.0, 5.1, 5.2, 6.0, 6.1)
So, to test USB redirection you should provide yourself with the USB devices of different kinds from different producers, and also drivers to them. When composing the test plan you should take into account that testing of the device management in a session will take a place both on the client and on the server side.
A test-plan should include:
- Functional testing, including testing of device management tools and their options, and also testing of device work in a session;
- Stress testing, including typical stress-test for applications with client-server architecture (different sorts of disconnects);
- Configuration testing, which is in combining the operating system types and versions of the client and server with the different versions of RDP (5.0, 5.1, 5.2, 6.0, 6.1).