ISTQB FOUNDATION 4.0 | Tutorial 33 | State Transition Testing | Test Case Design Techniques | CTFL

TM SQUARE
30 Jan 202411:55

Summary

TLDRThis tutorial delves into state transition testing, a blackbox technique for analyzing software requirements with control flows or state definitions. It emphasizes the use of state transition diagrams (STDs) to visualize system states and valid transitions, excluding invalid ones. The instructor illustrates how to identify valid and invalid transitions to derive comprehensive test cases, using examples like a bank card PIN entry system and the states of water. The video aims to prepare viewers for ISTQB Foundation level certification, focusing on understanding the technique rather than memorization, with sample exam questions to solidify the concepts.

Takeaways

  • 📚 The tutorial is focused on ISTQB Foundation level certification, specifically chapter 4.2 on blackbox test techniques.
  • 🔍 The last technique discussed in the chapter is State Transition Testing, which is used for requirements with control flow or defined states and transitions.
  • 🔑 State Transition Testing is applicable for transactional or functional requirements where actions lead to the next state of an application.
  • 💡 An example given is accessing an account which involves swiping a card and entering a PIN, with different outcomes based on the number of incorrect attempts.
  • 📈 Straight Transition Testing is a technique used to visually represent requirements and derive the minimum number of test cases.
  • 📊 State Transition Diagram (STD) is a key tool in State Transition Testing, showing all valid transitions between states without invalid transitions.
  • 🚫 Invalid transitions are not displayed in the STD, but they can be identified by missing pairs of transitions between states.
  • 🔑 The technique involves identifying valid and invalid transitions to ensure full test coverage, including both valid and invalid test cases.
  • 📝 At the Foundation level, exam questions will provide diagrams and ask about valid and invalid test cases based on those diagrams.
  • 📑 The tutorial also provides examples of exam questions to illustrate what candidates can expect and how to approach them.
  • 🎓 The importance of understanding the concepts behind State Transition Testing is emphasized, as it is not just for passing the exam but also for practical application.

Q & A

  • What is the main focus of the tutorial in the provided script?

    -The tutorial focuses on the ISTQB Foundation level certification, specifically discussing state transition testing, which is a blackbox test technique used to analyze requirements with control flow or state transitions.

  • What is state transition testing?

    -State transition testing is a technique used to exhibit the various states of a scenario or system and display the possible transitions between them. It is typically represented using a state transition diagram (STD), which shows all valid transitions and helps in deriving test cases.

  • What is a state transition diagram (STD)?

    -A state transition diagram (STD) is a pictorial representation that shows the various states of a system or scenario and the valid transitions between them. It does not display invalid transitions, which are identified by missing pairs of transitions between states.

  • How are invalid transitions identified in state transition testing?

    -Invalid transitions are identified by looking for missing pairs of transitions between two states in the STD. If a transition is not represented in the diagram, it is considered invalid and is not part of the system's behavior.

  • What is the purpose of using straight transition testing?

    -Straight transition testing is used to understand and deflect the requirements into a pictorial way, which helps in deriving the minimum number of test cases that cover both valid and invalid transitions.

  • Can you provide an example of state transition testing from the script?

    -An example given in the script is an ATM machine where entering a correct PIN on the first attempt takes you to the main menu, while incorrect attempts allow for two more tries, after which the card is rejected and further access is denied.

  • What is the significance of valid and invalid test cases in state transition testing?

    -Valid test cases ensure that the system behaves as expected for all possible transitions, while invalid test cases verify that the system correctly handles transitions that should not occur, thus ensuring the system's robustness and reliability.

  • How does the tutorial suggest approaching exam questions related to state transition testing?

    -The tutorial suggests that exam questions will provide a state transition diagram, and candidates should read the diagram to identify valid and invalid transitions and answer questions based on that information.

  • What are some of the characteristics of state transition testing discussed in the tutorial?

    -Some characteristics discussed include the use of an STD to represent valid transitions, the identification of invalid transitions by missing pairs, and the application of this technique to derive comprehensive test cases.

  • How does the tutorial explain the process of deriving test cases from a state transition diagram?

    -The tutorial explains that by examining the STD and identifying all valid transitions (represented by arrows) and invalid transitions (missing pairs of arrows), one can derive a comprehensive set of test cases that cover all possible scenarios.

  • What is the difference between state transition testing at the Foundation level and the advanced level, as mentioned in the tutorial?

    -At the Foundation level, candidates are expected to interpret given diagrams and answer questions about valid and invalid transitions. At the advanced level, candidates may be asked to draw the diagrams themselves and then derive the number of test cases.

