Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • context: Context of your Android's application.
  • packageName: Package name of the application to monitor (for example com.android.chrome). If it is blank (""), the probe does not monitor any particular process.
  • lstPid: In case of system applications, the probe can't get the PID by package name so you need to precise the PID list matching the package name. (Optional)
  • appName: GREENSPECTOR's application name.
  • version: GREENSPECTOR's application version.
  • url: GREENSPECTOR's server URL. For SaaS: https://api.greenspector.com/api. For on premises servers, replace api.greenspector.com by your URL.
  • privateToken: Your private token.
  • timeout: Test time in seconds. The measure stops when the measure time reaches this timeout.
  • interval: Measure interval in milliseconds. The interval must be greater than 100 ms or can be 0 if you do not want to set it.
  • online: Set false to write the results on your device, set . Use this case if you launch your automated tests (UI Automator or Espresso for example) with the Test Runner or the Power Test Cloud/Bench.  Set true to send the measures immediately to your GREENSPECTOR server. Use this case if you launch your tests with Android Studio (i.e. you do not use the Test Runner or the Power Test Cloud / Bench).

startMeasure

Code Block
languagejava
public boolean startMeasure()

...

  1. Some fields will be directly handled by the Test Runner (or the Power Test Cloud/Bench). You can leave empty string values for the following fields: application, version, url and privateToken.
  2. Set You have to set online to false because the Test Runner (or the Power Test Cloud/Bench) will read the results on the device.

...