Skip to content
academia.sh

Course Advanced

Testing, Performance and Release

Published Updated

By the end of this course

Start course

01

Testing

Unit tests for pure Kotlin layers, mocking dependencies, on-device tests, component-based and classic UI tests, flakiness caused by waiting and concurrency, and static analysis.

  1. 01 Unit Tests A unit test pins the number a function in the pure Kotlin layer produces for a set of inputs. The lesson classifies in how many samples a measurement exceeds its budget with four answers: within, minority, majority, all.
  2. 02 Mocking Mocking puts a test double in place of a real dependency in a test. The lesson counts how many times a repository goes to the network source in each operation and shows what a test double does and does not let you measure.
  3. 03 On-Device Tests An instrumented test runs a real screen on a device or an emulator and pays for each test's setup again. The lesson measures in how many tests the setup work exceeds the budget and what sharing the setup costs.
  4. 04 UI Tests A UI test finds a node on a screen, interacts with it, and verifies the result. The lesson measures that looking a node up by its text walks the semantics tree from the start, while looking it up by its test tag finishes in one step.
  5. 05 Test Stability A test that sometimes passes and sometimes fails on the same code is flaky. The lesson measures in how many runs a test that waits a fixed number of rounds exceeds its budget against the ready round, and how polling on a condition closes the overrun.
  6. 06 Static Analysis Static analysis reads code without running it and lists rule violations. The lesson measures in how many modules the number of violations per module exceeds the budget, and how a baseline file changes the count.

02

Performance and Debugging

Cold, warm and hot starts, the causes of dropped frames, leak detection and memory profiling, measuring network and battery use, benchmarking that catches performance regressions, and code shrinking and obfuscation.

  1. 01 Startup Time Cold, warm and hot starts do different amounts of work before the first frame. The lesson measures in how many of eight launches the first-frame budget is exceeded, and shows that one piece of work yields two overruns under two budgets and that deferred work does not disappear.
  2. 02 Rendering Smoothness Smooth scrolling depends on every frame staying within its budget. The lesson measures a scrolled list in which every frame recreates all the items, shows how a stable key narrows the recreated work, and shows why the rule does not see the size of an overrun.
  3. 03 Memory Management A screen that stays in memory after it closes is a memory leak. The lesson measures a listener that is never unregistered and holds one screen per cycle, in how many cycles the retained objects exceed the budget, and how the same leak changes category with the budget.
  4. 04 Network and Battery Profiling The number of requests sent in a synchronization cycle determines battery and network use. The lesson measures sending requests one by one, in batches and by polling on the same stream of changes, and shows that polling exceeds the budget even in cycles without changes.
  5. 05 Benchmarking Comparing two versions of a piece of work requires repeating the measurement. The lesson measures how warm-up iterations distort the measurement, how a regression looks once they are dropped, and how the rule misses it when the budget is chosen wider than the regression.
  6. 06 Code Shrinking and Obfuscation Unused classes are stripped from the published app package and the names of the remaining classes are shortened. The lesson measures in how many modules the remaining class count exceeds the budget after shrinking, shows that obfuscation does not change this count, and shows that a broad keep rule defeats shrinking.

03

Distribution

App package formats optimized per device, the version code and name scheme, automated building and signing, internal, closed and open testing tracks, staged rollout and halting, store review, and post-release monitoring.

  1. 01 App Package Formats The app bundle, the APK and the split APK decide which files reach a device. The lesson compares the number of files that land on a configuration with a budget and shows that the universal package overruns it on every configuration.
  2. 02 Version Management The version code is the integer the platform compares, while the version name is the string shown to the user. The lesson compares how far the installed version codes of eight devices are from the latest release with a budget and shows that changing the version name does not change the distance.
  3. 03 Continuous Integration and Delivery Measures how many jobs the pipeline runs when a change arrives. The change filter runs only the jobs of the affected modules; changes that touch the shared module exceed the budget, and an unfiltered pipeline runs every job on every change.
  4. 04 Testing Tracks Measures how many steps a build takes to pass through the internal, closed and open testing tracks and reach production. Shows how the overrun changes when a rejected build is rebuilt and its steps are counted again from the start.
  5. 05 Staged Rollout Widens a release to the user base stage by stage and compares the crash count at each stage with an error threshold. Shows that halting at the stage where the overrun appears stops collecting samples for the later stages, and why the sample count needs to be at least four.
  6. 06 Store Review and Policies Counts, per module, the permissions the app declares but does not use, and compares the count with a budget. Shows how the overrun closes once the unused permissions are removed, and that the rule does not see the weight of a finding.
  7. 07 Post-Release Monitoring Compares each day's crash count in the monitoring window after release with the error threshold. Measures how the jump in the first days leaves the overrun at minority, and how the same counts change category when summed weekly and the sample count drops; then gathers the course's 19 lessons in one table.

Final exam

Testing, Performance and Release — Final Exam

In preparation

This course's question bank is not complete yet. The exam opens here automatically once enough questions are added.

Start typing to search.

↑↓ ↵ Esc navigate · open · close