Outlines

00:00

📚 Introduction to State Transition Testing

This paragraph introduces the concept of state transition testing, a blackbox testing technique used for analyzing software requirements with control flow or state definitions. It explains that this technique is particularly useful for applications where actions can lead to different states, such as a banking application requiring a card swipe and PIN entry. The paragraph uses the example of a PIN entry system to illustrate how state transition testing works, emphasizing the importance of understanding the transitions between states and the creation of test cases based on valid and invalid transitions. The technique of straight transition testing is mentioned as a method to visualize requirements and derive the minimum number of test cases.

05:01

🔍 Characteristics and Techniques of State Transition Testing

The second paragraph delves into the characteristics of state transition testing, focusing on the use of state transition diagrams (STDs) to represent the various states of a system and the transitions between them. It clarifies that STDs only show valid transitions, excluding invalid ones, and discusses how to identify invalid transitions by looking for missing pairs in the diagram. The paragraph provides a hypothetical example with three states (S1, S2, S3) to demonstrate how to determine valid and invalid transitions, resulting in a total of six test cases, four valid and two invalid. It also touches on the expectations of the ISTQB Foundation level certification exam, which involves reading and interpreting diagrams rather than creating them.

10:03

📝 Sample Exam Questions and Understanding State Transition Testing

The final paragraph presents sample exam questions to illustrate how state transition testing concepts might be applied in a real-time scenario. It uses the analogy of a water cycle to explain the technique further and then discusses how to identify valid and invalid test cases based on a given state transition diagram. The paragraph emphasizes the importance of understanding the technique and its application in deriving test cases, rather than merely memorizing for an exam. It also mentions that while the Foundation level exam will not require drawing diagrams, the advanced level will, and encourages viewers to grasp the underlying concepts for practical application.

Mindmap

Keywords

💡ISTQB Foundation Level Certification

ISTQB Foundation Level Certification is an international qualification for software testers, indicating a fundamental understanding of software testing principles and practices. In the video, this certification serves as the context for discussing test analysis and design techniques, emphasizing the importance of foundational knowledge for those pursuing a career in software testing.

💡Test Analysis and Design

Test analysis and design is the process of examining the software requirements and designing test cases to ensure the software meets those requirements. The video focuses on this process, particularly on blackbox testing techniques, which are methods used to test software functionality without knowledge of its internal workings.

💡Blackbox Test Techniques

Blackbox test techniques are a set of strategies used to test software where the tester does not need to understand the internal code or structure of the application. The video script discusses one such technique, state transition testing, as part of the broader category of blackbox testing methods.

💡State Transition Testing

State transition testing is a blackbox testing technique used to verify that an application correctly transitions between different states in response to user inputs or other stimuli. The script uses the example of a bank card PIN entry system to illustrate how this technique can be applied to test the transitions between states like correct PIN entry, incorrect attempts, and card rejection.

💡Control Flow

Control flow refers to the order in which individual statements, instructions, or function calls of an algorithm are executed. In the context of state transition testing, control flow is important for defining the transitions between different states within a system, as discussed in the video.

💡State Transition Diagram (STD)

