App stress test Getting Started tutorial

Source: Internet
Author: User

?

Daniel Knott has used a variety of different programming languages and software quality assurance tools. He has worked in software development and testing for seven years, and since 2010 he has been working for Xing AG in Hamburg, Germany, and several projects, such as the Xing Survey and Xing advice, are responsible for test Management, test automation , and test execution. Daniel is now the quality Assurance team leader in the Xing Mobile and Xing API team. In the Xing Mobile team, he is also responsible for Xing test management and test automation for Android and iphone apps. Daniel has extensive experience in software testing automation including tools like Robotium, KIF (Keep It functional), Selenium and Java. He also made presentations at various agile conferences and posted them regularly on his blog and Xing blog.

?

?

?

Stress testing and interrupt testing are important parts of mobile testing. With the help of tools, mobile testers can determine the performance or stability issues that an app might have. To test your app's interruptions, you can manually trigger multiple notifications for your device when you use the app. Notifications can be messages, calls, app upgrades or push notifications (software interrupts). Pressing the volume increase or decrease button or any other hardware button is an interruption that will affect your app. All tasks are done manually, which means a lot of work and time-consuming. In most cases, those test scenarios cannot be done manually because it is difficult to simulate fast and multi-user input with one or two hands. But it can be done easily with tools, and it's easy to integrate into the development and testing process.

  Android Monkey Tools
For Android apps, you can use the Monkey[mon01] tool, which is the Android software Development Kit (SDK). The Monkey tool can be run on a physical device or emulator. At runtime it generates virtual random user events such as touch, tap, rotate, bash, reduce volume, turn off network connections and so on to stress test the app to see how the app handles all of these inputs and interrupts. You need the install package name of the Android APK file to execute the Monkey tool, otherwise the tool will execute its random command for the entire phone instead of just the app being tested. With the app code, you can find the installation package name in the Androidmanifest.xml. If only the apk file is compiled, the mobile tester can use the Android Asset Packaging tool [AAP02] (AAPT) to get the installation package name from the app. AAPT is located in the Build-tools folder of the installed Android SDK. The path to AAPT is as follows:

Use the following command to read the installation package name from the APK file.

The input is as follows:

If you have the installation package name (Com.myapp in this case), use ADB (Android Debug Bridge) [ADB03] to execute the monkey. The following command will start Monkey:

2000 shows the number of random commands that monkey will execute on the app. With an additional parameter, monkey will generate the same sequence of events again. It is really important to reproduce a bug during monkey execution.

  UI Automonkey
For iOS apps, you can also use a similar tool--ui Automonkey [UIA04]. The UI Automonkey can also generate multiple commands to stress test The iOS app. To use the UI Automonkey,uiautomation tool template, you need to configure Xcode. Once configured, you need to write a JavaScript file that tells you how much and what commands you need to perform during the stress test.

  UI Automonkey Sample Script

If you write a script, you can stress- test your iOS app in Xcode. At the end of the test run, both tools generate an overview of the errors or problems that may occur in the app.

  Note: detailed installation instructions and a complete sample script can be found on the tool manufacturer's website.
Both tools can be integrated into a continuous integrated system to run automatically after each command. Stress and interrupt testing for mobile apps is fairly straightforward and should be part of a mobile testing strategy. In addition, it will have a huge benefit to the testers and help the team build a stable and reliable mobile app.

Copyright notice: This article from SPASVO Software Testing network: http://www.spasvo.com/news/html/20141112144940.html

Original works, reproduced when you must be in the form of hyperlinks to the original source, author information and this statement, or will be held liable.

?

App stress test Getting Started tutorial

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.