GithubHelp home page GithubHelp logo

goldbillka / winium.storeapps Goto Github PK

View Code? Open in Web Editor NEW

This project forked from 2gis/winium.mobile

0.0 2.0 0.0 423 KB

Winium.StoreApps is Selenium Remote WebDriver implementation for automated testing of Windows Store apps, tested on emulators (currently only Windows Phone apps are supported).

License: Mozilla Public License 2.0

Batchfile 0.31% C# 93.49% Python 6.20%

winium.storeapps's Introduction

English description | Описание на русском

Winium for Store Apps

Build Status Inner Server NuGet downloads Inner Server NuGet version GitHub release ![GitHub license](https://img.shields.io/badge/license-MPL 2.0-blue.svg?style=flat-square)

Winium.StoreApps is Selenium Remote WebDriver implementation for automated testing of Windows Store apps

Winium.StoreApps is an open source test automation tool for Windows Store apps, tested on emulators (currently it supports only testing of Windows Phone apps).

Supported Platforms

  • Windows Phone 8.1

For Windows Phone 8 Silverlight test automation tool see Windows Phone Driver. For Windows Desktop (WPF, WinForms) test automation tool see Winium Desktop.

Why Winium?

You have Selenium WebDriver for testing of web apps, Appium for testing of iOS and Android apps. And now you have Selenium-based tools for testing of Windows apps too. What are some of the benefits? As said by Appium:

  • You can write tests with your favorite dev tools using any WebDriver-compatible language such as Java, Objective-C, JavaScript with Node.js (in promise, callback or generator flavors), PHP, Python, Ruby, C#, Clojure, or Perl with the Selenium WebDriver API and language-specific client libraries.
  • You can use any testing framework.

Requirements

  • Windows 8 or higher
  • Visual Studio 2013 with Update 2 or higher
  • Windows phone 8.1 SDK

You can get Visual Studio and SDK from Microsoft here.

Quick Start

App under test (AUT) is application that you would like to test.

  1. Add reference to Winium.StoreApps.InnerServer in AUT project (install NuGet package or build project yourself)

  2. In your AUT's source code add following lines to be called on UI thread after visual root is initialized (usually in MainPageOnLoaded for vanilla app or PrepareApplication if you use Caliburn.Micro)

    AutomationServer.Instance.InitializeAndStart();

    or (will include driver only for debug build)

    #if DEBUG
    	AutomationServer.Instance.InitializeAndStart();
    #endif // DEBUG
  3. Write your tests using you favorite language. In your tests use app desired capability to set path to tested app's appx file. Here is python example:

    # put it in setUp
    self.driver = webdriver.Remote(command_executor='http://localhost:9999',
                                   desired_capabilities={'app': 'C:\\testApp.appx'})
    # put it in test method body
    element = self.driver.find_element_by_id('SetButton')
    element.click()
    assert 'CARAMBA' == self.driver.find_element_by_id('MyTextBox').text
  4. Start Winium.StoreApps.Driver.exe (download release from github or build it yourself)

  5. Run your tests and watch the magic happening

Writing tests

Essentially, Winium.StoreApps supports limited subset of WebDriver JSON Wire Protocol, which means that you can write tests just like you would write for Selenium or Appium, here are some docs. For test samples look at our functional tests or test samples page.

Winium.StoreApps vs Winium.StoreApps.CodedUi

Winium.StoreApps vs Winium.StoreApps.CodedUi

How it works

Winium.StoreApps consists of two essential parts:

  1. Winium.StoreApps.Driver implements Selenium Remote WebDriver and listens for JsonWireProtocol commands. It is responsible for launching emulator, deploying AUT, simulating input, forwarding commands to Winium.StoreApps.InnerServer, etc.

  2. Winium.StoreApps.InnerServer (the one that should be embedded into AUT) communicates with Winium.StoreApps.Driver.exe and executes different commands, like finding elements, getting or setting text values, properties, etc., inside your application.

Winium.StoreApps structure

Contributing

Contributions are welcome!

  1. Check for open issues or open a fresh issue to start a discussion around a feature idea or a bug.
  2. Fork the repository to start making your changes to the master branch (or branch off of it).
  3. We recommend to write a test which shows that the bug was fixed or that the feature works as expected.
  4. Send a pull request and bug the maintainer until it gets merged and published. 😃

Contact

Have some questions? Found a bug? Create new issue or contact us at [email protected]

License

Winium is released under the MPL 2.0 license. See LICENSE for details.

winium.storeapps's People

Contributors

skyline-gleb avatar nickab avatar

Watchers

James Cloos avatar Dmitriy Biloshytskiy avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.