Tag Archives: UI testing

During the Connect(); // 2016, the Windows team talked about the Universal Windows Platform and about some of the great tooling improvements that have happened in recent months.

Kevin Gallo, VP and Program Manager Director of the Windows Platform team, was joined by Mazhar Mohammed and Dave Alles for an hour-long panel discussion and Q&A on Channel 9. Mazhar is the Director of Partner Services of for the Windows Store team, and Dave is the Group Program Manager for the team that created the Maps app for Windows.

Check out the video below to see the interesting conversation between leaders of the teams that create the Windows Platform and the Store, and one of the teams that uses both in creating a major Windows app. Kevin talks about why developers should target UWP, while Mazhar discusses the constant improvements in the Store and Dev Center. Dave talks about what a 1st-party app thinks about new features, and interacts with the platform team to provide feedback and request functionality. This is actually very similar to the way external developers provide input and feedback via UserVoice!

The most time consuming and expensive part of developing an app is often the testing phase. Manually testing an app on hundreds of different devices is impractical, and existing automation solutions run into a number of platform and tooling limitations. Appium is designed to simplify testing by supporting multiple platforms, and it’s our goal at Microsoft with Windows Application Driver (WinAppDriver) to enable you to use Appium to test Windows apps. The recent release of Appium v1.6 integrates WinAppDriver so developers can run tests targeting Windows 10 PC applications through Appium!

What is WinAppDriver?

WinAppDriver is a modern, standards-based UI test automation service that aligns with the Selenium WebDriver Protocol The Windows Application Driver allows a developer to use the “write a test once, run anywhere” approach. No longer forced to choose a specific test language and runner, developers are granted flexibility and no longer need to rewrite tests for each platform.

What is Selenium/Appium?

Selenium is the industry standard for automated UI testing of websites/browser applications. Selenium works off of the WebDriver protocol, which is an open API for browser automation. Realizing that this same protocol could be leveraged for mobile app UI testing, the Appium project was created, and it extended the WebDriver API to allow for app-specific automation endpoints. WinAppDriver was created in the spirit of the Selenium/Appium projects to conform to the industry standards for UI testing and bring those standards to the Universal Windows Platform.

How it works

With Appium’s integration of WinAppDriver, developers will have full customization of their preferred testing language and test runner as shown in the diagram above—and they can reuse their tests if their app is on iOS and Android. It is only through Appium that developers can have this customization – each UWP developer might prefer a different test script/test runner for their UI tests and because Appium uses the Webdriver protocol, developers can have that flexibility when authoring tests.

What about CodedUI?

The current UI test automation solution for Windows app testing is CodedUI; however, Coded UI only works for apps running on the Windows platform. For developers who write cross-platform apps, this means they have to write tests for each platform they are targeting. Additionally, those developers who write cross-platform apps will have to write custom tests for each platform they are targeting.

With Appium supporting multiple platforms like Android and iOS, Microsoft encourages customers to use Selenium and Appium for Functional UI testing.

How can I get started?

To download Appium with Windows 10 PC support, make sure you have Node version >=6.0 and npm version >=3.5. Then use the following steps:

Set the URL targeting your Appium server, and the appId capability set to the app ID of the app you are testing.

The platformName capability should be set to “Windows” and the deviceName capability set to “WindowsPC” in the test script.

Run your test from the test runner targeting the Appium server URL

Here is a screenshot of what the install process looks like from the command line:

As part of the install, you should see that WinAppDriver is downloaded and successfully installed:

Then, just run Appium from the command line:

Now that the Appium server is running, you can run a test from your choice of test runner pointing to the Appium endpoint. In this example, we’ll use a test targeting the built-in Calculator app on Windows 10.

The key components (shown in the red boxes) are setting the URL to target the Appium server, as well as setting the app ID, platformName and deviceName as explained in the earlier instructions.
Once you run the test, you should see results in the test runner.

To see sample tests, check out the sample apps/tests on the WinAppDriver Github page or in the Appium samples repo. For more information about WinAppDriver + Appium, visit Appium’s website or their GitHub, or check out these videos talking about how Appium and UI test automation works.