GithubHelp home page GithubHelp logo

q315099997 / espresso-examples Goto Github PK

View Code? Open in Web Editor NEW

This project forked from asifurrouf/espresso-examples

0.0 2.0 0.0 266 KB

Helpful Espresso snippets for Android UI testing.

Java 100.00%

espresso-examples's Introduction

Espresso-Examples

A reference project for all of those things you forgot how to do in Espresso!

About

This repository contains an example Android application and a number of helpful Espresso UI tests to act as a helpful reference. The Espresso Package Reference can be found here.

How to use

To use test execute the tests you will can execute using the gradle command: ./gradlew app:createDebugCoverageReport or by building the tests with a test configuration in Android Studio.

Dependencies

  • Android Testing Library

        dependencies {
            //Provides AndroidJUnitRunner
            androidTestCompile 'com.android.support.test:runner:0.4'
    
            // Provides JUnit 4 rules
            androidTestCompile 'com.android.support.test:rules:0.4'
    
            // Espresso Core
            androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.1'
    
            // Espresso Contrib
            androidTestCompile 'com.android.support.test.espresso:espresso-contrib:2.2.1'
        }

Wiki

Checkout the project Wiki to see what Espresso methods are tested within the project with an explanation of what they do and where to find them in the official documentation. * [Actions] (https://github.com/jordanterry/Espresso-Examples/wiki/Actions) * [Assertions] (https://github.com/jordanterry/Espresso-Examples/wiki/Assertions) * [Hamcrest Matchers] (https://github.com/jordanterry/Espresso-Examples/wiki/HamcrestMatchers) * [Matchers] (https://github.com/jordanterry/Espresso-Examples/wiki/Matchers) * [Widgets] (https://github.com/jordanterry/Espresso-Examples/wiki/Widgets)

JaCoCo Coverage

To add code coverage add this to your gradle file.

    debug {
        testCoverageEnabled true
    }

The JaCoCo Coverage plugin has been included to demonstrate coverage reporting. The Code Coverage can be found in the following directory structure within the module you are testing build/outputs/reports/coverage/debug/index.html

Contact me

+JordanTerry

@Jordan_Terry

espresso-examples's People

Contributors

egecius avatar swati4star avatar

Watchers

James Cloos avatar unlocked 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.