Calculator is a sample app which is being tested. Click here for details of Calculator.
This package sample includes one functional test Script: CalculatorTest.py. CalculatorTest.py is a python functional test script based on the 'unittest' Test Framework to run and validate basic UI scenarios on Calculator application. It highlights the following basic interactions to demonstrate how UI testing using Windows Application Driver.
- Creating a modern UWP app session
- Finding element using name
- Finding element using XPath
- Sending click action to an element
- Retrieving element value
A Functional test executes your uploaded test script(s) on your package. The scripts are run in the sequence you specified and a failure in a particular script will stop subsequent scripts from executing.
To be able to develop new test cases, what else you need:
- Windows 10 PC with the latest Windows 10 version (Version 1809 or later)
To run python scripts, you need to install:
To run test cases, following the guide to install and run Windows Application Driver.
- Prepare the package binaries
- Enter Package folder, create a bin folder and copy calculator.msi to bin.
- Create a TestBin folder under bin, copy Tests folder and its content to TestBin.
- Zip the package
Enter Package folder, run the following PowerShell command to zip a Test Base package.The folder structure inside the zip folder that gets created is as follows:Compress-Archive -Path .\* -DestinationPath package.zip
|-- bin | |-- calculator.msi | |-- TestBin | | |-- Tests | | | |-- CalculatorTest.py |-- scripts | |-- functional | | |-- install-app.ps1 | | |-- run-test.ps1 | | |-- setup-test-env.ps1
- Upload to Test Base service
Follow this guide to upload this zip package.
The order of the scripts are as follows:- scripts/functional/setup-test-env.ps1
- scripts/functional/install-app.ps1
- scripts/functional/run-test.ps1