5 Demo of your project. Show your project running. Particularly New Features Intelligent Tutoring System JFreeChart, JDBC, JSON, Maps API, Weather API, OpenAI API First Act – Demo
6 Taiga à Stories, Backlogs, and Task board Stories (INVEST), Sprint backlog, product backlog. Estimation (story points) Talk about tasks; who is doing what? Everybody is doing some programming! Show and explain your Burndown Chart. Second Act – Your process
9 Show your class diagram. Use colors for the newly added classes) If there are new functionalities, then there are new classes, right? (Single Responsibility Principle) What are the A, I, or D in the new class? (show the 2D plot regarding where your classes are in terms of the pain zone) Third Act – Software Design
11 Show US your GitHub Who is doing What? (everyone is adding or updating code) Show US your Code and Code Metrics Are your metrics OK (LOC, eLOC, lLOC, CC)? Any significant aspect that you want to share? Do you acquire technical debt for something? What did you that made this code better than the one in the CSC 308 submission? Test Cases (Unit Testing) What are you testing? Why? Fourth Act – Code
15 § Unit testing is the testing of an individual unit or group of related units. § It test that a unit is producing expected output against given input. § Each Unit developer must define Unit Test Cases for that Unit. § Unit Testing Frameworks are tools and libraries that help to implement the Unit Testing process. Example JUnit Unit Testing
16 § Statement Coverage: each statement is executed at least 1 time. § Decision (branch) Coverage: each decision point is executed at least 1 time for true and one time for false. § Decision-Condition Coverage: each branch or decision point is evaluated to be both true and false, and each condition within a complex decision point is evaluated to be both true and false Coverage
19 1. public void exampleMethod (int a, int b) { 2. if (a > 10 && b < 5) { 3. System.out.println("Branch 1"); 4. } else { 5. System.out.println("Branch 2"); 6. } 7. } // Achieving Statement Coverage: 2 test cases Test Case 1: a = 11, b = 4 (True branch, a > 10 is true, b < 5 is true) Test Case 4: a = 9, b = 6 (False branch, a > 10 is false, b < 5 is false) // Achieving Decision (Branch) coverage: 2 test cases Test Case 1: a = 11, b = 4 (True branch, a > 10 is true, b < 5 is true) Test Case 4: a = 9, b = 6 (False branch, a > 10 is false, b < 5 is false) Example
20 1. public void exampleMethod (int a, int b) { 2. if (a > 10 && b < 5) { 3. System.out.println("Branch 1"); 4. } else { 5. System.out.println("Branch 2"); 6. } 7. } // Achieving Decision-Condition Coverage: 4 test cases Test Case 1: a = 11, b = 4 (True branch, a > 10 is true, b < 5 is true) Test Case 2: a = 9, b = 4 (False branch, a > 10 is false, b < 5 is true) Test Case 3: a = 11, b = 6 (False branch, a > 10 is true, b < 5 is false) Test Case 4: a = 9, b = 6 (False branch, a > 10 is false, b < 5 is false) Example
21 1. if (x<1 || y>5 && z!=0 || flag==true && s==null) 2. doThis(); 3. else 4. doThat(); § How many Test cases are needed to Test for 100% statement coverage? § How many Test cases are needed to Test for 100% decision coverage? § How many Test cases are needed to Test for 100% decision-condition coverage? Decision-Condition Coverage
25 1. if (a <10 || b>5) 2. x = 50 3. else 4. x = 0; 5. if (w == 5 || y>0) 6. z = 48; 7. else 8. z = 5; Statement Coverage, Decision Coverage, and Decision-Condition Coverage with a = 0, b=0, w=0, y=0? Statement Coverage, Decision Coverage, and Decision-Condition Coverage (adding) with a=10, b=4, w=5, y = anything? Note: Remember that coverage is cumulative 2. Test Yourselves
27 If they are not already, how many test cases are needed for 100% Statement Coverage 100% Decision (Branch) Coverage 100% Decision-Condition Coverage For each of the 3 cases (code) shown before? 4. Test Yourselves
Winter 2023 Copyright. These slides can only be used as study material for the class CSC308 at Cal Poly. They cannot be distributed or used for another purpose.