---
# System prepended metadata

title: Black Box Techniques Examples
tags: [ISTQB, SQA, Software Testing, Black Box Testing Tech]

---

# Black Box Techniques Examples

###### tags: `ISTQB` `Software Testing` `SQA` `Black Box Testing Tech`

## Examples of "State Transition Testing"
### IGMP router state
#### transition diagram
![](https://i.imgur.com/ru1nP22.png)
:::info
右方的Loop
event is gen. query timer expired
action is send general query, set gen. q.timer
如果是null的狀況，會是有event 但 state 沒有變化也沒有任何action
:::


| state/event | gen. query timer expired | query received from a router with a lower IP | other querier present timer expired | House Keeping |
| ----------- | ------------------------ | -------------------------------------------- | ----------------------------------- | --- |
| Initial     | null                     | null                                         | null | state=Querier. Send gen. query & set initial gen quert timer |
| Querier     | state = Querier. Send gen. query, set gen. query timer          | state=non-Querier                                      | null | null |
| Non Querier | null                         |  sate=non-Querier                                            |  state=Querier                                   |     |
![](https://i.imgur.com/nkpcyZJ.png)
#### Test Case
- pre-condiction
    - IGMP is enabled
    - Router State
- IO
- 


| Column 1 | Column 2 | Column 3 |
| -------- | -------- | -------- |
| Text     | Text     | Text     |

:::danger
:question: 
1.在ST中一格是一個Test case or test condition
2.PASS Fail 是由 expected result 還是 postcondition 判斷
:::
:::success
在Advance的文件中，Test Case分High Level與Low Level，所以目前共識是"可以是Test case也可以是test condition"
:::

:::success

查完2個關於ISTQB對這個部分的討論，目前認為這兩個定義上是分開來的，一個專注於行為，一個專注於狀態。
- postcondition描述的是這件事情執行後的系統狀態
- expected result描述的是這件事情執行後的預期行為

因此我覺得要看我們測試的結果，究竟要檢查的**是行為還是狀態**
- 如果我們要檢查的是狀態，那expected result = postcondition我覺得合理
- 如果要檢查的是行為，那expected result跟postcondition本來就是拆開的兩件事情


**結論：**
Passed or Failed判定的條件使用的是expect result from ISTQB Glossary
:::

:::success
Test basis: Test condition of soruce
Test oracles: Expected result of source

![](https://i.imgur.com/IQVykSA.png)

:::

:::danger
:question: Pre-condition是否要包含environment
:::

###
- Querier state (Only v2)
![](https://i.imgur.com/AVApUi1.png)

- Non-Querier state
![](https://i.imgur.com/N8x69FU.png)





