Android/Android%20Programming%20MCQ%20Set%205 Sample Test,Sample questions

Question:
 Which of the following is the correct syntax of the ui automator tool command that is used for deploying the user generated test JAR file to the test device?

Which of the following is the correct syntax of the ui automator tool command that is used for deploying the user generated test JAR file to the test device?

1.adb.push /data/local/tmp/

2.adb push ldata/Iocal/tmp/

3.adb push to Idata/IocaI/tmp/

4.adb push to -t Idata/Iocal/tmp/

Posted Date:-2022-08-21 10:23:32


Question:
A menu resource file in Java can be referenced as (...)?

1.R.appmenu.filename

2.R.appbar.filename

3.R.menu.filename

4.R.id.filename

Posted Date:-2022-08-20 13:24:47


Question:
As a test engineer of an IT organization if you are required to check whether or not the target app returns the correct UI output in response to user interactions in the activities of the app, then which of the following types of testing would you use?

1.Instrument unit test

2.Components within your app only (Integration Test)

3.Local Units Test

4.Cross-app Components (Integration Test)

Posted Date:-2022-08-21 10:37:01


Question:
Extending your class with TestCase class and implementing which of the following methods allows you to use a JUnit TestCase?

1.run()

2.testAdd()

3.show()

4.setUp()

Posted Date:-2022-08-21 09:37:59


Question:
In Addroid Studio, which of the following is the correct syntax of the bmgr restore command used for immediately invoking the restore operation for an application whose testing is being done?

1.adb shell bmgr restore enable

2.adb Shell bmgr restore

3.adb shell bmgr.restore --

4.adb shell 逓bmgr.restore

Posted Date:-2022-08-21 05:59:47


Question:
In Android Studio, which of the following commands is passed to the dumpsys tool so that it provides an output in logcat with performance information that is related to the frames of animation, which occur during the recording phase?

1.meminfo

2.screencap

3.gfxinfo

4. Is

Posted Date:-2022-08-21 06:11:18


Question:
In Android Studio, which of the following debugging tools provides the user a graphical viewer for execution logs saved by the user

1.Device Monitor

2.Android Monitor

3.systrace

4.traceview

Posted Date:-2022-08-21 09:55:44


Question:
In Android Studio, which of the following features are provided by the Ul/Application Exerciser Monkey?

i) It provides Options for Operational constraints, for example, restricting the test to a single

package.

ii) It provides options for event types and frequencies.

iii) It provides basic conf‌iguration Options.

iv) It provides debugging options.

1.Only options i) and iii)

2. Only options i) and ii

3.All options 0, ii), iii), and iv)

4.None of these

Posted Date:-2022-08-21 11:07:04


Question:
In Android Studio, which of the following is the correct syntax for using jobb in order to dump the contents of an existing 088 f‌ile?

1.$ jobb -pn ltemp/obb-output/ -d -o my-app-assets.jobb —k.secret-key

2.$ jobb -d ltemp/obb-output/ -o my-app-assets.obb -k secret-key

3.$ jobb -pn ltemp/jobb-output/ -o my-app-asset5.obb —k.secret-key

4.$ jobb -d ltemp/obb-output/ -o —pn my—app-assets.jobb —k secret-key

Posted Date:-2022-08-21 06:51:07


Question:
In Android Studio, which of the following is the correct syntax of the method used for waking the screen of Mon keyDevice?

1.void wake (integer x, integer y) (Here x and y are horizontal and vertical positions of the touch in an actual pixel device)

2.void wake ()

3.Monkeylmage wake ()

4.Monkeylmage wake (integer x. integer y)

Posted Date:-2022-08-21 07:06:46


Question:
In Android Studio, which of the following is the correct syntax of the shell command used for listing all the available shell programs?

1.adb shell lists lsystem/bin

2.adb Is shell /system.bin

3.adb shell ls lsystem/bin

4.adb list shell/system/bin

Posted Date:-2022-08-21 11:03:27


Question:
In Android Studio, which Of the following monkeyrunner API class provides methods for installing and uninstalling packages and is also used for running test packages?

1.MonkeyRunner

2.MonkeyDevice

3.Monkeylmage

4. Both options a and c

