GithubHelp home page GithubHelp logo

androidkatas's Introduction

Robolectric Katas

Use this repository a starting point to complete Android code katas.

Import

The master branch has Robolectric preintegrated. Simply import into Android Studio using the "Import Non-Android Studio project" option and selecting the top-level build.gradle file.

Import project

Note: To become comfortable with integrating Robolectric, you can use the "Hello, Robolectric" chapter of the Android Activity Book or my Pocket Guide to TDD with Robolectric (coming soon!) as a separate kata.

Run the Tests

Now that the project is imported, ensure the tests run.

Create a run configuration to run the tests from the IDE (my preferred method). To run the tests from the command line, use ./gradlew check.

Run Configuration

When running for the first time, I often get this error -- and sometimes well after the project has begun.

Error:(25,0) Gradle: A problem occured evaluating projecy ':robolectric_tests'.
             > Could not find property 'android' on project ':app'.

If you invalidate your caches and restart ("File" -> "Invalidate Caches / Restart ..."), it clears up the problem. Sometimes opening and closing Android Studio is required.

Error Message

Katas

Now that the project is configured, you're ready to work though some katas.

Join my newsletter for updates about my upcoming book with Android katas. In the meantime, check out these resources to help you on your test driven development (TDD) journey.

androidkatas's People

Contributors

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