Android MCQ Quiz Hub

Android Programming MCQ Set 5

Choose a topic to test your knowledge and improve your Android skills

1. Which statement converts the Object into String?




2. Which of the following is not an activity lifecycle method?




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




4. To pass extra information with intent we can use which Intent object method?




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




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




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




8. Which of the following is/are correct about Intent filter?




9. Which of the following are true for intent?




10. Which of the following is the correct location of the menu resource file?




11. Which object can be used to display a pop-up message?




12. Which method sets the layout for the activity?




13. To connect list view to array we can use:




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




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




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




17. 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?




18. Which of the following is the default log level of selendroid?




19. 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.




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




21. 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?




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




23. 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?




24. 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?




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




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




27. Which of the following is the correct syntax of monkeyrunnner command used in Android Studio?




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




29. Which of the following statements is correct about GPU tracing in Android Studio?




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




31. Which of the following is the correct format of logcat messages?




32. 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?




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




34. 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?




35. 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?




36. 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?




37. 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?




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




39. 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?




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




41. 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?




42. 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.)




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




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




45. 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?




46. 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?




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




48. Which of the following methods in Selendroid starts a mobile web testing session?




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




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




51. 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?




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




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




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




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




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




57. 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?




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




59. 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?




60. 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?




61. 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?




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




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




64. 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?




65. 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?




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




67. 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.




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




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




70. 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?