Files
frameworks_base/core/tests/coretests
Clara Bayarri 1e4657ee9e Fix failing ActionBarContainerTest#testFloatingActionModesAreBubbledUp
This test was failing because the returned action mode is null. This
is expected, as the calls bubble up the parent hierarchy and we are
testing on an unattached parent. We only wanted to test that it
bubbles up the parent when it is floating, and that is already
achieved in the test without checking what the actual returned mode
is.

Bug: 38339380
Test: bit FrameworksCoreTests:com.android.internal.widget.ActionBarContainerTest\#testFloatingActionModesAreBubbledUp
Change-Id: Ieeac4949d523bee993458ace5db2dd7f35d45496
2017-06-05 19:41:18 +01:00
..
2017-05-15 12:05:56 -07:00

* Copyright (C) 2016 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
*      http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.


INTRODUCTION

The Android platform core tests (APCT) consist of unit tests for core platform
functionality. These differ from CTS in that they are not necessarily testing
public APIs and are not guaranteed to work outside of AOSP builds.


INSTRUCTIONS

To run a test or set of tests, first build the FrameworksCoreTests package:

  make FrameworksCoreTests

Next, install the resulting APK and run tests as you would normal JUnit tests:

  adb install out/target/product/.../data/app/FrameworksCoreTests/FrameworksCoreTests.apk
  adb shell am instrument -w \
    com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner

To run a tests within a specific package, add the following argument AFTER -w:

    -e package android.content.pm

To run a specific test or method within a test:

    -e class android.content.pm.PackageParserTest
    -e class android.content.pm.PackageParserTest#testComputeMinSdkVersion

To run tests in debug mode:

    -e debug true

To uninstall the package:

  adb shell pm uninstall -k com.android.frameworks.coretests

For more arguments, see the guide to command=line testing:

  https://developer.android.com/studio/test/command-line.html