Practical experience in mobile app test case design (reprint)

Source: Internet
Author: User
Tags benchmark

Preface

Before I talk about mobile app test case design, I ask you to consider the following 2 questions:

First, why should we do the test case design? --why?

Second, what are the common features of good test case design? --what?

In-depth thinking of the answers to these 2 questions is a very meaningful thing, as the mobile internet era of product quality Guard Army, we must improve their testing design capabilities, we must clearly know what to test, how to measure. But from the current situation of our testing team, there are many people are not ready, test design method is still relatively backward, so I collate this article, aimed at summarizing the sedimentation mobile client test case design practice, to help testers at all times to review the improvement of self-testing capabilities.

  So back to the beginning of the article 2 questions, I also say my understanding, there is inappropriate when the peer pointed out.

1.Why? Why do you want to do test case design?

The purpose of test case design, popular is mainly through the demand point of the test design to avoid the omission of test points, and now each company also very much agree with the test case design this link existence of the necessity and significance, regardless of the test case design is good or not, the existence of this link to the quality and efficiency of the most basic promotion role.

  So why should we do the test case design?

 first, the test case design ability is good or bad, directly affect the developer of our first impression of good or bad. For example, how do we evaluate a good developer?

1, coding good, fewer bugs

2, thinking rigorous, smooth communication, a sense of responsibility ...

Empathy, how do developers generally evaluate a good tester?

1, case coverage is high, leakage test less

2, thinking rigorous, smooth communication, a sense of responsibility ...

So, testers can not write good test cases, just as developers write bad code, a bit lost Wannna, but often a lot of testers are not aware of this, including I met a lot of five or six years of senior testers, test case design ability is very general, posture but the old high, here do not say. I want to express that, after all, test case design is a basic course, whether it is to test the recruits veteran, did not learn solid are recommended to learn again.

  second, the test case design is directly related to the most fundamental test quality and testing efficiency of the pros and cons. Why do you say, from the quality point of view, good test case design is the need to go through the design layer stripping analysis according to requirements, the development of design logic in-depth understanding to construct, so its test point mining is often deeper, the scene is more complete, the probability of the occurrence of leakage test is also lower. From the point of view of efficiency, the high quality test design that is done before the developer is tested, in the test execution phase, it is not necessary to bother to construct the design, after executing the test case according to plan, then the test of this requirement is basically completed.

  2.what? What is the commonality of a good test case design?

This is actually a matter of opinion, different testers have different test design style, here we disagree. The common characteristics of good test case design are as follows:

(1) The test design structure is reasonable and organized. The organization of test cases is the starting point for testing, and a good organization can help us quickly navigate to the part we want to focus on, which is related to the ongoing development of the testing effort.

(2) The test case design is comprehensive and non-redundant, describes a test case in a streamlined language, and describes clearly the requirements test point coverage with fewer test cases.

(3) The test case design has the characteristics of executable, can be judged, reproducible, that is, in accordance with the test premise, each test case can be executed smoothly according to the test steps, and the corresponding expected results are presented, and the test cases should be the same as the results of multiple executions.

In addition, when writing test cases, it is recommended from sketchy to gradual refinement, first write the basic function points, and then gradually increase the details, avoid premature fall into the details of the description. At the same time Test design granularity to moderate, according to the actual project test efficiency and effect to balance, too coarse too thin is not suitable.

  3. Mobile Test Design-comprehensive organization of testing for problem discovery

The test of mobile client platform, on the basis of traditional software testing, has its own outstanding characteristics. For example, the client platform is diversified, the system fragmentation problem is outstanding, and the flexibility is very high, so it is not enough to keep the test in the basic function and the traditional idea of the test organization, to ensure the mobile client testing comprehensiveness.

Traditional use case organization way, such as equivalence class division, boundary value analysis, causality analysis, and so on, is more from the premise that if the test case is streamlined, to ensure that the test is comprehensive, to minimize redundancy. Now we recommend the organization of a test for problem detection, that is, the distribution of the bug that corresponds to the corresponding test content, so as to achieve a comprehensive test of the organization way.

 3.1 basic– basic function test

For the application of the test to achieve the basic ability, in the organization of testing cases, the main can be through functional stratification, step-by-step refinement, draw a sketch, and then write the way writing. The function diagram analysis method and causality diagram analysis method are mainly used.