A State Transition Diagram (STD) is a graphical representation used to illustrate the various states of a system and the transitions between them. The video explains that STDs are a key tool in state transition testing, helping testers visualize and understand the valid transitions that should occur within the software being tested.

💡Valid Transitions

Valid transitions are the permissible movements from one state to another within a system, as defined by the requirements. The video script emphasizes the importance of identifying valid transitions in an STD to ensure that test cases cover all possible correct behaviors of the software.

💡Invalid Transitions

Invalid transitions are movements between states that should not occur according to the system's requirements. The video uses the concept of invalid transitions to explain how testers can identify potential edge cases and ensure that the software behaves correctly even when unexpected inputs or actions are performed.

💡Straight Transition Testing

Straight transition testing is a specific approach within state transition testing that focuses on identifying and testing the direct transitions between states. The script mentions this technique as a way to derive the minimum number of test cases needed to cover all valid and invalid transitions.

💡Test Cases

Test cases are sets of conditions or variables under which a tester evaluates a software's behavior to determine if it is correct. The video script discusses how to derive test cases from state transition diagrams, emphasizing the need to cover both valid and invalid transitions to ensure comprehensive testing.

💡Pictorial Representation

Pictorial representation in the context of the video refers to the visual depiction of concepts, such as state transition diagrams, to aid understanding and analysis. The script uses the term to describe how visual tools can help testers to better comprehend the system's behavior and design effective test cases.

Highlights

Introduction to ISTQB Foundation Level Certification tutorial focusing on Test Analysis and Design.

Exploring Blackbox Test Techniques, specifically State Transition Testing.

Understanding State Transition Testing through the context of control flow and state transitions in requirements.

The importance of pictorial representation for requirements using State Transition Diagrams (STD).

Explanation of how to identify valid and invalid transitions in a State Transition Diagram.

The significance of not displaying invalid transitions in STD for maintaining system behavior integrity.

Technique of Straight Transition Testing for deriving minimum number of test cases.

Illustration of State Transition Testing with a real-world example of a bank account access system.

Detailed walkthrough of a hypothetical State Transition Diagram with three states, S1, S2, and S3.

Identification of valid and invalid transitions in the example diagram and their implications for testing.

Explanation of how missing transitions in the diagram indicate invalid test cases.

Foundation Level examination expectations regarding reading and interpreting State Transition Diagrams.

Sample exam questions to demonstrate the application of State Transition Testing in a testing scenario.

Discussion on how to approach exam questions involving identifying valid and invalid test cases from a diagram.

Use of a water state transition example to clarify the concept of valid and invalid transitions.

The importance of understanding the technique's practical application beyond just passing the exam.

Encouragement for continuous learning and application of the State Transition Testing technique.

Transcripts

play00:00

Hello friends and greetings for the day

play00:02

welcome back to another tutorial on

play00:03

istqb Foundation level certification we

play00:06

are in chapter 4 talking about test

play00:09

analysis and design and continuing ahead

play00:11

with our same segment that is 4.2

play00:14

blackbox test techniques and as a part

play00:16

of today's tutorial we'll be talking

play00:18

about the last technique under this

play00:19

category that is State transition

play00:28

testing

play00:33

well when it comes to the state

play00:34

transition testing of course this is one

play00:36

of its kind again just like decision

play00:38

table testing here we talk about the

play00:40

requirements which has any sort of

play00:42

control flow involved or have a

play00:45

definition between the different states

play00:47

and the transitions possible so mainly

play00:49

the requirements can be defined in terms

play00:51

of transactional way or functional way

play00:54

where uh an action can be taken to the

play00:57

next state of the application where

play00:58

there are only possible ways to reach

play01:00

out a point in simple words if I have to

play01:03

say for example in order to access your

play01:05

account you will have to swipe in your

play01:07

card enter the pin but entering the pin

play01:10

could be a little tricky thing right you

play01:12

can enter the pin right in very first

play01:14

attempt and you'll be taken to the main

play01:16

menu option if in case your uh first pin

