GithubHelp home page GithubHelp logo

jd-appium-demo's Introduction

jd-appium-demo

Demo of Appium mobile functional testing integrated with BDD using behave.

Branches

  • 1-hello-world: simple test of a label content
  • 2-make-it-fail: the same test, but failing
  • 3-get-going: we create a test of making a calculation
  • 4-outline-rules: we create a scenario outline with many calculation tests

Requirements

Capabilities

A sample capabilities file capabilities-emulator-android.json is provided. You must change the "app" capability to match the path of the calculator APK you downloaded.

If using an Android emulator, the rest can go as is. If you're using a physical device, change deviceName to your device ID as shown in adb devices.

Configuration

The requirements at requirements.txt must be installed from PyPI. You can create a virtualenv (https://virtualenv.pypa.io/en/latest/) or install it in your system. Either way, run:

pip install -r requirements.txt

Running

Start Appium Desktop and run server.

To run the project use:

behave -Dcaps=capabilities-emulator-android.json features/calculator.feature

This will run the "calculator" feature with the provided capabilities file.

Structure

Disclaimer: This project has a very basic structure that shouldn't be used for large projects.

The project has the following files:

  • capabilities-emulator-android.json is a sample capabilities file to run tests in an Android emulator.
  • features/ is the folder containing the feature files
    • steps/ contains the step implementations, in the file steps.py
    • calculator.feature contains the Gherkin test definitions
    • environment.py has behave hooks that are run before all tests. It will initialize some context variables for using it between steps.
  • requirements.txt is the Python requirements file. This project requires behave (https://behave.readthedocs.io/en/latest/behave.html) and Appium-Python-Client.

Learn more...

jd-appium-demo's People

Contributors

marcsances avatar

Watchers

Radu Bogdan Matei avatar James Cloos avatar Àlex Magaz Graça avatar  avatar Eric Cobos avatar  avatar Albert 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.