Skip to content

serhiq/Espresso-Login-Sample

Repository files navigation

Automator UI sample

This is a sample login/signup android project that is written in Kotlin and uses Espresso to run instrumented tests.

All instrumented tests are written using the PageObject pattern, which makes the tests easy to maintain and read.

Preview

Feature test

Each test is a feature, such a grouping can immediately see what works and what doesn't in app.

Screenshoot test

Includes creating screens for all screens of the application, dialogues. Testing theme changers.

Use the Spoon library to run these tests. This will allow you to run tests simultaneously on all devices connected to Adb. Once all tests have completed a static HTML summary is generated with detailed information about each device and test (with screenshoots).

Run Spoon test

Libraries Used

  • Foundation

    • AppCompat - Degrade gracefully on older versions of Android.
    • Android KTX - Write more concise, idiomatic Kotlin code.
    • Test - An Android testing framework for unit and runtime UI tests.
  • Architecture

    • Navigation - Handle everything needed for in-app navigation.

    • ViewModel - Store UI-related data that isn't destroyed on app rotations. Easily schedule asynchronous tasks for optimal execution.

  • Testing libraries

    • Mockito - Most popular Mocking framework for unit tests written in Java.
    • Falcon - take Android screenshots
    • Espresso - Android UI tests.
    • Spoon- runs the tests on multiple devices simultaneously.

License

Copyright 2020 Ekaterina Ovcharenko

Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.