Giter Site home page Giter Site logo

bgrojr / aurdroidtest Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 10 KB

Example UI tests for AURDroid mobile app for Android using Appium + Kotlin

License: MIT License

Kotlin 100.00%
qa-automation test-automation testing appium junit kotlin kotlin-testing ui-testing mobile-testing

aurdroidtest's Introduction

๐Ÿ“ฑ โœ… AURDroidTest

Example UI tests for the AURDroid mobile application for Android.

Automated UI tests are written in Kotlin (script), with Appium for mobile app interaction.

Purpose

Proof of concept for writing automated test scripts with the experimental scripting mode of the Kotlin runtime. Attempting to show the viability of a lighter weight workflow, and avoid Java ๐Ÿ˜

Setup

# on Mac OS, use HomeBrew and NPM to install system dependencies
# ... and let's just assume you have the Android SDK installed already
$ brew install kotlin
$ brew install node
$ npm install -g appium@latest

Run

$ kotlinc -script TestRunner.main.kts

Tests

The tests are defined in AURDroid.kts. The tests interact with the AURDroid mobile application.

Each screen of the mobile application is represented by a class which implements methods of interacting with and retrieving information from the screen: Home.kts, Results.kts, Package.kts These classes are the mobile version of the Page Object Model design pattern.

TestRunner.main.kts contains a minimal test runner using JUnitCore.

.main.kts

When you give a Kotlin file the .main.kts extension, Kotlin's experimental scripting extension will trigger for script execution. The experimental extension enables special annotations like @file:DependsOn to specify external project dependencies, and @file:Import to specify internal dependencies.

Putting these annotations at the top of a script file saves you some work and complexity that you're normally stuck with when you work with a JVM-based language. And I'm getting pretty tired of editing Gradle build scripts ๐Ÿ˜ ๐Ÿ˜ฉ

aurdroidtest's People

Contributors

bgrojr avatar

Stargazers

 avatar  avatar

Watchers

 avatar  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.