Git Product home page Git Product logo

android-modern-architecture-test-handson's Introduction

Android テストハンズオン

ハンズオンについて

このハンズオンでは「Now in Android App」のアプリを題材に、アプリアーキテクチャのレイヤにそってテストの書き方を学ぶ。




Now in Android Appで使用されている技術は次のとおりで、これらの技術を使ったアプリのテスト方法を解説する。

  • Kotlin Coroutine
  • Kotlin Flow
  • Room
  • Data Store
  • ViewModel(Android Architecture Component)
  • Jetpack Compose
  • Dagger Hilt

ハンズオンの進め方

  1. 本Repositoryをクローンし、カレントディレクトリをAndroid Studio (Electric Eel|2022.1.1+)で開く
  2. Build VariantをdemoExerciseDebugにする
  3. 目次から学習したいセクションのページに遷移する
  4. セクションのページにそって、練習問題を解く

目次

  • API通信をするコードのテストを実装しながらCoroutineのテストについて学ぶ
  • データソースに応じたテストの書き方を学ぶ
    • データベース(Room)のテストを書く
    • DataStoreのテストを書く
    • オンメモリキャッシュのテストを書く
  • ViewModelをテストする
  • Jetpack Composeをテストする
    • Composeのユニットテストについて学ぶ
    • ViewModelを結合してComposeをテストする
    • ComposeのNavigationをテストする

オリジナルのNow in Android Appからの変更点

  • README.mdをREADME.original.mdにリネームし、ハンズオン用のREADME.mdを追加
  • ハンズオンの内容を記載したmarkdown及びmarkdownで利用する画像をdocs/handson配下に追加
  • ハンズオンの演習と解答を1つのブランチで管理できるようにビルドバリアントを追加
  • ハンズオンで利用する実装クラスとテストコードを追加
  • すでにあった実装及びテストコードをハンズオンの演習内容にあわせて修正
  • 依存ライブラリのアップデート
  • テストで利用するライブラリを依存関係に追加
  • Github Actionsの設定ファイルを削除

License

Original Copyright 2022 The Android Open Source Project. See README.original.md for details.

Modifications Copyright 2023 DeNA Co., Ltd.

Licensed under the Apache License, Version 2.0.

android-modern-architecture-test-handson's People

Contributors

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