Стратегии тестирования

Содержание

Слайд 2

Specification-based or Black-box Techniques Метод чёрного ящика (blackbox|closedbox|specification-based testing) — у

Specification-based or Black-box Techniques
Метод чёрного ящика (blackbox|closedbox|specification-based testing) — у тестировщика

либо нет доступа к внутренней структуре и коду приложения, либо недостаточно знаний для их понимания, либо он сознательно не обращается к ним в процессе тестирования.
Тестировщик концентрируется на том, что делает программное обеспечение, а не как он это делает.
Слайд 3

Structure-based or White-box Techniques Метод белого ящика (whitebox|openbox|clearbox|glassbox testing) — у

Structure-based or White-box Techniques
Метод белого ящика (whitebox|openbox|clearbox|glassbox testing) — у тестировщика

есть доступ к внутренней структуре и коду приложения, а также есть достаточно знаний для понимания увиденного. Некоторые авторы склонны жёстко связывать этот метод со статическим тестированием, но ничто не мешает тестировщику запустить код на выполнение и при этом периодически обращаться к самому коду.
Слайд 4

Grey-box testing Метод серого ящика (graybox testing) — комбинация методов белого

Grey-box testing
Метод серого ящика (graybox testing) — комбинация методов белого ящика

и чёрного ящика, состоящая в том, что к части кода и архитектуры у тестировщика доступ есть, а к части — нет. Обычно говорят о методах белого или чёрного ящика в применении к тем или иным частям приложения, при этом понимая, что «приложение целиком» тестируется по методу серого ящика.
Слайд 5

White-box

White-box

Слайд 6

Black-box

Black-box

Слайд 7

Equivalence Partitioning Эквивалентное разбиение (equivalence partitioning) - техника тестирования, направленная на

Equivalence Partitioning

Эквивалентное разбиение (equivalence partitioning) - техника тестирования, направленная на сокращение

количества разрабатываемых и выполняемых тест-кейсов при сохранении достаточного тестового покрытия. Основывается на предположении, что входы и выходы компонента могут быть разделены на классы, которые, в соответствии со спецификацией компонента, будут обрабатываться компонентом аналогично. Таким образом, результат тестирования одного значения из класса эквивалентности покрывает весь класс.
Слайд 8

Equivalence Partitioning In a system designed to work out the tax

Equivalence Partitioning

In a system designed to work out the tax to

be paid:
An employee has £4000 of salary tax free.
The next £1500 is taxed at 10%.
The next £28000 after that is taxed at 22%.
Any further amount is taxed at 40%.
To the nearest whole pound, which of these groups of numbers fall into three DIFFERENT equivalence classes?
A £28000; £28001; £32001.
B £4000;£5000;£5500.
C £4000;£4200;£5600.
D £32001;£34000;£36500.

X≤ £4000 → 0%
£4000 < X ≤ £5500 → 10%
£5500 < X ≤ £33500 → 22%
X > £33500 → 40%

Слайд 9

Equivalence Partitioning Given the following specification, which of the following values

Equivalence Partitioning

Given the following specification, which of the following values for

age are in the SAME equivalence partition?
If you are less than 18, you are too young to be insured.
Between 18 and 30 inclusive, you will receive a 20% discount.
Anyone over 30 is not eligible for a discount.
A 29, 30, 31
B 17,29, 31
C 18, 29, 30
D 17,18,19.

X< 18 → 0%
18 ≤ X ≤ 30 → 20%
X > 30 → 0%

Слайд 10

Boundary Value Analysis Тестирование на основе граничных условий (boundary value analysis)

Boundary Value Analysis

Тестирование на основе граничных условий (boundary value analysis) –

это техника проверки ошибок на границах классов эквивалентности. Если техника анализа классов эквивалентности ориентирована на тестовое покрытие, то эта техника основана на рисках. Эта техника начинается с идеи о том, что программа может сломаться в области граничных значений.
Слайд 11

Boundary Value Analysis In a system designed to work out the

Boundary Value Analysis

In a system designed to work out the tax

to be paid:
An employee has £4000 of salary tax free.
The next £1500 is taxed at 10%.
The next £28000 after that is taxed at 22%.
Any further amount is taxed at 40%.
To the nearest whole pound, which of these is a valid Boundary Value Analysis test case?
A £32001
B £28000
C £1500
D £33501.

X≤ £4000 → 0%
£4000 < X ≤ £5500 → 10%
£5500 < X ≤ £33500 → 22%
X > £33500 → 40%

Слайд 12

Decision Table Testing R00101 For females less than 65 years of

Decision Table Testing

R00101 For females less than 65 years of age,

the premium is $500
R00102 For males less than 25 years of age, the premium is $3000
R00103 For males between 25 and 64 yrs of age, the premium is $1000
R00104 For anyone 65 years of age or more, the premium is $1500
Table 1 – Causes and Effects
Слайд 13

Decision Table Testing

Decision Table Testing

Слайд 14

Decision Table Example 1 What is the expected result for each

Decision Table Example 1

What is the expected result for each of

the following test cases?
A.TC1: Fred is a 32 year old smoker resident in London
B.TC3: Jean-Michel is a 65 year non-smoker resident in Paris
Слайд 15

Decision Table Example 2 What is the expected result for each

Decision Table Example 2

What is the expected result for each of

the following test cases?
A. Frequent flyer member, travelling in Business class
B. Non-member, travelling in Economy class
Слайд 16

State Transition Testing Which test case is the minimum series of

State Transition Testing

Which test case is the minimum series of valid

transitions to cover every state?
a. SS-S1-S2-S4-S1-S3-ES
b. SS-S1-S2-S3-S4-ES
c. SS-S1-S2-S4-S1-S3-S4-S1-S3-ES
d. SS-S1-S4-S2-S1-S3-ES
Which of the following represents an INVALID state transition?
A S3 from State S2.
B S4 from State S3.
B S2 from State S1.
D  ES from State S3.
Слайд 17

Statement Testing and Coverage In general a statement should be an

Statement Testing and Coverage

In general a statement should be an atomic

action, that is a statement should be executed completely or not at all. For instance:
IF a THEN b ENDIF
 is considered as more than one statement because b may or may not be executed depending upon the condition a.
Consider, the following C code:
a; if (b) { c; } d;
Any test case with b TRUE will achieve full statement coverage. Note that full statement coverage can be achieved without exercising with b FALSE.
Слайд 18

Statement Coverage Example READ A READ B READ C IF A>C

Statement Coverage Example

READ A
READ B
READ C
IF A>C THEN
IF A>B THEN
PRINT “A "
ELSE

PRINT “B"
ENDIF
ENDIF
PRINT “C”

Read A

Read B

Read C

Print A

Print B

No

Print C

TC 1: A>C, A>B
TC2: A>C, A

Слайд 19

Decision Testing and Coverage Decision coverage: The percentage of decision outcomes

Decision Testing and Coverage

Decision coverage: The percentage of decision outcomes that

have been exercised by a test suite.
Consider, the following C code:
a; if (b) { c; } d;
Full decision coverage should include b FALSE.