play01:19

attempt is wrong the loop will continue

play01:21

there and you will be allowed to do two

play01:23

more attempts uh if in case wrong and

play01:26

third attempt it will just reject your

play01:28

card and at the same time you will not

play01:29

be able to continue further so in this

play01:32

case to understand and deflect this

play01:34

requirement into a pictorial way and

play01:37

then derive the minimum number of test

play01:38

cases we make use of a technique called

play01:40

as straight transition testing so I do

play01:43

understand again theoretically it could

play01:44

be very difficult to make out things but

play01:46

of course when it comes to the reality

play01:48

with some examples it would make more

play01:50

sense so yes let's quickly have a look

play01:52

on what state transition testing is

play01:54

trying to let us know about its

play01:56

characteristics and the technique and

play01:58

let's see how the sample exam question

play01:59

questions would look like and what we

play02:01

have to answer so the very first thing

play02:03

here to talk about State transition

play02:05

testing is it basically exhibits the

play02:08

various states of a scenario or system

play02:11

and displays the possible transitions

play02:15

between them now the most important

play02:17

thing here to understand is that state

play02:19

transition testing is done with help of

play02:22

State transition diagram which is

play02:24

basically a pictorial representation and

play02:27

it displays the various states of the

play02:29

system or a scenario and only the

play02:32

possible transitions between them the

play02:34

reason when we say possible transitions

play02:36

only is just because the invalid

play02:37

transitions should not be displayed

play02:40

because if it is displayed it becomes

play02:42

valid right let's have a look again so

play02:44

when we talk about the state transition

play02:46

diagram that's what is the exhibition of

play02:49

this pictorial representation however

play02:51

the technique is called as state

play02:53

transition testing now an STD certainly

play02:56

shows all valid transitions only so it

play02:59

does not represent any invalid

play03:00

transition however there is a way to

play03:03

figure out what are the invalid

play03:04

transitions so that you can derive full

play03:06

coverage that is valid plus invalid test

play03:08

cases right so how to do that so in case

play03:12

when we talk about the STD it consists

play03:14

of a pair of transition between two

play03:16

states just like in the diagram below so

play03:19

if you see this is just a hypothetical

play03:21

example uh we have three different

play03:23

states S1 S2 S3 now in this case S1 uh I

play03:27

can go from S1 to S2 S2 to S3 and same

play03:30

way I can come back from S3 to S2 and S2

play03:33

to S1 so there are four transitions on

play03:36

the picture right here and uh four of

play03:38

them are valid the all four a b c d all

play03:42

the four are valid here now in this case

play03:44

we totally understand that the there are

play03:47

four transitions which are actually

play03:48

possible as per the given scenario you

play03:50

may certainly have a question that why

play03:52

I'm not going from S1 to S3 that's also

play03:54

possible no that's your prediction you

play03:56

have to go as for the requirement if

play03:58

requirement says the user should not be

play04:00

able to go from S1 to S3 directly then

play04:02

that becomes invalid for you that's the

play04:04

behavior right you are still in blackbox

play04:06

testing techniques so in this case

play04:08

that's how you identify that what are my

play04:10

invalid test cases but to make it more

play04:13

technical from the require technique

play04:15

point of view of course the technique

play04:17

says uh STD should consist of pair of

play04:20

transition between any two states so S1

play04:23

to S2 you can see there is a pair like a

play04:25

and d so it goes S1 to S2 S2 to S1 same

play04:29

way between S2 and S3 you have pair of

play04:31

transitions onward and return but

play04:35

between S1 and S3 the pair is missing

play04:37

and that's how you identify the number

play04:39

of invalid test cases so if the pair is

play04:42

missing between two sites then the

play04:44

missing transition or transitions is or

play04:47

are called as invalid transitions so

play04:49

it's not necessary that both the

play04:51

transitions may be missing in all the

play04:53

cases sometimes just one will be missing

play04:55

