Applying Use Cases to Implementation (Chapters 25,26 - Requirements Text) Steve Chenoweth & Chandan Rupakheti Question 1
Outline Use Cases in Design and Implementation From Use Cases to Test Cases
What Are the Design Issues? It is easier to design and implement certain system feature than others [From the perspective of traceability] Orthogonal Design – could be as bad as this: Question 2 How requirements are expressed How the design should be done (How testing should be done, maybe?)
Solving the Orthogonality Problem Object-oriented design ◦ Derived from use cases as much as possible ◦ Internal algorithms could be a big exception Well written use cases Modeling Software Systems Test cases developed from use cases – ◦ Gets rid of that possible third axis on the prior slide! Start Question 3
Solving the Orthogonality Problem The software architecture helps us understand “what the system does and how it works, how the elements interact, and what type of patterns and pieces or the system are involved”
Solving the Orthogonality Problem (continued) Architectural views : ◦ Logical (for users) ◦ Implementation (programmers) ◦ Process (integrators) ◦ Deployment (system engineers) End Question 3
Extra Credit How are use cases realized in the design model? Read Chapter 25 and submit a report. Please submit it via (Angel – Lessons – Extra Credit – Week 5 – Use Case Realization) And see also the example under Resources on the course web site (“Sample use case in requirements vs design.doc”) And, answer the question in the notes, below…
Outline Use Cases in Design and Implementation From Use Cases to Test Cases
Questions before Testing What is this system supposed to do? What are the things that can go wrong? ◦ How does the system respond? How do I create and record testing scenarios? How do I know that the system has been tested completely? Is there anything else the system is supposed to do? Question 4
Testing Terms Test Plan Test Case Test Procedure Test Script Test Item See definitions in the notes, below.
Test Plans 1.The use cases each become multiple test cases in the test plan.
How do we use the use case? Steps in creating a test case: ◦ Identify use-case scenarios (basic and alternate flows) ◦ Identify the test cases ◦ Identify the test conditions ◦ Add data values to the test case
1. Identify the Scenarios Identify the various paths through the system Scenario Number Originating Flow Alternate Flow Next Alternate Next Alternate..
2. Identify the Test cases More than one test case can occur from each scenario. For instance, based on the input the expected result could be different. See the sample file (“Sample use case w test cases.doc”) under Resources on the course web site, showing test cases derived from a use case. Test Case ID ScenarioDescriptionExpected Result Actual Result
3 & 4. Identify Conditions and Populate table Test Case Id ScenarioDescriptionCond. 1 Cond. 2 Cond. 3 Expected Result Actual Result Use as many conditions as necessary for a use case,
Some final remarks How much do we test? Black box testing tests the functionality. What about the internal design decisions? Questions 5,6