Software Testing (five)

Test Case
  • What is the test case

Test case is to test a functional test or complete a goal, and prepared a set of test inputs, execution conditions and expected results, in order to test a program to verify whether or path meets a specific demand

  • The advantages of test cases

Avoid blind test, highlight the test focused, targeted to improve the efficiency of testing, reduce project cycle, can be reused, improve work efficiency, but also facilitate the work of assessment test engineer

  • Designed to test case
    1. Effectiveness: The output of different test persons obtained should be consistent
    2. Reusability: Design time requires detailed embodiment
    3. Easy organization: test design time to categorize
    3 may be evaluated: the test is reflected by the code checking quality
    4. manageability: test schedule may be used as tester, as an inspection workload

  • Test Case Description

A standard test case should contain the following

- 标识符 【在当前项目中必须是唯一的】
- 测试项 【要测试的目标】
- 输入说明 【输入的详细步骤】
- 输出说明 【预期输出的结果】
- 环境要求
- 特殊要求
- 用例之间的依赖性
Black box test case design
  • Equivalence partitioning method
    • Effective equivalence class
    • Invalid equivalence class
'''
举个例子:现在有一个程序可以完成0~100的加法运算,我们没有办法进行穷举,这时候我们就会把这个进行一个区间划分:0~100 这个就是有效等价类  小于0 或者 大于100这时候就是无效等价类,在这里取一到两个值就可以代表这整个区域的内容
'''
  • Boundary value analysis
'''
还是上面的例子:常常容易出错的地方就是边缘的地方
比如0,再比如100这个比较特殊值,我们必须要进行验证,通常情况下,我们进行取值的时候,就是
最小临界值,最小临界值-1
最大临界值,最大临界值+1
'''
  • Cause and effect diagram method

When considering the combination between the input conditions, due to the combination of a relatively large number of cases, requires a lot of test cases, this time we can consider the use of cause and effect diagram, cause and effect diagram is to determine the final list generated

  • Driving method determination table
  • Orthogonal experiment
  • French scene
  • Method state of FIG.
  • Random testing method
White-box testing
  • Static white-box testing
    • Code review
    • The code checks
  • Dynamic white-box testing
    • Logic coverage
    • The basic path coverage
    • Cycling coverage
Published 31 original articles · won praise 4 · Views 3499

Guess you like

Origin blog.csdn.net/qq_29074261/article/details/105329625