Hello Friends, There are a lot of people asking me about this topic that what type of question is coming from here. Pls, be aware in the new syllabus (2018) These program-based questions are NO LONGER asked. It's now K2 and only a theory based question will be asked. So, you can IGNORE the understanding of flowcharts based solutions. This video is created in detail for Knowledge purposes only. All the best and Happy Learning!!
Thank you - I do UAT testing for a large US bank and I'm being asked to take the ISTQB exam. My company paid for some online training but I have to admit, your videos are more helpful, especially with the topic of statement coverage.
not usually they repeat questions. But you can find dumps at istqbcertifications.com also these are uploaded by people around the world as ISTQB never releases an official paper outside. Thou you can find two standard sample paper from istqb here www.slideshare.net/jannatindia/
Thank you so much for your guidance and showing us such an easy way to understand these test techniques.. I PASSED the ISTQB Foundation Level Exam this morning, and I owe it to your videos. 😍😍😍
This was really amazing! Thank you so much! God bless you! I just passed my exams because of this video. I am grateful The simplified techniques, the explanation! I recommend these videos!!
in example 3 the flowchart isnt equal to the pseudocode. Either an identation for the third if statement is missing or the flowchart needs to be adapted in a way that the 2 branches after B=0 are coming together before the A>21 statement
Very useful (the black-box techniques are explained in courses such as Udemy ones but the white ones not - unless you read the book and not only the Syllabus). Thank you
Hi, Your videos are very helpful. I just want to point out that in Example 3 there might be an error in the flow chart. This flow chart hasn't taken care of If B 0. If B 0 The logic should go to check If A > 21 or not but your flow chart skip this check.
Hi Dan Chi, Good Catch but I think in the beginning of this tutorials I mentioned that these are pseudo codes and they are provided by the board. We don't have to evaluate the deficiency of code but follow the question and get the answer. Note : this is not a programming certification so they can use any hypothetical example/scenario in their questions as well.
On Example 3, if statement on line 8 should be indented a bit more. It does not wrong but until i notice endif below my mind messed up. I thought it is another if however it is a nested if. Thanks for the review.
Because that is a decision only (this is, when the condition of "A>0" is not true), but there are NO STATEMENTS which depend from this decision to be executed. For instance, when B=0 (Yes/No) there is an action (statement) depending ir the B=0 is "yes" or "no" (the statement is to print a given string). But when "A>0" is not true, then there is no action (statement) to be executed, and that's why it is not counted. Remember this is Statement Coverage, not Decision Coverage.
Hello Sir, thanks for the quality content you are providing. I've a confusion. Please clear my doubt. In Statement Coverage we count the minimum paths that cover all the nodes at least once. 1) For un-nested if else, can we say number of else doesn't matter-> SC will always be 2. 2) For if without else, no matter nested or not -> SC will always be 1. 3) For nested if else, SC will be 1 + (Number of else). Let me know if my understanding is correct. Thanks again for your valuable teachings. Suggestion: there is a correction I think. 7:48, both the print statements of B=0 should point to A>21.
White Box Testing and Symbolic Execution 20 Question (from exam) 1d = b + c; 2if (d > 20) 3a = 3 * a + d; 4if (b < a) { 5 a = 1; 6 if (d < 2 * b) 7 b = 2; 8} 1.Draw program’s Flow Graph 2.Find minimal number of test cases for the following coverage types: a)Statement Coverage b)Path Coverage c)Branch Coverage d)Basic Path Coverage
Hi Sok, Seems like this question is incomplete as it unclear that what the exact question is all about. Moreover, based on the term used it is probably a very outdated question. Please try providing a complete question to assist well.
Thank you so much, these vids are such a great help! Just to clarify, with a nested statement the sc is always equal to 1 + the number of else statements and with an unnested statement the sc is always equal to 2 regardless (when else is there)?
Can you clarify, maybe there is something I missed. I thought when given questions that ask "how many number of test cases would you need for full coverage from this fragment of code?" we can just count the number of "ELSE" and add 1 and that should be our answer. If so, I got 3?
Hi Neeraj! Thanks for your detailed videos. This is of great help. Further, can you please help me with this as there's a bit confusion as per my understanding: 1 For the code fragment given below, which answer correctly represents minimum tests required for statement and branch coverage respectively? Discount rate=1; Fare = 1000; If ((person == 'senior citizen') and ('travel month = January')) Bonuspoints = 100+Bonuspoints If (class=='first') discountRate = 5; Fare = fare * discountRate; (A) Statement Coverage = 1, Branch Coverage = 2 (B) Statement Coverage = 2, Branch Coverage = 2 (C) Statement Coverage = 1, Branch Coverage = 3 (D) Statement Coverage = 2, Branch Coverage = 4 As per formula used in your videos doesn't it should be what is mentioned below? SC = 1 (1+count of else) and DC = 3 (count of if +1) How is the Branch Coverage 2 in this case? As I have seen other sites and it says that Branch Coverage is 2 instead of 3. Can you please further explain?
Please watch the video for last example as the formula is different in this case. In the given fragment of code IF is not nested thus the formula you applied is not applicable here.
@@TMSQUARETECH Hi Neeraj, Did you mean that this is un-nested condition for SC and DC i.e For Statement Coverage; SC =1 (as no ELSE are there) For Decision Coverage; DC=2 (irrespective of count of IF) If this is what you meant to say then can you please further check my query below? The question is how is this program code un-nested? As I have seen your video tutorials where it says that when IF starts it closes before the next IF starts and has some healthy statement. Whereas, in the above question first IF does not completely closes and second IF starts. (This is not as per the example you have discussed in Example 4 of this video)
@10:59 of this video the SC=6/8 = 75% coverage. The same chart in your next video regarding decision coverage it is DC=5/8=62%. I don't understand why you add the a+b twice in SC and not in DC. I am hoping you can give me some clarity because I thought DC was indeed MORE than SC. Thanks you sir!
Very helpful tutorial! Thank you very much!!! However, my flowchart in example 3 is drawn a bit differently from the video, like some buddies have commented.
Hello, in example 4, I didn't understand: when else are there, SC is always 2. Does that mean no matter how many else we have? Thank you for your answer :)
Hello Neeraj, could you please explain this code : How many test cases are necessary to cover all the possible sequences of statements (paths) for the following program fragment? Assume that the two conditions are independent of each other : - ………… if (Condition 1) then statement 1 else statement 2 fi if (Condition 2) then statement 3 fi What will be the answer: a. Test Cases b. 3 Test Cases c. 4 Test Cases d. Not achievable
Hi Deepika, This is Path Testing which is not in our syllabus since 2011. Moreover, the statement testing and decision testing is also not looking forward to program based questions from 2018 syllabus. Thus, you can save your time in order to target other areas of syllabus. But, as you have asked the path testing is find different combinations of each conditions and find various executable paths for the give fragment of code. Here the answer will be 4. For more details, I will be covering this technique on Friday's video upload for Technical Test Analyst, you can see that. All the best and Happy Learning!!!
Hi Roshe, These questions are no longer in the examination. All you can expect is a theoretical based question. The tutorial is only for understanding purpose.
As per istqb syllabus,questions will be k2 type from statement and decision coverage.So the questions you explaining in video above belongs to k2 category?(As i feel them of k3 type,so please clear..)
Hi Neeraj. Pls explain this. In example 5 - Min no of test cases needed to cover 100% sc is 3 - Those are ABC, ABDGH, ABDFGI .So Total 3 . 2 have been already achieved, SO (2/3 *100) = 66.66%. Pls clear this.
Hi There, The example 5 is not done on the basis of path. The question is about Statement coverage where the justification you provided is for question - Min TC to achieve 100% coverage of statements. They are different.
Hi, can you please assist to explain why in below item the answer is B and not A. The following statement refers to decision coverage: “When the code contains only a single ‘if’ statement and no loops or CASE statements, and its execution is not nested within the test, any single test case we run will result in 50% decision coverage.” Which of the following statement is correct? a) The statement is true. Any single test case provides 100% statement coverage and therefore 50% decision coverage b) The statement is true. Any single test case would cause the outcome of the “if” statement to be either true or false c) The statement is false. A single test case can only guarantee 25% decision coverage in this case d) The statement is false. The statement is too broad. It may be correct or not, depending on the tested software
Hi Vanessa, if you read the question, it says that code contains only 1 "if" statement and it will cover only 50% of the code/decision. Based on this understanding, option b) satisfies the condition, as "if" statement will either result in true or false and hence only 50% of the code will be covered.
Sir little bit confused on this problem.... How many test cases sre necessary to cover all possible sequences of statements(path) for the following program.? Assume two condition are independent to each other if(condition 1) then statement1 else statement 2 fi If (condition 2) Then statement 3 fi A. 2 test cases B. 3 test cases C. 4 test cases Isqbt answer is 4 test cases .
Hi professor. First of all, thank you for this tutorial. I have one question I'd like to clarify.. my understanding on nested/un-nested conditions is limited, so I'd like to confirm: the first flowchart example (if A>B then print "A is Bigger" - Else Print "B is bigger" ) has only un-nested conditions, right?
Ok Gabriel, her eit goes. We generally talk about nested and un-nested when we have multiple if's 1. example of nested IF. if x>y then if x=0 then print x is null else print x is bigger end if else print y is bigger end if Here second if starts before the end of first if 2. example for un-nested if x>0 print x is positive else print x is negative end if if x=0 print x is null end if Here the second if starts after end of first if
Well done Rishabh. The test cases will be 4 but for cyclomatic complexity. In regards to Statement coverage we need minimum tests covering all statements which can be done with 2. Test 1 - passing through the true path of both conditions Test 2 - passing through the else path of both conditions
Hi neeraj, just a question regarding the un-nested conditions. correct me if I am wrong. If you have If/if/if/Else/Else/Else/EndIf - If/Else/EndIf - If/If/Else/Else/EndIf - is this still equal to 2? OR is it equal to some other thing? I was kinda lost on that explanation. thanks. :)
Hi Mr. Soumya, if you understand the concepts of the flow chart. Whether, nested or un-nested, if you add an additional block below it, it can be covered with previous tests. As Path is always to reach from start to end. Thus, the answer would remain the same to that of two nested else block. I hope this was clear solution to understand your query.
Hi Uwais, Except a pen/pencil and white paper you are not allowed to carry anything along with you. The white paper is for calculation for chapter 4 and may not be mandatory in all the boards. Please check for the instructions received when applying for exam to confirm.
Could you please explain whu the correct answer is 3? For the following piece of code, how many test cases are needed to get 100% statement coverage? Read (Color) // Input color from user IF (Color == "Red") THEN Call Roses(Color) ELSEIF (Color == "Blue") THEN Call Violets(Color) ELSE PRINT "User is no Shakespeare" SaveToDatabase(Color) End Procedure X
Hi Neeraj!!! Can you please answer the following question. I am unable to understand this question. And explain me as well how can we drive test cases How many test cases are necessary to cover all the possible sequences of statements(Paths) for following program fragment? Assume that two conditions are independent of each other. If(Condition 1) then statement 1 else statement 2 fi if (condition 2) then statement 3 fi A) 2 test cases B) 3 Test Cases C) 4 test cases D) None
@@TMSQUARETECH And also can you please clear me here that in case of un-nested loops if we have 4 If else statements so it means we have statement coverage is 4 and decision coverage is also 4 right???
No it will always remain 2 for DC as a single path continue till the bottom. Don't forget it it is to all decisions and statements with MINIMUM paths. So, answer to the above question is 2 tests. I have elaborated in details in the tutorials. Please watch the tutorials once again you will be more confident. Feel free to reach me for anything further
@@TMSQUARETECH Thanks for replying..... can you please clear me one thing? Are you talking about Below program? If(Condition 1) then statement 1 else statement 2 fi if (condition 2) then statement 3 for this program we need 2 tests? If yes then can you please explain how ?
Hi, please tell me the answer with explanation for below Question.Thanks in advance Given the Following program IF X < Y THEN Statement 1; ELSE IF Y >= Z THEN Statement 2; END McCabe’s Cyclomatic Complexity is : a. 2 b. 3 c. 4 d. 5
Minimum Test Required for Statement Coverage :-Disc = 0 Order-qty = 0 Read Order-qty If Order-qty >=20 then Disc = 0.05 If Order-qty >=100 then Disc =0.1 End if End if a) Statement coverage is 4 b) Statement coverage is 1 c) Statement coverage is 3 d) Statement Coverage is 2 whats the right answer
Hi Mr. Yoga The While wend is not in scope of the foundation level syllabus. So, you can relax. They are only limited to simple If else code examples. In case of while wend or do while the logic remains the same applied similar to SC and DC.
HI Neeraj Kumar, I am requesting you to please reply answer to my question. Thanks in advance How many test cases are necessary to cover all the possible sequences of statements (paths) for the following program fragment? ………… if (Condition 1) then statement 1 else statement 2 fi if (Condition 2) then statement 3 fi ………… a. 1 b. 2 c. 3 d. None of the above My answer is 2,pls let me know is it correct or not. In one of the sample paper it is mentioned as 3.
Hi Mahesh, Your answer is right as both the conditions are in series thus 1 path will be for covering Statement 1 & 3 and 2nd path will be for Statement 2. By the way, these questions are no longer asked in the examinations. prepare the theoretical part of the same.
@@TMSQUARETECH Hi Neeraj, Thanks for helping me, please let me know why these type of questions are not asking in the exam, I have taken this question from one of the sample paper.
Hi There, If you observe and listen again it's not me who has taken it, it's just a sample question. Of coarse, we can have other alternative tests as well. They say given the following test what's the statement coverage. I hope this is in line with your query.
Thank you very much, and this is one and only the greatest ISTQB tutorial found on RU-vid. Need to clarify a little thing regarding 1st formula. SC = 1+countOfElse, we can apply this only if the code has nested elses right?
Regarding the example for it's an un-nested if statement thus requires a single path to continue through both the true statements and a single path to travel through both the false statement. Thus, I have provided a separate formula for nested and un-nested if statements. I hope that goes in line with your understanding.