Lines Matching full:snippet

1 # Espresso Snippet Example
6 The same approach can be used to create any snippet app that needs to access
11 To build a snippet that instruments another app, you have to create a new
13 of your existing app with the snippet code built in.
15 The snippet code cannot run from a regular test apk because it requires a custom
20 1. In the `build.gradle` file of your existing app, create a new product flavor called `snippet`.
27 snippet {}
32 1. Link against Mobly Snippet Lib in your `build.gradle` file
36 snippetCompile 'com.google.android.mobly:mobly-snippet-lib:1.4.0'
40 1. Create a new source tree called `src/snippet` where you will place the
41 snippet code.
47 1. Write your snippet code in a new class under `src/snippet/java`
52 public class EspressoSnippet implements Snippet {
63 1. Create `src/snippet/AndroidManifest.xml` containing an `<instrument>` block
64 and any classes that implement the `Snippet` interface in `meta-data`
76 android:name="com.google.android.mobly.snippet.SnippetRunner"
84 apk; the snippet-enabled apk is a complete replacement for your app.
86 1. In your Mobly python test, connect to your snippet .apk in `setup_class`
93 self.dut1.load_snippet(name='snippet', package='com.my.app')
100 self.dut1.snippet.pushMainButton()
105 This folder contains a fully working example of a snippet apk that uses espresso
114 …adb install -r ./examples/ex2_espresso/build/outputs/apk/snippet/debug/ex2_espresso-snippet-debug.…
118 snippet_shell.py com.google.android.mobly.snippet.example2