Writing test development of test cases

First, the test case definition and content

1 test case definition

 for a particular software product described test tasks, specify the input, expected results and a set of test items of
documentation for execution.
 reflect the test program, methods, techniques and strategies;
 including test objectives, test environment, input data, test steps, expected results, test scripts.

2 test elements

Test test test target must be given, the test object, test condition, and the operation data input step,

Summarized as 5W1H.

 test objectives: Why-- why are they measured? Function, performance, availability, fault tolerance, compatibility, security
full and the like.
 test object: What-- what measure? Tested items, such as object, functions, classes, menu, press
buttons, forms, interfaces, and so the whole system.
 test environment: Where-- Where is measured? In which the test runtime environment, comprising a system feature
set and the set requirements, including the operating system, browser, stand-alone communications protocol or network environments.
 Test premise: When When-- but measured? Or conditions under which precondition limited test run-time
system.
 input data: Which-- those data? In operation, various changes can be accepted by the system data,
such as numbers, characters, and other files.
 steps: How-- How to measure? And implementation of software programs such as the order of the steps. Such as open dialog
box, click the button and so on.

Second, why the need for the test case

 test case is the testers an important reference in the testing process.
 test can help implement effective testing, all tests are performed are meaningful, do not perform cents
meaningless test operation.
Good test  continue to be reused, so that the test process more effective.
 in the development of software products, developers continue to introduce new versions of the original testers need to
have multiple functions regression testing, even in one version, should be 2 to 3 times the return measured
again. These regression testing requires test cases can be reused.
 test is a process of accumulation of knowledge.
 test is a process of knowledge transfer, to be consistent, stable test quality
 From the perspective of project management, the test pass rate is the most important effect of test code quality assurance indicators
one.
 test cases can be used as testers to assess the progress of work and the efficiency of tracking / management test of
the main factors in order to make the test more reasonable arrangements or adjustments.

Third, writing test cases illustrate

1 test case template

Here Insert Picture Description
Here Insert Picture Description
Here Insert Picture Description

2 illustrates writing test cases

No. 2.1 cases / number with

Simple, unique.

2.2 Example illustrates the use

Ø also known as test points, checkpoints, an overview of the test, an overview of the use cases, test instructions;
Ø sentence overview of the test;
Ø can summarizes the test object;
Ø can be represented by interrogative;
Ø can be "checked, verification, test" and other terms (e.g., the default installation verification QQ);
Ø I see this will know best how to test;
Ø unique as possible (decision table described test may be repeated);
Ø use when performing multiple rounds of cases, the next execution probably sooner, if the cases are well written directly to see an overview of the line.

2.3 Initial Conditions

 also known as pre-conditions, preconditions;
 If the initial conditions of a state, but is static, such as the administrator has logged background;
 initial condition is the first step before the state steps, not too far, not written from scratch Last
 many projects do not write preconditions.

2.4 Procedure

Ø If the high requirements for data, the need to separate out the data;
Ø step to have the serial number;
Ø each step separated by a semicolon, and finally with a period;
Ø each step must wrap;
front Ø colon parameters (such as user name: admin );
Ø relates button interface with [], "" and the pair of symbol intervals;
detail with reference to the procedure of Example 4-6 step Ø function;
Ø must be a final step in the operation, the result can not be written.

2.5 Expected Results

Ø is a state;
Ø If the reference document are described, copied over intact; if the document does not specifically required, it is a point to be
induced, there may be several points, such as QQ default installation should be able to start, the default option matching.

2.6 cases state with

 by failure, blockage, is not performed, hold, ... cases ineffective
when  initial conditions fail, the general state of the use case to blocking.
 look at how to implement the use case, what executing the care to be.

2.7 Priority

 execution order with the embodiment.

3 Case

Here Insert Picture Description

Fourth, test case management and review

1 to ensure the quality of the test method

 First, user needs, quality of service requirements, product characteristics have a profound and comprehensive understanding
 Secondly, take the right and appropriate methods of case design;
 Further, according to the template format or standard specification of test cases to write the test use cases;
Ø Finally, examination of the test, evaluation, and also the main effective means to improve the quality test.

2 priority of test cases

2.1 Priority Categories

Here Insert Picture Description

2.2 How to set the priority of test cases

 consideration cost, time, personnel, taking into account the adequacy and efficiency of the test.
 consider affinity with the embodiment.
 consideration by interfering embodiment.

3 points test case review

 The review checklist or checklist (Check List).
 cases "proofreading" with: typos, wrong sentences, the statement does not fluent, meaning is not clear, ambiguous statements,
inconsistent formatting, punctuation inconsistent, mixing, etc. in English.
 quality use cases: missing use cases, redundant use cases, no clear use cases, wrong use cases, use cases and other unpredictable.
 prioritized use cases.
 Planning server and client.
 division performed staffing use cases.
 record review process, record the test environment planning.

4 maintenance of test cases

4.1 reasons

 Under normal circumstances, the test cases need to be updated, there may be several reasons:
 previous test case design is not comprehensive or not accurate enough. With the in-depth testing and product specifications
in-depth study of the book, the understanding of some of the features, characteristics, logic, etc. more and more clear, deep
 discovered serious software defects are not covered by the current test case.
 written test is not standardized or statement error.
 The new version has enhanced demand for new functionality or change existing functionality needs to happen.
 old test cases is no longer applicable, need to be removed.
4.2 test case management tool
Ø Excel
Ø Bugfree
Ø ZenTao
Ø ALM / QC
Ø ...

Fifth, with the design and the preparation method according to summary

1 by testing

 mainly used to verify the system and it needs the same statement, confirm what the software can do at least, generally by analyzing the needs
requirements specification to design test cases.

2 failed test

 purely to undermine the software design and implementation of test cases, test, also known as forcing mistakes. Mainly used to demonstrate "one
systems do not do things that do not need it."
Here Insert Picture Description

3 random test

 also known as improvised test (ad hoc testing), refers to the improvised, impromptu search Bug testing process.
 If you let one million monkeys at one million Jianpanshangqiao million years, they may eventually write Suoshi
Biya drama and other masterpiece.
Shortcoming
 can not measure actual coverage of random testing.
 many tests are redundant.
 because test data is random, it is impossible to repeat the test.

4 application cluster effect

 The more software defects found, indicating that there is more software defects, if found on a large number of boundary conditions in the test
piece defects, the test should focus on the border.
 programmers tend to repair report out of the issue, to ensure that in addition to other problems that may exist will not be out
now.

5 exploratory testing

5.1 Meaning

 thinking is a technical test.
 exploratory testing is a delicate, thoughtful process.
 exploratory testing emphasized the same time test design and test execution.
 testers continuous learning by testing the system under test, while more information about the software system learned
through comprehensive collation and analysis, create more ideas about testing.
 test design, test execution, test log record seems to be insignificant work.
 testers must be completed within the stipulated time according to the test regulations.

5.2 Occasion

 no or only a small amount of valuable documents;
 commonly used under time pressure;
 supplemented by appropriate, formal and formal testing.

6 how to design and prepare Example selecting method

 to use the outline method splitting function;
 use scenario methods, decision table design test cases.
If  combinations described functions of the program contained in the input conditions, should be selected at the outset decision table
method.
 equivalents partitioning method, boundary value analysis, error guessing supplementary test method.
Exploratory testing or random testing when the test .
 perform random testing After the test case.

Published 450 original articles · won praise 286 · views 570 000 +

Guess you like

Origin blog.csdn.net/qq_32146369/article/details/105284818