Top AI Repos — open-source AI, indexed and scored
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Screenshot Kata for Android Developers. The main goal is to practice UI Testing.
| Date | Stars |
|---|---|
| 2026-07-24 | 265 |
| 2026-07-25 | 265 |
| 2026-07-28 | 265 |
| 2026-07-30 | 265 |
| 2026-08-06 | 265 |
Today
— stars today
This week
— stars this week
This month
— stars this month
Momentum
0.0
growth rate 0.00%/day
![Karumi logo][karumilogo] KataScreenshot for Android [](https://travis-ci.org/Karumi/KataScreenshotAndroid)
============================
- We are here to practice UI testing using [screenshot tests for Android][screenshotFramework].
- We are going to use [Espresso][espresso] to interact with the Application UI.
- We are going to use [Dagger2][dagger2] to replace production code with [Test Doubles][testDoubles].
- We are going to practice pair programming.
**You can compare this testing approach with [a different testing strategy][kataSuperHeroesAndroid] where the application UI is tested using just Espresso.**
---
## Getting started
This repository contains an Android application to show Super Heroes information:
![ApplicationScreencast][applicationScreencast]
This Application is based on two Activities:
* ``MainActivity`` showing a list of super heroes with name, photo and a special badge if is part of the Avengers Team.
![MainActivityScreenhot][mainActivityScreenshot]
* ``SuperHeroDetailActivity`` showing detailed information about a super hero like his or her name, photo and description.
![SuperHeroDetailActivityScreenshot][superHeroDetailActivityScreenshot]
The application architecture, dependencies and configuration is ready to just start writing tests. In this project you'll find ``Dagger2`` configured to be able to replace production code with test doubles easily and Espresso to be able to interact with the application user interface and a screenshot testing framework ready to compare your application changes.
Remember that after any production code change you can record your screenshots again executing:
```
./gradlew executeScreenshotTests -Precord
```
To verify the correct behaviour of your code you can execute:
```
./gradlew executeScreenshotTests
```
To be able to get a deterministic test scenario all our tests will be executed on the same emulated device. You can use the Travis-CI configuration to get the same emulator working on your computer.
## Tasks
Your task as Android Developer is to **write all the UI tests** needed to check if the Application UI is working as it should.
**This repository is ready to build the application, pass the checkstyle and your tests in Travis-CI environments.**
Our recommendation for this exercise is:
* Before starting
1. Fork this repository.
2. Checkout `kata-screenshot` branch.
3. Execute the application, explore it manually and make yourself familiar with the code.
4. Execute `MainActivityTest` and watch the only test it contains pass.
* To help you get started, these are some test cases for `MainActivity`:
1. Setup mocked `SuperHeroesRepository` in `MainActivityTest` to return a list of some Super Heroes.
2. Test the ``MainActivity`` is showing the super heroes obtained from the ``SuperHeroesRepository``.
3. Test the empty case is shown if there are no super heroes.
## Considerations
* If you get stuck, `master` branch contains already solved tests for `MainActivity`, `SuperHeroDetailActivity` and `SuperHeroViewHolder`.
* A [DaggerMockRule][daggermock] is an utility to let you create [Dagger 2][dagger2] modules dynamically. In this case we are using it to create a new `MainModule` in this testing scope. Instead of returning real objects, this new `MainModule` will returns the mock for `SuperHeroesRepository` defined in this test.
## Extra Tasks
If you've covered all the application functionality using UI tests try to continue with the following tasks:
* Add a pull to refresh mechanism to ``MainActivity`` and test it.
* Modify ``SuperHeroDetailActivity`` to handle an error case where the name of the super hero used to start this activity does not exist and show a message if this happens.
* Modify the project to handle connection errors and show a ``SnackBar`` to indicate something went wrong.
* Modify ``SuperHeroesRepositorExcerpt of 6,715 characters
Read on GitHubWould you bet a product on this? Bounded 0–100 and slow moving.
matched fp:e78627132a7cead0, topic:training
matched fp:e78627132a7cead0, topic:testing