English 中文(简体)
Software Testing Dictionary

A

B

C

D

E

F

G

H

I

K

L

M

N

O

P

Q

R

S

T

U

V

W

Useful Resources

Selected Reading

Basis Path Testing
  • 时间:2024-03-21 06:05:54

Basis Path Testing


Previous Page Next Page  

What is Basis Path Testing?

用于设计测试案例的实验室技术、结构化测试或白色检测箱技术,旨在至少检查所有可能的执行途径。 为所有可能的道路建立和实施测试,可达到100%的覆盖率和100%的分支覆盖率。

Example:

Function fn_delete_element (int value, int array_size, int array[])
{
	1 int i;
	location = array_size + 1; 

	2 for i = 1 to array_size
	3 if ( array[i] == value )
	4 location = i;
	 end if;
	 end for;

	5 for i = location to array_size
	6 array[i] = array[i+1];
	end for;
	7 array_size --;
} 

Steps to Calculate the independent paths

Step 1 : 摘录正在审议的职能/方案流程图如下:

Basis Path Testing in Test Life Cycle

Step 2:Determine the independent paths.

Path 1:  1 - 2 - 5 - 7 
Path 2:  1 - 2 - 5 - 6 - 7 
Path 3:  1 - 2 - 3 - 2 - 5 - 6 - 7
Path 4:  1 - 2 - 3 - 4 - 2 - 5 - 6 - 7
Advertisements