one will be there so only the missing

play04:57

transitions are referred to as invalid

play04:59

valid so in our below example the

play05:01

diagram here the S1 to S2 and S3 a b c d

play05:05

are four valid and two invalid because

play05:08

S1 to S3 and S3 to S1 is not picturized

play05:11

here imagining or understanding us that

play05:14

it is invalid so in that context we have

play05:16

six test cases and U four valid two

play05:20

invalid however that's not what they

play05:22

will be asking you to do in the

play05:23

examination at Foundation level at

play05:25

Foundation level they expect you to read

play05:26

the diagram and based on that pick up

play05:28

the right options what they ask you

play05:30

about so they can ask you questions

play05:32

about the test cases they can ask you

play05:33

the questions about the characteristics

play05:35

what we have dis displayed here on the

play05:37

screen uh and discussed about that so

play05:40

let's quickly take up some sample

play05:41

questions from here but before that

play05:43

another quick example to talk about that

play05:45

what a streight tation diagram could be

play05:47

all about so talking about a quick

play05:50

example here so if you see uh this is

play05:53

how exactly the technique works so a

play05:55

street transition diagram for a water is

play05:57

being considered and again I'm not not

play05:59

talking about literally something in

play06:01

different conditions you may come up and

play06:03

say that oh you know we can talk about

play06:05

dry ice and that can go to Vapors

play06:07

directly so let's keep it simple and

play06:09

static because we talking about

play06:11

techniques not talking about how to test

play06:14

water and dry ice okay so taking that

play06:17

into account if you see ice uh I can

play06:20

heat it and get the water then water I

play06:23

can boil it and I get it the vapor a

play06:25

vapor I can condensate and get water

play06:27

back and if I freeze water I get get ice

play06:30

back but in this case again the four

play06:32

valid transitions are only possible the

play06:34

other two that is ice to vapor and Vapor

play06:36

to ice in normal conditions are not at

play06:38

all possible Right in that context we

play06:41

don't draw that's the reason I have just

play06:42

pictorially presented in a black color

play06:45

bigger arrows just to say that hey these

play06:47

are not actually there but just to

play06:49

display in order to talk about I'm

play06:51

presenting it okay so it's that these

play06:53

are just two invalid uh test cases and

play06:56

they generally do not get displayed I

play06:59

displayed because I wanted to talk about

play07:01

it okay so these two are invalid and a b

play07:04

c d are the valid transition however we

play07:06

draw a table like this and that's how we

play07:08

get our test cases from the scenario so

play07:11

let's take some exam questions to

play07:13

understand what could be expected in the

play07:15

real time

play07:17

scenario so right here if you notice we

play07:19

got uh very first question to talk about

play07:22

question says based on the given State

play07:24

transition diagram of a switch which of

play07:27

the following test cases is in valid now

play07:30

invalid is what is the ask here and the

play07:32

most important thing is you have to

play07:34

follow the diagram and understand that

play07:36

if something is not being drawn that

play07:38

means the transition is missing between

play07:40

two states those are the one which are

play07:42

called as invalid so let's have a look

play07:43

at the quick diagram here if you see

play07:45

this is a switch diagram so I have on to

play07:48

off off to on then when I turned it on

play07:51

it got burnt and it became faulty switch

play07:54

and the loop below the fault that is an

play07:57

arrow turning around to The Fault itself

play07:59

is basically a loop that means the

play08:01

faulty switch will remain faulty forever

play08:03

and it will never come back to any other

play08:05

state so that Loop basically represents

play08:07

that so I have S1 S2 S3 but with

play08:09

different names so the question is which

play08:11

one of this is

play08:13

invalid so option A says off to on of

play08:16

course that is in the diagram so it is

play08:18

valid that means a user can do that on

play08:20

to off is possible a user can certainly

play08:23

uh turn off a switch C fault to on of

play08:27

course fault to on is not displayed here

play08:29

