WindowsAutomation Reference 2.0
This is the documentation for the Windows Automation 2.0 plugin.
It provides facilities to automate tests incorporating applications with a GUI based on Windows Presentation Foundation (WPF), WinForms, and the old Win32 API.
Inhaltsverzeichnis
Features[Bearbeiten]
- Automated GUI testing of WPF, WinForms, and Win32 applications.
- Contains an expecco block library and tools which help to model tests and inspect the GUI of the application.
- Parallel remote test-execution on multiple systems.
- Performs tests against already built executables. No source code changes / recompilation of the application is required.
- Access to GUI components using XPath locators.
- Access objects of the application live at execution time.
- Full access to keyboard and mouse of the target system.
- Lots of additional features such as screen capturing, taking screenshots, highlighting GUI elements, mouse tracking, ...
Installation and Connection[Bearbeiten]
The WindowsAutomation testing plugin uses the expecoo ".NET-Bridge" which consists of two parts: A plugin for expecco, and a server executable using the .NET framework running on the remote computer to connect to.
Requirements[Bearbeiten]
On the machine running the system under test:
- .NET Framework 4.6.2 [1] or higher.
- One of the following operation systems:
- - Windows 7 SP1
- - Windows 8
- - Windows 8.1
- - Windows 10
- - Windows Server 2008 R2 SP1
- - Windows Server 2012
- - Windows Server 2012 R2
- - Windows Server 2016
- - Windows Server, version 1709
Plugin Components[Bearbeiten]
The plugin consists of the following parts:
- The GUI Browser, used to interactively explore your application.
- The Windows Automation Library, which provides blocks that you can use in your test cases.
- The .NET-Bridge server, which provides an interface between the application under test and your tests running in expecco.
Installing and Configuring the Plugin in Expecco[Bearbeiten]
The plugin is usually installed automatically by the installer; either included in the main expecco installation or provided as a separate installable add-on package. Its files are stored in the "plugin" subfolder of the expecco installation folder. You can also copy those files manually to that folder, if required. Expecco detects the plugin automatically during startup. You might need to restart your expecco session.
Preparing a local system for test execution[Bearbeiten]
If you want to automate an application running on the same host as expecco, there is no need to set up anything! Everythint should work out of the box.
Preparing a remote system for test exeuction[Bearbeiten]
The remote system will have to run the ".Net-Bridge server" which in turn connects to expecco. You just need to copy "DotNetBridgeServer.exe" to the computer your system under test is running on. No further installation is needed.
To start the bridge, navigate to the executable in a shell and start it with the following arguments:
Arguments | Description | Required |
---|---|---|
-s | Tells the executable to run in server mode (as opposed to client mode). | Vorlage:Checked |
-k | Tells the client to keep the connection open after aconnection has been terminated saving you the hassle to restart it every time a test finishes. | Vorlage:Checked |
-a <ip/hostname> | The IP-Address of the PC your application is running on. | Vorlage:Checked |
-p <int> | The port the server should listen on (default is 34318) | Vorlage:Checked |
Settings[Bearbeiten]
GUI Browser[Bearbeiten]
The GUI browser allows you to explore a running application. You can browse the application, inspect element properties and execute actions. For a more detailed description on how to use and what to do with the GUI browser also see Expecco GUI Tests Extension Reference.