recorded • Each test method corresponds to a tape file • Interactions are recorded in request-response pairs • Includes method, URL, status, headers and response body • Modes: read-only, read-write, write-only, etc. • Read from instrumentation APK “assets” directory • Writes to device’s external storage directory Tape WHERE INTERACTIONS HAPPEN
{ @Override public boolean isMatch(Request a, Request b) { return a.method().equalsIgnoreCase(b.method()); } }, uri { @Override public boolean isMatch(Request a, Request b) { return a.url().equals(b.url()); } }, host { @Override public boolean isMatch(Request a, Request b) { return a.url().url().getHost().equals(b.url().url().getHost()); } }, path { @Override public boolean isMatch(Request a, Request b) { return a.url().url().getPath().equals(b.url().url().getPath()); } }, port { @Override public boolean isMatch(Request a, Request b) { return a.url().url().getPort() == b.url().url().getPort(); } } }
of cool concepts can be brought in from other platforms • Naming is also hard • Writing stable and reproducible Android UI tests is possible Conclusion FINAL REMARKS