The basic function test can be called general function implementation test, this part can not completely consider the implementation of good or bad (such as the speed of reading files), regardless of special input and output, regardless of special interruption, regardless of special environment. When we organize use cases, we consider separating the basic functional test points from other special test content because, according to our experience, we tend to think that the basic ability in general is usually guaranteed to be complete after a full round of testing, After the problem is generally in the basic ability to achieve the basis of the special situation. So the organization of use cases, in favor of our later, appropriate cutting test cases, will be more testing focus on the problem prone parts, and basic functions can basically be covered by the inspection of special conditions.

  3.2 boundary– Boundary Analysis test

Based on the basic functions, the effects of various input and output are considered. Generally, basic functions are prone to problems near the boundary. The equivalence class partitioning method and boundary value analysis method are used. The use case organization can comb the basic functional sketches that have been produced and determine which parts have boundary problems. and constructs the test case, carries on the test work.

Such as:

    • Boundary type numeric size, the range of values entered

    • String length, null-max-max+1

    • Content is not

    • Support or not, (reserved characters, special characters, unplanned characters.)

  3.3 memory– Storage Test

The main test involves reading and writing the storage space. The biggest problem is memory leaks (leak).

In the test case organization, the main consideration is which parts are prone to memory problems. In particular, mobile clients are prone to problems:

    • For example, rotating the screen-in response to the G sensor, the screen needs to be re-loaded, re-loaded page may occur memory can not be released problems. Mobile clients are relatively unique.

    • Continuous Load page

    • Open multiple Windows-more typical, such as a browser

    • Apply multiple calls to each other-application calls between calls, call passing between, there may be problems, in addition to pay special attention to "re-entry", the so-called re-entry, refers to an application of a called the application B, but application B can again call application A, such as message editing when inserting a picture can be called camera, After shooting, camera can not directly return to the Message editor window, but by clicking Share-message, re-enter the message editor, resulting in a loop stack overlay, but also prone to memory problems.

    • Multi-Threaded Download

  3.4 performance– Performance Test

Response speed, resource occupancy, traffic consumption, CPU occupancy testing needs to be compared to benchmark, and the basis and benchmark of the comparison to determine the performance of the tested application, and another reference is we in the project phase of certain core content of the expectations, or user subjective feelings. In the early stage of the project, select the appropriate competition, select the core use case. The so-called core use case is based on a user's habits, research feedback summarizes those core data is User care. For example, a navigation product, the location of the average error will have a user experience acceptable range, the optimization of the path results will have a subjective feeling and so on. In the test execution, should not completely rely on subjective feelings, the repair of the expected lack of clear goals. For example, we think that the first page of a product is very slow, how fast is what we expect, this need we clear.

 3.5 stress– Pressure test

Can be easily understood as the basic function of the lifting load, speed, throughput and other performance indicators. In general, mobile clients are covered by test tools such as monkey, and tests such as recording playback tools are implemented to achieve stress testing.

  3.6 capability– Compatibility test

A compatibility test is a test that tests software that runs well on a particular hardware platform, between different application software, on different operating system platforms, and in different networks. To put it simply, compatibility testing refers to testing a newly developed software in a particular environment with a variety of software coordination, the software can be very good operation.

  Common compatibility test items for mobile clients

    • Network compatibility test (different carrier 3g,4g, WIFI, weak network)

    • Operating system compatibility Test (android>=2.3, IOS >=7.0)

    • ROM type compatibility (mainstream vendors such as Apple, Huawei, Xiaomi, Meizu, oppo, etc.)

    • Resolution compatibility Test (various resolutions)

    • Data compatibility (compatible with data between different versions)

    • Others may involve mobile client compatibility test items

    • Bluetooth device Compatibility Test (if it's a Bluetooth-enabled app)

    • Memory card compatibility test (e.g. File Manager)

    • Third-party software compatibility conflicts (such as input conflict)

 3.7 interrupt– Interrupt function test

The current tested application interrupts the current function execution state by another application. In the case organization, the system interrupts are primarily considered when performing an operation, such as:

    • Call

    • Sms

    • Alarm clock Reminders, calendar reminders, Bluetooth reminders

    • Plug and unplug data cable, plug-in headphones

    • Standby, lock screen

    • Low battery alert

 3.8 interaction– Interactive Function test

Applications and calls between applications, and no application-level calls exist, but there is a lower level of resource looting and public. Like what:

    • Page occupancy

    • Memory consumption

    • Audio resource occupancy

    • Video resource occupancy

Mobile app test case design hands-on experience (reprint)

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.