Requirements in early phases
While methods for requirements engineering have greatly advanced over the last years, these techniques mainly focus on engineering tasks that need to be carried out after a project is already started.
However, before starting a project, standards like PRINCE2 [OGC 2009] demand for a project mandate and a business case, to evaluate if the project should be carried out or not. Usually the business case should estimate the benefits of the project as well as the costs. To do so, it is first of all necessary to determine the scope of the projects requirements.
However, it is within the very nature of a project that the scope is not a fixed size throughout the course of the project. Barry Boehm was one of the first to describe this behavior with what is now commonly called the Cone of Uncertainty. The notion this image conveys it that the scope of a project is much more prone to fluctuations in early phases than it is in later phases. This is shown by the tapering of the cone to the right.
Thus, the problems a requirements engineer faces in early phases are:
- An unclear project scope due to early stage of problem definition.
- Limited time and means to create the first requirements documentation.
- Capturing the functional scope necessary for cost estimation.
Though the first problem can’t be solved by any methodology – it is due to the very nature of the Cone of Uncertainty - we will provide useful tools to deal with the last two issues in this article.
To determine the solution scope, use case diagrams will mostly be the method of choice in early project phases. The advantages are: They offer a good first overview of functional requirements from a user point of view and can be captured, structured and documented easily. Therefore use case diagrams are often used as a basis for discussion and communication with stakeholders [Rupp et al. 2009]. Nevertheless, as we will describe later, a plain use case diagram is insufficient for both an adequate presentation of functional requirements and as a basis for an effort and cost estimation.
Understanding the business use case
For a reliable size measurement it is necessary to understand how business use cases (what) translate into system use cases (how). However, usually it already takes a long time to describe the business use cases, so we cannot expect to have enough time to describe the system use cases as well in pre-project phases. Therefore, we propose to address this conversion in short stakeholder interviews.
It is our experience that stakeholders who define the business use case often have limited technical knowledge concerning the actual implementation of their requirements. However, they very often possess a very in-depth understanding about what systems and interfaces are involved in the new application. That’s because they often have a coarse overview of the IT landscape of their company and know where to draw the needed information from, e.g. customer data, or what applications will provide services for the new IT product. Also they understand when input data needs to be manipulated or processed to generate the desired output data.
In our experience sufficient information can often be gathered even in early or pre-project phases if the requirements engineer has access to the right stakeholders and poses the right questions. Here are some simple steps that we think can be carried out in any project no matter how tight the schedule is:
- Document the preliminary business use cases (what).
- Hold a workshop together with business people and technical staff.
- Clarify for every use case the rough details of its implementation (how) by asking:
- Which actors are interacting with the system?
- How many other systems are involved?
- What interfaces need to be defined?
- How many steps does it take to process the raw data?
- How many steps does it take to process the output data for displaying?
- How many alternative scenarios are there and of how many steps will they be comprised?
- How many error scenarios are there?
ID | UC2 | |
Name | Car booking | |
Short description | A customer wants to book a rental car via the webpage of a car rental service | |
Actors | Customer, payment processor | |
Pre-conditions | None | |
Trigger | Customer starts the booking process by entering his preferred pickup and return station and rental dates | |
Main scenario | No. of steps: | |
1. The customer enters his data (preferred car, dates etc.), his personal data as well as his payment information | Step 1 | |
2. The system has to check the availability of the selected cars | Step 2 | |
3. The system has to check the payment information with the payment processors (i.e. credit card institute) | Step 3 | |
4. At the end the customer should receive a booking confirmation | Step 4 | |
Post-condition | The customer has received a booking confirmation and his booking has been saved in the system. |
300 UUCP ∗ 2.27 FP per UUCP ∗ 34 PH X 34 PH per FP = 23154 PH
However, this method is only based on the functional size of the application not on non-functional requirements. It therefore only works when firstly enough historic data has been gathered to come up with a stable productivity factor (e.g., person month per function point) and secondly the non-functional requirements for the new application do not differ too much from projects in the historical database. The second method makes up for these problems. It is based on a combination of the COnstructive COst MOdel - II (COCOMO II) and function points described by [Boehm 2000]. One of the advantages of COCOMO II is that it can be used to estimate projects that take place in unfamiliar environments with a lot of non-functional requirements. However, this requires a few more calculations: The idea behind COCOMO is to provide a sufficient number of parameters to adjust for the specific situation of any project. The formula used, the parameters and how to rate these parameters can be found in [Boehm 2000]. Before using COCOMO it is necessary to transform the function points into kilo Source Lines Of Code (kSLOC). This means that depending on the programming language used, the productivity of the project is adjusted using a table of backfiring values (provided by [Boehm 2000]). Backfiring values thus describe how many lines of code are necessary to implement one function point. The kSLOC value can then be used as input to the COCOMO formula. To sum these steps up, let’s assume we have an application with a FSM of 300 UUCP that will be implemented in Java (with a backfiring value of 53). We can calculate the kSLOC as:300 UUCP ∗ 2.27 FP per UCP ∗ 53 SLOC per FP ≈ 36000 SLOC = 36 kSLOC
This value can now be used to generate a cost estimate using the COCOMO II framework. #### Refining the estimation The preliminary requirements documentation from the pre-project phase can be updated and used throughout the rest of the actual project. This is important because our approach aims to minimize the effort necessary for cost estimation by going along with requirements engineering tasks that will usually take place anyway sooner or later in the project. As an example, we’ll show how the use case description above can be transformed into a sequence diagram that satisfies standards for requirement documentation. In this example we assume a medium complexity for every function point component, resulting in 31 function points. Usually after describing sequence diagrams the estimation can be conducted using function point analysis (and either COOCMO or the company’s productivity factor). We recommend conducting both steps: that is, the use case counting and the function point counting over the course of a few projects to build up historical data concerning the relation between both sizing methods. This will help to further strengthen the reliability of the estimation while aligning perfectly well with the described requirements engineering techniques. ###References- [Boehm 2000] Barry Boehm: Software Cost Estimation with COCOMO II. Upper Saddle River 2000
- [Cockburn 2000] Alistair Cockburn: Writing Effective Use Cases. Boston 2000
- [Fowler 2012] UML Distilled: A Brief Guide to the Standard Object Modeling Language. Boston 2012
- [Karner 1993] Gustav Karner: Metrics for Objectory. Diploma thesis, Linköping University 1993
- [Pohl et al. 2011] Klaus Pohl und Chris Rupp: Requirements Engineering Fundamentals: A Study Guide for the Certified Professional for Requirements Engineering Exam. Santa Barbara 2011
- [Rupp et al. 2009] Chris Rupp & die SOPHISTen: Requirements-Engineering und -Management: Professionelle, iterative Anforderungsanalyse für die Praxis. München 2009
- [OGC 2009] Office of Government Commerce: Managing successful projects with PRINCE2, London 2009
- [Schofield et al. 2013] Joe Schofield, Alan W. Armentrout, Regina M. Trujillo: Function Points, Use Case Points, Story Points: Observations from a Case Study. In: CrossTalk, May/June 2013 URL: http://goo.gl/il44Kw (last accessed: December 2013)