



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




College of Engineering (Software Engineering)
Semester: _SPRING 2023__________ Date of Experiment: _____________________ Student name: MUHAMMAD MUNEEB Faculty Signature: ______________________ Student ID: _ 10731 ________________ Remarks/Comments: ____________________ Lab 02 Manual Testing – White Box testing PLOs PLO 1 – Engineering Knowledge Bloom’s Taxonomy C 1 – Recall PLO5 – Modern Tool Usage C3 - Apply PLO8 – Ethics P2 – Set
CLO’s Aspects of Assessments Excellent (75-100%) Average (50-75%) Poor (<50%) Marks CLO 10% Recall Recall the associated concepts form theory regarding basic concepts of White box testing. Complete understanding of the concepts of testing / actively participate during lecture. Complete understanding of the concepts of testing / less actively participate during lecture. Student lacks clear understanding of concepts of testing/ Unable to read and interpret it. CLO 4 8 0% Tools Utilization Apply and discover different basic level features of software testing using Modern tools and languages Accurately create test cases obtain the correct output as per requirement/ given tasks. create test cases but obtain slightly different output as per requirement/ given tasks. Not able to create test cases as per requirement/ given tasks. don’t understand how required output and task is achieved. CLO 7 10% Lab Safety Properly handle lab infrastructure/safety precautions Properly handle lab equipment & obey safety measures. Moderate level lab handling and safety measurements Minor or no safety measurements has been considered. Total Marks: 10
Objective:
Control Flow Diagram In the above diagram, control flow graph of code is depicted. In the first case traversing through "Yes "decision, the path is A1-B2-C4-D6-E8 , and the number of covered edges is 1, 2, 4, 5, 6 and 8 but edges 3 and 7 are not covered in this path. To cover these edges, we have to traverse through "No" decision. In the case of "No" decision the path is A1-B3- 5 - D7 , and the number of covered edges is 3 and 7. So by traveling through these two paths, all branches have covered.
Yes 1, 2, 4, 5, 6, 8 A1-B2-C4-D6-E8 1 No 3,7 A1-B3- 5 - D7 1 Total Path covered 2
Lab Task: Consider the below pseudocode perform white box testing and record every steps involved. INPUT A & B C = A + B IF C> PRINT “ITS DONE” END IF IF A> PRINT “ITS PENDING” END IF Home Task: Consider the below code perform white box testing and record all the steps involved. class Test { // Method factorial static int factorial( int n) { if (n == 0) return 1; return n * factorial(n - 1); } // Driver method public static void Main() { int num = 5; Console.WriteLine("Factorial of " + num + " is " + factorial(5)); } }
If we consider TestCase_01 to be (A= 6 0 and B=70), then all the lines of code will be executed.
TestCase_01: A=33, B= TestCase_02: A=25, B=