Testing in Android. Methods Unit Testing Integration Testing System Testing Regression Testing...
Embed Size (px)
Transcript of Testing in Android. Methods Unit Testing Integration Testing System Testing Regression Testing...
Testing in Android
Testing in AndroidMethods Unit Testing Integration Testing System Testing Regression Testing Compatibility Testing Black Box (Functional) White Box (Structural) UI testingRegression (Feedback testing)Allows a consistent, repeatable validation of each new release of a mobile application. Regression testing ensures that reported product defects have been corrected for each new release and that no new quality problems were introduced in the maintenance process. Compatibilityensures compatibility of an application with different native device features Performance & Stress useful to identify performance bottlenecks in high use applications generally involves an automated test suite as this allows easy simulation of a variety of normal, peak, and exceptional load conditions Black Box Core functionality testing as per specification and correct performance.Testing without knowledge of the internal workings of the item being testedCan involve:UINetworkingSecurityDB managementWhite Box Based on analysis of internal workings and structure of a piece of software Includes techniques such as branch and path testingUI Testing application with a GUI to ensure correct behaviour and state of the UI. Verification ofData handlingControl flowsStatesDialog and window displaysTesting Framework
Tools get information from the project of the application under test Use this information to automatically create the build files, manifest file, and directory structure for the test packagemonkeyRunner, an API testing devices with Python programs UI/Application Exerciser Monkey, a command-line tool for stress-testing UIs by sending pseudo-random events to a device. Instrumentation Framework It monitors and diagnoses the application byTracking codeDebuggingPerformance countersEvent logs
The ActivityInstrumentationTestCase2 extends the JUnit core TestCase class . Using the instrumentation framework is easy for experienced JUnit developers because it is based on the JUnit Framework. This allows using the standard JUnit assert-functionality for verifying expected and actual behavior in the GUI caused by user interactions or fired events.11White Box: JaBUTi/ME Java Bytecode Understanding and Testing Tool is a complete tool suite understanding and testing Java programs and Java-based components Performs the given tasks:Static analysisRequirement computationCode instrumentationCoverage Analysis Its extension in mobile env. Is ME
Static: abstraction of control and data flow info in the form of def-use graphs
Reqmt: Based on above info, set of testing reqmts is computed
Inst: To measure which reqmts are executed are executed by which pieces of code. Inserting extra code is a way of doing this. Produces a list of traces reporting the program execution.
Cov. Ana: Compute how many reqmts have been covered. Give indication of how to improve the test by showing which reqmts have not benn satisfied/12White Box: JaBUTi/ME parameters The address of the test server The identification name of the programming being tested The name of the file used for temporary storage of trace data is optional. The minimum amount of available memoryKeep or not the connection
1) determines the IP address and the port to which the connection to send trace data should be established
2) allows the instrumented code to identify itself to the test server when sending trace data.
3) If provided, it instructs the code inserted in the instrumented code to store all the trace data until the end of execution and then, send it at once to the test server. The data is stored in a tem file in the mobile devices file system.
4) is a parameter, which helps tester to determine the amount of memory that could be used by the instrumented code to store and trace data before deciding to send it to the test server.
5) Controls connection behavior. Single code is generally made. If the cost of keeping the connection open is restrictive, this parameter can be used to instruct the instrumented code to create a connection each time it is needed.
13BlackBox : MobileTest Framework
UI for testers. Runs on workstation
Test control executes test scripts. Simulated ops, receives sreenshots
Comm. Layer connects device agent and test control layer
Device agent receives commands from upper layer, executes and sends status of target back.
Make configurations on the target device and the test environment.
2) Make test plans and write test scripts in the script editor manually or generate test scripts using the virtual devices.
3) Scripts are scheduled to run.
4) When scripts are interpreted, the script interpreter uses the uniform interfaces provided by communication layer to send simulated keys or other input information to the Device Agent running in the target device and then the script interpreter suspends itself.
5) Device Agent simulates the keys in the target device and returns the screenshots and results to the process monitor module with the help of the communication module. The Device Agent may also notify the test process monitor about the sensitive events automatically.
6) After receiving feedback, the test process monitor will activate the script interpreter. The next statements are saved as test results in the test resource library.