[4.3.1] Allow running test optimization for 'Android JUnit' test configurations

Issue #67 resolved
Matt Bonness
created an issue

Please add support for Android Studio. Currently running optimized tests in Android Studio causes a dialog to be shown "Clover Test Optimization supports JUnit configurations only".

It looks like the Android JUnit configuration is identical to the IntelliJ JUnit configuration (see below), so this should be a simple change.

Android JUnit run configuration XML

<configuration name="AnalyticsWrapperTest" type="AndroidJUnit" factoryName="Android JUnit" nameIsGenerated="true">
  <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea">
    <pattern>
      <option name="PATTERN" value="com.motorolasolutions.utils.*" />
      <option name="ENABLED" value="true" />
    </pattern>
  </extension>
  <module name="HelloWorldApp" />
  <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="true" />
  <option name="ALTERNATIVE_JRE_PATH" value="1.8" />
  <option name="PACKAGE_NAME" value="com.motorolasolutions.utils" />
  <option name="MAIN_CLASS_NAME" value="com.motorolasolutions.utils.AnalyticsWrapperTest" />
  <option name="METHOD_NAME" value="" />
  <option name="TEST_OBJECT" value="class" />
  <option name="VM_PARAMETERS" value="-ea" />
  <option name="PARAMETERS" value="" />
  <option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$/HelloWorldApp" />
  <option name="ENV_VARIABLES" />
  <option name="PASS_PARENT_ENVS" value="true" />
  <option name="TEST_SEARCH_SCOPE">
    <value defaultName="singleModule" />
  </option>
  <envs />
  <patterns />
</configuration>

IntelliJ Idea run configuration XML

<configuration default="false" name="MainTest.testBlahBlahBlah" type="JUnit" factoryName="JUnit" nameIsGenerated="true">
<module name="JUnitIdeaRunConfigTest" />
<extension name="coverage">
  <pattern>
    <option name="PATTERN" value="com.motorolasolutions.*" />
    <option name="ENABLED" value="true" />
  </pattern>
</extension>
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="PACKAGE_NAME" value="com.motorolasolutions" />
<option name="MAIN_CLASS_NAME" value="com.motorolasolutions.MainTest" />
<option name="METHOD_NAME" value="testBlahBlahBlah" />
<option name="TEST_OBJECT" value="method" />
<option name="VM_PARAMETERS" value="" />
<option name="PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="" />
<option name="PASS_PARENT_ENVS" value="true" />
<option name="TEST_SEARCH_SCOPE">
  <value defaultName="singleModule" />
</option>
<patterns />
<method />
</configuration>

Comments (7)

  1. Log in to comment