ExamGecko
Home Home / Google / Associate Android Developer

Google Associate Android Developer Practice Test - Questions Answers, Page 3

Question list
Search
Search

List of questions

Search

Related questions











To automate UI tests with Android Studio, you implement your test code in a separate Android test folder. Folder could be named:

A.
app/androidTest/java
A.
app/androidTest/java
Answers
B.
app/src/androidTest/java
B.
app/src/androidTest/java
Answers
C.
app/java/androidTest
C.
app/java/androidTest
Answers
Suggested answer: B

Once your test has obtained a UiObject object, you can call the methods in the UiObject class to perform user interactions on the UI component represented by that object. You can specify such actions as: (Choose four.)

A.
click() : Clicks the center of the visible bounds of the UI element.
A.
click() : Clicks the center of the visible bounds of the UI element.
Answers
B.
touch() : Touch the center of the visible bounds of the UI element.
B.
touch() : Touch the center of the visible bounds of the UI element.
Answers
C.
dragTo() : Drags this object to arbitrary coordinates.
C.
dragTo() : Drags this object to arbitrary coordinates.
Answers
D.
moveTo() : Move this object to arbitrary coordinates.
D.
moveTo() : Move this object to arbitrary coordinates.
Answers
E.
setText() : Sets the text in an editable field, after clearing the field's content. Conversely, the clearTextField() method clears the existing text in an editable field.
E.
setText() : Sets the text in an editable field, after clearing the field's content. Conversely, the clearTextField() method clears the existing text in an editable field.
Answers
F.
swipeUp() : Performs the swipe up action on the UiObject. Similarly, the swipeDown(), swipeLeft(), and swipeRight() methods perform corresponding actions.
F.
swipeUp() : Performs the swipe up action on the UiObject. Similarly, the swipeDown(), swipeLeft(), and swipeRight() methods perform corresponding actions.
Answers
Suggested answer: A, C, E, F

If you want to access a specific UI component in an app, use the UiSelector class. This class represents a query for specific elements in the currently displayed UI. What is correct about it? (Choose two.)

A.
If more than one matching element is found, the first matching element in the layout hierarchy is returned as the target UiObject.
A.
If more than one matching element is found, the first matching element in the layout hierarchy is returned as the target UiObject.
Answers
B.
If no matching UI element is found, an IOException is thrown.
B.
If no matching UI element is found, an IOException is thrown.
Answers
C.
If more than one matching element is found, the last matching element in the layout hierarchy is returned as the target UiObject.
C.
If more than one matching element is found, the last matching element in the layout hierarchy is returned as the target UiObject.
Answers
D.
If no matching UI element is found, a UiAutomatorObjectNotFoundException is thrown.
D.
If no matching UI element is found, a UiAutomatorObjectNotFoundException is thrown.
Answers
Suggested answer: A, D

Each time your test invokes onView(), Espresso waits to perform the corresponding UI action or assertion until the following synchronization conditions are met: (Choose three.)

A.
The message queue is empty.
A.
The message queue is empty.
Answers
B.
The message queue is not empty.
B.
The message queue is not empty.
Answers
C.
There are some instances of AsyncTask currently executing a task.
C.
There are some instances of AsyncTask currently executing a task.
Answers
D.
There are no instances of AsyncTask currently executing a task.
D.
There are no instances of AsyncTask currently executing a task.
Answers
E.
Some developer-defined idling resources are not idle.
E.
Some developer-defined idling resources are not idle.
Answers
F.
All developer-defined idling res
F.
All developer-defined idling res
Answers
Suggested answer: A, D, F

To run your local unit tests, follow these steps:

A.
Be sure your project is synchronized with Gradle by clicking Sync Project in the toolbar.
A.
Be sure your project is synchronized with Gradle by clicking Sync Project in the toolbar.
Answers
B.
Run your test in one of the following ways (select possible): (Choose three.)
B.
Run your test in one of the following ways (select possible): (Choose three.)
Answers
C.
To run a single test, open the Project window, and then right-click a test and click Run .
C.
To run a single test, open the Project window, and then right-click a test and click Run .
Answers
D.
To test all methods in a class, right-click a class or method in the test file and click Run .
D.
To test all methods in a class, right-click a class or method in the test file and click Run .
Answers
E.
To run all tests in a directory, right-click on the directory and select Run tests .
E.
To run all tests in a directory, right-click on the directory and select Run tests .
Answers
F.
To run all tests in Project, open the Project window, and then right-click a test and click Run .
F.
To run all tests in Project, open the Project window, and then right-click a test and click Run .
Answers
Suggested answer: 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?

A.
@RunWith
A.
@RunWith
Answers
B.
@LargeTest
B.
@LargeTest
Answers
C.
@Rule
C.
@Rule
Answers
D.
@Test
D.
@Test
Answers
Suggested answer: 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:

A.
validate your app's behavior one class at a time.
A.
validate your app's behavior one class at a time.
Answers
B.
validate either interactions between levels of the stack within a module, or interactions between related modules.
B.
validate either interactions between levels of the stack within a module, or interactions between related modules.
Answers
C.
validate user journeys spanning multiple modules of your app.
C.
validate user journeys spanning multiple modules of your app.
Answers
Suggested answer: 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 :

A.
validate your app's behavior one class at a time.
A.
validate your app's behavior one class at a time.
Answers
B.
validate either interactions between levels of the stack within a module, or interactions between related modules.
B.
validate either interactions between levels of the stack within a module, or interactions between related modules.
Answers
C.
validate user journeys spanning multiple modules of your app.
C.
validate user journeys spanning multiple modules of your app.
Answers
Suggested answer: A

What is illustrated in the picture?

A.
Logcat window with filter settings
A.
Logcat window with filter settings
Answers
B.
Debugging native code using LLDB
B.
Debugging native code using LLDB
Answers
C.
The Variables and Watches panes in the Debugger window
C.
The Variables and Watches panes in the Debugger window
Answers
D.
The Breakpoints window lists all the current breakpoints and includes behavior settings for each
D.
The Breakpoints window lists all the current breakpoints and includes behavior settings for each
Answers
E.
Adding a watchpoint to a variable in memory
E.
Adding a watchpoint to a variable in memory
Answers
Suggested answer: C

What is illustrated in the picture?

A.
Logcat window with filter settings
A.
Logcat window with filter settings
Answers
B.
Debugging native code using LLDB
B.
Debugging native code using LLDB
Answers
C.
The Variables and Watches panes in the Debugger window
C.
The Variables and Watches panes in the Debugger window
Answers
D.
The Breakpoints window lists all the current breakpoints and includes behavior settings for each
D.
The Breakpoints window lists all the current breakpoints and includes behavior settings for each
Answers
E.
Adding a watchpoint to a variable in memory
E.
Adding a watchpoint to a variable in memory
Answers
Suggested answer: E
Total 128 questions
Go to page: of 13