Free Associate Android Developer Exam Braindumps (page: 8)

Page 7 of 33

To run your local unit tests, follow these steps:

1. Be sure your project is synchronized with Gradle by clicking Sync Project in the toolbar.

2. Run your test in one of the following ways (select possible): (Choose three.)

  1. To run a single test, open the Project window, and then right-click a test and click
    Run.
  2. To test all methods in a class, right-click a class or method in the test file and click
    Run.
  3. To run all tests in a directory, right-click on the directory and select Run tests.
  4. To run all tests in Project, open the Project window, and then right-click a test and click
    Run.

Answer(s): A,B,C



To create a basic JUnit 4 test class, create a class that contains one or more test methods. A test method begins with the specific annotation and contains the code to exercise and verify a single functionality in the component that you want to test. What is the annotation?

  1. @RunWith
  2. @LargeTest
  3. @Rule
  4. @Test

Answer(s): D



The Testing Pyramid, shown in the Figure, illustrates how your app should include the three categories of tests: small, medium, and large. Medium tests are integration tests that:

  1. validate your app's behavior one class at a time.
  2. validate either interactions between levels of the stack within a module, or interactions between related modules.
  3. validate user journeys spanning multiple modules of your app.

Answer(s): B



The Testing Pyramid, shown in the Figure, illustrates how your app should include the three categories of tests: small, medium, and large. Small tests are unit tests that :

  1. validate your app's behavior one class at a time.
  2. validate either interactions between levels of the stack within a module, or interactions between related modules.
  3. validate user journeys spanning multiple modules of your app.

Answer(s): A






Post your Comments and Discuss Google Associate Android Developer exam with other Community members:

Associate Android Developer Discussions & Posts