here so at any point of time based on

play08:31

the given information that's a invalid T

play08:34

case Okay false to on is not displayed

play08:37

so it is invalid there's no return path

play08:39

as for the diagram and the option D says

play08:42

onto fault which is obviously written

play08:44

there so it's a line representing

play08:46

between on and fault so it is a valid

play08:48

transition so put together the right

play08:51

answer here is D sorry C that is Fault

play08:54

to on is not a valid test case which

play08:57

means invalid let's also look at one

play09:00

more example here which would give you

play09:02

double confidence to be sure that what

play09:03

other types of questions can be asked so

play09:05

additionally one more point to add here

play09:07

that the pictures will be represented

play09:09

always in the examination questions and

play09:10

then they will be asking you questions

play09:12

so do not forget that you have you don't

play09:14

have to draw the diagram okay they will

play09:16

not not ask you to draw however the same

play09:18

thing will be asked to you in the

play09:19

advanced level in advanced level they

play09:20

will ask you to draw the diagram and

play09:22

then derive the number of test cases but

play09:24

now they will just ask you what is valid

play09:26

what is invalid at this point of time so

play09:29

let's quickly look at the next one and

play09:30

the next question here is talking about

play09:32

similar thing but with different example

play09:35

so given the following straight

play09:36

transition table which of the test cases

play09:39

below will cover the following series of

play09:41

State transitions so series is given to

play09:44

you they want you to go through S1 s0 S1

play09:47

S2 s0 again so if you look at the

play09:50

diagram we have s0 S1 S2 and we have

play09:53

transitions named there that is a b c d

play09:56

so they want to follow S1 to s0 then s 0

play09:59

to S1 S1 to S2 and S2 to s0 so all you

play10:02

have to do is pick up each of these

play10:04

options ABC D and put it on the diagram

play10:07

and see which one is actually fulfilling

play10:09

that Series so if I look at the very

play10:10

first option A says da a b c so okay

play10:14

again S1 to s0 is D that's true s0 to S1

play10:18

is a S1 to S2 is B and S2 to s0 is C

play10:24

which is absolutely right but let's look

play10:26

at the other options AB C D no AB is

play10:29

correct s0 to S1 S1 to S2 but that's not

play10:32

what they are asking for okay um C they

play10:36

say d a which is also possible but

play10:38

that's not what they're asking because

play10:40

their Series has been clearly defined

play10:42

they want S1 to s0 S1 s0 to S1 and then

play10:45

S1 to S2 and after that S2 to s0 as well

play10:47

so just daab alone will not do it you

play10:50

need the C as well okay and same way

play10:52

with the option d a b c this is also

play10:55

possible as for the diagram but that's

play10:57

not the ask so it's very very important

play10:59

for you to understand what exactly are

play11:02

they asking you and more importantly you

play11:04

need to understand what is the technique

play11:05

all about right what a picture basically

play11:08

defines what these diagrams basically

play11:10

represent and how this adds value Al

play11:13

together towards preparing minimum

play11:15

number of test cases please do not try

play11:17

to do this mathematically try to

play11:20

understand the concepts because you

play11:22

don't just have to pass the exam you

play11:24

have to apply and understand this

play11:25

technique that why are we even using

play11:27

this as a technique right so that should

play11:30

make sense at the end of the day so

play11:31

that's all from this particular tutorial

play11:33

team should you have anything else feel

play11:34

free to comment below I'm always there

play11:36

to address your queries and answer them

play11:37

well till then keep learning keep

play11:39

exploring keep understanding the context

play11:41

thanks for watching the video team and

play11:43

happy

play11:47

[Music]

play11:54

learning

Rate This

5.0 / 5 (0 votes)

Связанные теги
ISTQBTesting TechniquesSoftware QualityState TransitionBlackbox TestingTutorialCertificationTest AnalysisDesign MethodQuality AssuranceExam Preparation
Вам нужно краткое изложение на английском?