Posted Date:-2022-08-21 06:56:14


Question:
In Android Studio, which of the following options of the Monkey command stops the Monkey from executing until a debugger is attached to it?

1.-s

2.«dbg-no-events

3.-c

4.—wait-dbg

Posted Date:-2022-08-21 06:53:08


Question:
In Android Studio, which of the following tools allows the users to debug and optimize their user interface?

1.mksdcard

2.ddms

3.systrace

4.Hierarchy Viewer

Posted Date:-2022-08-21 10:45:57


Question:
In Android Studio, which of the following tools is used for shrinking, optimizing, and obfuscating the user

1.ProGuard

2.etc1tool

3.Draw 9-patch

4.zipalign

Posted Date:-2022-08-21 09:41:32


Question:
In Android Studio. which of the following is the correct return type of MonkeyDevice waitForConnection (float timeout, string deviceld) method that tries to establish a connection between the monkeyrunner backend and the specif‌ied device or emulator?

1.void

2.string

3.MonkeyRunner instance for the device or emulator.

4.MonkeyDevice instance for the device or emulator.

Posted Date:-2022-08-21 07:09:49


Question:
In your JUnit 4 test class, which of the following annotations would you use for specifying static methods for each test class to invoke only once?

1.@Rule

2.@Test

3.@BeforeClass

4.@Before

Posted Date:-2022-08-21 10:57:02


Question:
ln Android Studio, what is the function of the Thread.dumpStack0 method?

1.It is used for analyzing stack traces that are shared in the bug reports from external sources

2.It is used for monitoring the clipboard for new stack traces

3.It is used for printing a stack trace at any point in an app code

4.None of the above

Posted Date:-2022-08-21 07:01:16


Question:
ln Android Studio, which of the following keys would you press to add a line breakpoint after you have located the code line where you wish to pause the execution and placed the caret on that line?

(Consider the operating system to be Windows.)

1.Control+F8

2.Control+F9

3.Control+F6

4.None of these

Posted Date:-2022-08-21 07:04:45


Question:
ln Android Studio, which Of the following logs is compiled in but stripped at runtime?

1.error log

2.debug log

3.info log

4. warning log

Posted Date:-2022-08-21 09:52:53


Question:
Suppose. you want to analyse the UI components of an application that is to be tested. You have already connected your Android device to your deployment machine, Opened the terminal window, and navigated to ltoolsl. The next step is to run the uiautomatorviewer tool. Which of the following commands will you use to run this tool?

1.set uiautomatorviewer

2. uiautomatorviewer

3.uiautomatorviewer.run

4.uiautomatorviewer

Posted Date:-2022-08-21 09:46:35


Question:
To connect list view to array we can use:

1.Arrayadapter

2.Listview

3.Activity

4.Handle

Posted Date:-2022-08-20 13:23:38


Question:
To pass extra information with intent we can use which Intent object method?

1.putExtra()

2.putMessage()

3.putText()

4.putValue()

Posted Date:-2022-08-20 13:11:57


Question:
To run your app on a REAL device which of the following are required? Check all that apply.

1.Enable USB debugging on Android device

2.Install USB driver for Windows or create udev rules file for Linux. No USB drivers needed for Mac

3.Create AVD in Android Studio

4.None of These

Posted Date:-2022-08-20 13:13:55


Question:
Which method sets the layout for the activity?

1.setLayoutView()

2.setActivityView()

3.setView()

4.setContentView()

Posted Date:-2022-08-20 13:22:42


Question:
Which object can be used to display a pop-up message?

1.Dialogue

2.Toast

3.Popup

4.All of the above

Posted Date:-2022-08-20 13:21:06


Question:
Which of the following Android classes provides JUnit framework, Android-specif‌ic setup, teardown, and helper methods?

1.AndroidJUnitRunner

2.AndroidTestCase

3.MonitoringInstrumentation

4.AndroidJUnit4

Posted Date:-2022-08-21 06:13:35


Question:
Which of the following are true for intent?

1.It’s a type message that allows you to bind separate objects (such as activation) together at runtime.

2.If one activity wants to start a second activity, it does it by sending an intnet to Android.

