IntelliJ IDEA 2017.2 Help

Run/Debug Configuration: Android Test

Use this dialog box to configure testing of Android applications and activities on actual or virtual devices.

The dialog box consists of three tabs:

The dialog also provides a toolbar and the options that are common to all run/debug configuration types.

General Tab

ItemDescription
Module From this drop-down list, select the module to which this configuration will be applied.
Test In this area, specify the location of tests that you want to apply:
  • All in module: select this option if you want to launch all tests from the selected module.
  • All in package: select this option is you want to launch all tests from a specific package. In the Package text box, specify the package where tests are located. Type the package name manually or click the Browse button browseButton.png and select the desired package in the dialog that opens.
  • Class: select this option if you want to launch tests of a specific class. In the Class text box, specify the required class. Type the class name manually or click the Browse button browseButton.png and select the desired class in the dialog that opens.
  • Method: select this option if you want to launch a specific test method. In the Class text box, specify the class to which this method belongs. In the Method text box, specify the desired method. Type the names manually or click the Browse button browseButton.png and select the desired class and method in the dialog that opens.
Specific instrumentation runner In this text box, specify the location of the desired instrumentation runner. Type the path manually or click the Browse button browseButton.png and select the location in the dialog that opens.
Deployment Target Options In this area, select the type of device to run/debug the application on. The available options are:
  • Show Device Chooser Dialog: select this option to have IntelliJ IDEA display the Choose Device dialog box upon the application start.

    If you want to automatically use the device chosen through the Choose Device dialog in the future, select the Use same device for future launches option.

  • USB Device: select this option to have IntelliJ IDEA detect a plugged-in USB device upon the application start.

Selecting the Show Device Chooser Dialog or USB Device option may be helpful if you are going to run the application on a physical device which will be plugged in later and therefore the set of available devices cannot be foreseen.

  • Emulator: select this option to use one of the configured device emulators. From the Prefer Android Virtual Device drop-down list, select a virtual device that will be used to run/debug the specified activity. If you want to add/edit a virtual device configuration, click the Browse button browseButton.png to launch the Android Virtual Device (AVD) Manager (see Managing Virtual Devices for details).

Emulator Tab

In this tab, specify additional configuration settings for launching the Android emulator.

ItemDescription
Network Speed From this drop-down list, select the network transfer rate to be emulated.
Network Latency Use this drop-down list to specify the time delay between the initial input and the output. You can select between the following latency levels:
  • None: no latency
  • GPRS: GPRS (min 150, max 550 milliseconds)
  • EDGE: EDGE/EGPRS (min 80, max 400 milliseconds)
  • UMTS: UMTS/3G (min 35, max 200 milliseconds)
Wipe user data Select this check box to have the contents of the user-data image copied to the new user-data disk image while resetting the image. By default, the <system>/userdata.img is copied.
Disable boot animation Select this check box if you do not want an animated boot screen displayed upon the emulator start-up.
Additional command line options In this text box, type the additional options to be passed to the emulator via the command line. For lengthy command lines, click the editorIcon.gif button and type the text in the Emulator Additional Command Line Options dialog that opens.

Logcat Tab

ItemDescription
Clear log before launch Select this check box if you want data from previous sessions to be removed from the log before starting the application.

Toolbar

ItemShortcutDescription
add Alt+Insert Click this button to add a new configuration to the list.
delete Alt+Delete Click this button to remove the selected configuration from the list.
copy Ctrl+D Click this button to create a copy of the selected configuration.
settings Edit defaultsClick this button to edit the default configuration templates. The defaults are used for newly created configurations.
arrowUp or arrowDown Alt+Up or Alt+Down Use these buttons to move the selected configuration or folder up and down in the list.

The order of configurations or folders in the list defines the order in which configurations appear in the Run/Debug drop-down list on the main toolbar.

folder Move into new folder / Create new folder Use this button to create a new folder.

If one or more run/debug configurations are in focus, the selected run/debug configurations are automatically moved to the newly created folder. If only a category is in focus, an empty folder is created.