3.startActivity(intent); This tells Android to start the activity specified by the intent.

4.All of the above

Posted Date:-2022-08-20 13:18:49


Question:
Which of the following arguments is NOT used by the alert method, of MonkeyRunner class, that displays an alert dialog to the process running the current program?

1.format

2.message

3.title

4.okTitle

Posted Date:-2022-08-21 10:40:23


Question:
Which of the following commands is used by Selenium grid for checking the ports used by all running programs on your machine?

1.netstat -at

2.netstat -a

3.netstat -u

4.netstat-l

Posted Date:-2022-08-21 10:46:56


Question:
Which of the following debug types can you use if you wish to use only LLDB for debugging your code where Java debugger session view is NOT available?

1.Auto

2.Java

3.Hybrid

4.Native

Posted Date:-2022-08-21 06:54:32


Question:
Which of the following folder locations can be used for layouts to accomodate different screen sizes? (choose all that apply.)

1.res/layout

2.res/layout-large/

3.res/layout-xlarge

4.All of the above

Posted Date:-2022-08-21 04:44:07


Question:
Which of the following is an argument of the sleep method of MonkeyRunner class that pauses the current program for a specified amount of time?

1.Minutes

2.Microseconds

3.Milliseconds

4.Seconds

Posted Date:-2022-08-21 06:57:02


Question:
Which of the following is correct in order to get a reference to the TextView having an id of "water"

1.findViewById(R.id.water)

2.findViewId(R.id.water)

3.findViewById('water')

4.findByViewId(R.id.water)

Posted Date:-2022-08-20 13:12:52


Question:
Which of the following is not an activity lifecycle method?

1.onCreate()

2.onStart()

3.onStop()

4.onDetach()

Posted Date:-2022-08-20 13:10:05


Question:
Which of the following is the correct format of logcat messages?

1.date time PlD-TlD/package priority/tag: message

2.time date TID/PlD/package priority/tag: message

3.date/time/PlD-TlD/package priority/tag: message

4.time/Date —T|D —P|D /package priority/tag: message

Posted Date:-2022-08-21 06:50:14


Question:
Which of the following is the correct Java syntax for retrieving the innerText value contained within an element?

1.WebElement element = drivenf‌indElementpartia|LinkText(

2.element = drivenf‌indElement.id(

3.element = driver.element|D.findElement(

4.WebElement element = driverftndElement(By.id())

Posted Date:-2022-08-21 06:57:59


Question:
Which of the following is the correct location of the menu resource file?

1. res/menu/filename.xml✔

2.res/menus/filename.xml

3.res/resource/filename.xml

4.res/layout/filename.xml

Posted Date:-2022-08-20 13:20:00


Question:
Which of the following is the correct syntax of a command for launching the Monkey in a quiet. non-verbose mode in Android Studio?

1.$ adb shell [options] monkey

2.S anb shell [options] monkey

3.S adb shell monkey [Options]

4.S anb Shell [options] monkey

Posted Date:-2022-08-21 09:48:11


Question:
Which of the following is the correct syntax of CSS partial match that will use the "checkName" part in the middle of the ID of an element "abc_checkName_xyz" to match and find the element in Selenium?

1.Input["id='checkName']

2.lnput[id'='checkName']

3.lnputf[id$=‘checkName’]

4.lnput[id="checkName"]

Posted Date:-2022-08-21 11:17:26


Question:
Which of the following is the correct syntax of monkeyrunnner command used in Android Studio?

1.monkeyrunner -plugin

2.monkeyrunner new plugin - __

3.monkeyrunner. plugin

4.monkeyrunner -plugin. ~s

Posted Date:-2022-08-21 06:16:34


Question:
Which Of the following is the correct syntax of the activity manager command used for starting prof‌ile on and writing results to ?

1.prof‌ile start

2.start prof‌ile write to

3.start prof‌ile write

4. profile start write

Posted Date:-2022-08-21 09:50:18


Question:
Which of the following is the correct syntax of the command that is executed for using Monkey tool on the default Android Ul application, given that the user has already navigated to the required directory and connected the Android device with the PC?

1.adb shell monkey -p your.package.name -v 500

2.adb shell command— monkey -p —v your.package.name -500

3.logcat shell monkey -v your.package.name -p «500

4.shell logcat —v monkey o-p your.package.name -500

Posted Date:-2022-08-21 10:59:07


Question:
Which of the following is the correct syntax of the command that you will be running if you want to see how your app's memory is divided between different types of RAM allocation?

1.adb shell dumpsys meminfo [-d]

2.adb shell dumpsys - d meminfo

3.adb shell dumpsys —meminfo -d

4.adb shell dumpsys [-d] -meminfo

Posted Date:-2022-08-21 06:03:20


Question:
Which of the following is the correct syntax of zipalign command for confirming the alignment of existing.apk?

1.zipalign [-c] [-f] [-v] existing.apk

2.zipalign -f -v existing.apk

3.zipalign -c -v existing.apk

4.zipalign -v existing.apk -c

Posted Date:-2022-08-21 06:19:45


Question:
Which of the following is the default log level of selendroid?

1.DEBUG

2.VERBOSE

3.INFO

4.ERROR

Posted Date:-2022-08-21 05:08:39


Question:
Which of the following is the general syntax of the "am instrument" command used in Android Studio?

1.am instrument [flags]

2.am instrument l [flags]

3.am instrument [f‌lags]

4.am instrument [f‌lags] l

Posted Date:-2022-08-21 06:15:08


Question:
Which of the following is true for R.java? (choose all that apply)

1.R.java is a special Java file that gets generated by the Android tools whenever you create or build your app

2.Android uses R.java to keep track of the resources used within the app

3.It enables you to get references to GUI components from within your activity code

4.All of the above

Posted Date:-2022-08-20 13:14:53


Question:
Which of the following is/are correct about Intent filter?

1.An intent filter specifies what types of intent each component can receive

2.Intent filters are defined inside AndroidManifest.xm

3.An intent filter also specifies a category

4.All of the above

Posted Date:-2022-08-20 13:17:01


Question:
Which of the following log messages should you select for displaying the expected log messages for regular usage and the message levels lower in the list?

1.Assert

2.Warn

3.Info

4.Debug

Posted Date:-2022-08-21 05:07:46


Question:
Which of the following methods can be used to Check whether or not an element supports multi—selection?

1.3 assertEqual(check.isMultiple());

2.3 assertFalse(make.isMultiple());

3.D assertEqual(isMultiple());

4.D assertFalse.isMultiple();

Posted Date:-2022-08-21 06:01:28


Question:
Which of the following methods in Selendroid starts a mobile web testing session?

1.new SelendroidCapabilities( ..)

2.SelendroidCapabilities.android( )

3.SelendroidCapabilities.device( ...)

4.Both options a and c

Posted Date:-2022-08-21 09:39:13


Question:
Which of the following selendroid-standalone command line parameters Specifies the port for selendroid-standalone to run on?

1.-emulatorPort

2.-selendroidServerPort

3.-port

Posted Date:-2022-08-21 09:57:50


Question:
Which of the following Selenium commands is used for returning the text from a specified cell in a table?

1.storeTable

2.assertTable

3.storeEditable

4.assertEditable

Posted Date:-2022-08-21 05:58:09


Question:
Which of the following statements is correct about GPU tracing in Android Studio?

1.The user can take a GPU trace while debugging the app.

2.GPU tracing always starts at the beginning of an app; users cannot launch it directly into a later Portion.

3.In Android Studio, users can never delete the trace libraries.

4.GPU tracing does not modify the user's APK.

Posted Date:-2022-08-21 06:20:54


Question:
Which of the following tools help(s) a user in analyzing their application's Ul in different orientations?

1.uiautomatorviewer

2.uiautomator

3.JUnit

4.Both a and b

Posted Date:-2022-08-21 11:09:25


Question:
Which of the following tools is used for stress-testing an Android application and reporting back the errors that come up?

1.JUnit

2.Ul/Application Exerciser Monkey

3.Neither J Unit nor Ul/Application Exerciser Monkey is used

4.Both, JUnit and Ul/Application Exerciser Monkey, are used together

Posted Date:-2022-08-21 04:45:36


Question:
Which of the following tools provides an API for writing programs that are used for controlling an Android device or emulator from outside of Android code?

1.JUnit

2.UllApplication Exerciser Monkey

3.DDMS

4.monkeyrunner

Posted Date:-2022-08-21 09:36:47


Question:
Which of the following tools, in Android Studio, allows the user to analyze his/her application's execution in the context of system processes, to help in the diagnosis of display and performance issues?

1.Tracer for OpenGL

2.ES ProGuard

3.Systrace

4.Android Monitor

Posted Date:-2022-08-21 10:29:45


Question:
Which statement converts the Object into String?

1.String.valueOf(Object)

2.String.value(Object)

3.string.valueOf(Object)

4.None of the above

Posted Date:-2022-08-20 13:09:13


Question:
While running some tests against an Android device using Selenium, which of the following commands can be used to forward the HTTP traffic to the device?

1.adb -s redirect tcp:8080 tcp:8080

2.Abd -a redirect tcp:8080 tcp:8080

3.adb -s forward tcp:8080 tcp:8080

4.Abd -a forward tcp:8080 tcp:8080

Posted Date:-2022-08-21 07:03:46


Question:
While running tests against Safari on a real iOS device, what is the use of "iOS-webkit-debug-proxy"?

1.It is used to debug Safari on iOS device.

2.It is used to access web views on iOS device.

3.It is used to launch Safari on iOS device.

4.None of the above

Posted Date:-2022-08-21 11:11:57


Question:
While using Android studio, which of the following commands would you run in order to run your instrumented unit tests with Cradle?

1.lgradlew test

2.lgradlew test CAT

3.lgradlew CAT

4.lgradlew CAT test

Posted Date:-2022-08-21 10:24:46


Question:
While using Appium tool, what is the function of the following command? > appium --nodeconfig /path/to/nodeconfig.json

1.It is used to custom path to the instruments command line tool

2.It is used to set the log output file

3.It is used to reset the app state

4.it is used to register Appium server with a local selenium grid

Posted Date:-2022-08-21 06:49:23


Question:
While using Selendroid, which of the following properties specifies the app id of a native or hybrid app under test?

1.aut

2.locale

3.model

4.apiTargetType

Posted Date:-2022-08-21 09:42:48


Question:
While using uiautomator tool, what is the correct syntax of the command that needs to be executed for creating the required build configuration f‌iles for building the output JAR?

1./tooIs/android «create uitest-project -n -r1 -p

2./tooIs/android create new uitestroject -n -t -p -1

3./tooIs/android create uitest-project -n -t1 -p

4./tools/android create new -u uitest project -n -t -p -1

Posted Date:-2022-08-21 06:55:29


Question:
While working on Android Studio, which of the following commands is used for importing the Python modules?

1.Python from com.android.monkeyrunner import

2.run from com.android.monkeyrunner import

3.Python from com.android.monkeyrunner set-import

4.from com.android.monkeyrunner import

Posted Date:-2022-08-21 07:07:57


Question:
While working on Android Studio, which of the following features are supported by the monkeyrunner tool in order to perform Android testing?

i) It supports functional testing.

ii) It supports regression testing.

iii) It supports only single device control.

iv) It supports extensible automation.

1.Only options i and ii

2.Only options. i. ii. and iii

3.Only options, i, ii, and iv

4.All options i, ii, iii and iv

Posted Date:-2022-08-21 05:57:03


Question:
With which of the following tools is the Ul/Application Exerciser Monkey tool run in order to send pseudo-random streams of keystrokes, touches, and gestures to an Android device?

1.bmgr tool

2. etc1 tool

3.adb tool

4.logcat tool

Posted Date:-2022-08-21 06:59:16


Question:
____ are like reusable components or subactivities and can be reused between screens.

1.Views

2.Activities

3.Fragments

4.Layouts

Posted Date:-2022-08-20 13:10:55


More MCQS

  1. Android Mcq Question
  2. ANDROID Multiple Choice Question
  3. Android MCQ Questions and Answers
  4. Android Programming MCQ Set 1
  5. Android Programming MCQ Set 2
  6. Android Programming MCQ Set 3
  7. Android Programming MCQ Set 4
  8. Android Programming MCQ Set 5
Search
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!