Move run/debug configurations to a folder using drag-and-drop, or the arrowUp arrowDown buttons.

sortAlphabetically Sort configurations Click this button to sort configurations in alphabetical order.

Common options

ItemDescription
NameIn this text box, specify the name of a new run/debug configuration. This field is not available for the default run/debug configurations.
Defaults This node in the left-hand pane contains the default run/debug configuration settings. Select configuration to modify its default settings in the right-hand pane. The defaults are applied to all newly created run/debug configurations.
Share Select this check box to make the run/debug configuration available to other team members.

If the directory-based project format is used, the settings for a run/debug configuration are stored in a separate .xml file in the .idea\runConfigurations folder if the run/debug configuration is shared, or in the .idea\workspace.xml file otherwise.

If the file-based format is used, the settings are stored in the .ipr file for shared configurations, or in the .iws file otherwise.

This check box is not available when editing the run/debug configuration defaults.

Before launchUse the controls in this area to specify which tasks must performed before applying the run/debug configuration. The tasks are performed in the order they appear in the list. The following options are available:
  • add (Alt+Insert): click this icon to add a task to the list. Select one of the following task types:
    • Run External tool. Select this option to run an application which is external to IntelliJ IDEA. In the dialog that opens, select the application or applications that should be run. If the necessary application is not defined in IntelliJ IDEA yet, add its definition. For more information, see Configuring Third-Party Tools andExternal Tools.
    • Run Another Configuration: select this option to execute one on the existing run/debug configuration. Choose a configuration to execute from the dialog box that opens.
    • Make: select this option to have the project or the module compiled. The Make Module command will be executed if a particular module is specified in the run/debug configuration, or the Make Project command if no modules are specified.
    • Make, no error check: this option is the same as Make, the only difference being is that IntelliJ IDEA will start the run/debug configuration irrespective of the compilation result.
    • Build Artifacts: select this option to build artifacts. Select the artifact(s) you want to build in the dialog that opens. For more information, see Working with Artifacts.
    • Run Ant target: select this option to execute an Ant target. In the dialog that opens select a target that you want to build. For more information, see Ant.
    • Run Maven goal: select this option to run a Maven goal. In the dialog that opens, select a goal that you want to run. For more information, see Maven.
    • Run Gradle task: select this option to run a Gradle task. In the dialog that opens, select a task that you want to run. For more information, see Gradle
    • Compile TypeScript: select this option to run the built-in TypeScript compiler and thus make sure that all the changes you made to your TypeScript code are reflected in the generated JavaScript files. In the TypeScript Compile Settings dialog that opens, select or clear the Check errors checkbox to configure the behaviour of the compiler in case any errors are detected:
      • If the Check errors checkbox is selected, the compiler will show all the errors and the run configuration will not start.
      • If the Check errors checkbox is cleared, the compiler will show all the detected errors but the run configuration still will be launched.
    • Run File Watcher: select this option to run the File Watchers that are active in the current project. For more information, see Using File Watchers.
    • Generate CoffeeScript Source Maps. Select this option to have the source maps for your CoffeeScript sources generated. In the dialog that opens, specify where your CoffeeScript source files are located. For more information, see CoffeeScript.
    • Run Remote External tool: select this option to run a remote SSH external tool. In the dialog that opens, specify the SSH external tool that you want to run. For more information, see Remote SSH External Tools.
  • delete (Alt+Delete): click this icon to remove the selected task from the list.
  • edit1 (Enter): click this icon to modify the selected task. Edit the task settings in the dialog that opens.
  • arrowUp (Alt+Up): click this icon to move the selected task up in the list.
  • arrowDown (Alt+Down): click this icon to move the selected task down in the list.
  • Show this page: select this check box if you want to display the run/debug configuration settings before applying it.
  • Active tool window: select this option if you want the Run/Debug tool windows to be activated automatically when you run/debug your application. This option is enabled by default.
Last modified: 29 November 2017

See Also