Download as pdf or txt
Download as pdf or txt
You are on page 1of 17

A framework for education in software measurement Version 2.

0 - October 2013

FUNCTIONAL SIZE MEASUREMENT USING THE


COSMIC METHOD

EXAMPLE: ONLINE SHOPPING

Copyright 2013. All Rights Reserved. Mónica Villavicencio and Alain Abran

Permission to copy all or part of this material is granted provided that (a) the copies are not distributed for
direct commercial benefit, (b) the authors copyright notice is present, and (c) notice is given that copying is
with permission of Mónica Villavicencio and Alain Abran. To copy otherwise requires specific permission.

Authors: Monica Villavicencio, Alain Abran


External Reviser: Charles Symons
All rights reserved. Mónica Villavicencio and Alain Abran ©2013 Page 1
A framework for education in software measurement Version 2.0 - October 2013

Functional User Requirement: Buy a product via web.

Pre-conditions:

The customer has a valid credit card

Flow of events:

- The customer accesses the online store via a browser

- The customer can search for a product by choosing the corresponding group that appears
in the menu (Brands, What’s new, Clothing, .... Sale) or by typing a keyword.

Authors: Monica Villavicencio, Alain Abran


External Reviser: Charles Symons
All rights reserved. Mónica Villavicencio and Alain Abran ©2013 Page 2
A framework for education in software measurement Version 2.0 - October 2013

- The system displays the products of the selected group or the products that match the
search criteria. In this example, the customer selected the products on Sale.

- Next, the customer selects the product that she wants to purchase.
- The system displays the details of the product.

Authors: Monica Villavicencio, Alain Abran


External Reviser: Charles Symons
All rights reserved. Mónica Villavicencio and Alain Abran ©2013 Page 3
A framework for education in software measurement Version 2.0 - October 2013

- When the customer enters the quantity of the desired product, she can adds it to the
shopping cart (add to bag).
- If the product is added to the bag, the system displays the content of the shopping cart.
There are three possible choices here:
o The customer can remove the item, or change the current quantity. In both
cases, the customer has to update the cart.
o The customer can continue shopping and add more products into the
shopping cart.
o The customer can checkout and pay for the product.

Authors: Monica Villavicencio, Alain Abran


External Reviser: Charles Symons
All rights reserved. Mónica Villavicencio and Alain Abran ©2013 Page 4
A framework for education in software measurement Version 2.0 - October 2013

- When the customer decides to checkout, the system will ask for an authentication (in the
case of returning customers) or for the creation of a new account (in the case of new
customers).
- Returning customers must enter their e-mail address and password.

- New customers need to enter personal information including a user and password.

Authors: Monica Villavicencio, Alain Abran


External Reviser: Charles Symons
All rights reserved. Mónica Villavicencio and Alain Abran ©2013 Page 5
A framework for education in software measurement Version 2.0 - October 2013

- For shipping purposes, the customer has to confirm or update the shipping address; and to
select the shipping method.

Authors: Monica Villavicencio, Alain Abran


External Reviser: Charles Symons
All rights reserved. Mónica Villavicencio and Alain Abran ©2013 Page 6
A framework for education in software measurement Version 2.0 - October 2013

- To change the shipping address, the customer has to fill out a form (New shipping
address).

Authors: Monica Villavicencio, Alain Abran


External Reviser: Charles Symons
All rights reserved. Mónica Villavicencio and Alain Abran ©2013 Page 7
A framework for education in software measurement Version 2.0 - October 2013

- When the shipping address has been selected or changed, the system prompts the
customer to select the payment method.

Authors: Monica Villavicencio, Alain Abran


External Reviser: Charles Symons
All rights reserved. Mónica Villavicencio and Alain Abran ©2013 Page 8
A framework for education in software measurement Version 2.0 - October 2013

- The customer must enter the credit card information. If an error occurs during the
verification of the credit card, a message is displayed. Otherwise, the system asks the
customer to 'pay now'.

- Next, the customer has to review and confirm the order.

Authors: Monica Villavicencio, Alain Abran


External Reviser: Charles Symons
All rights reserved. Mónica Villavicencio and Alain Abran ©2013 Page 9
A framework for education in software measurement Version 2.0 - October 2013

Authors: Monica Villavicencio, Alain Abran


External Reviser: Charles Symons
All rights reserved. Mónica Villavicencio and Alain Abran ©2013 Page 10
A framework for education in software measurement Version 2.0 - October 2013

Purpose and Scope of measurement: Measure the size of the functionality “Buy a product
via web” as it is currently described in the set of requirements documented in the previous
pages for teaching purposes.

Functional user: The customer, the Banking system

Functional processes: FP1) Select product group, FP2) Search product, FP3) Display
product, FP4) view size charts, FP5) Select for purchase, FP6) Update order item, FP7) Delete
order item, FP8) Place an order, FP9) Create new customer, 10) New shipping address, 11)
Make the payment.

Browse and select products: FP1 to FP7

Delivery (shipping) information: FP8 to FP10

Payment and order confirmation: FP11

Data model:

Data groups:

Customer: Customer ID, Gender, First Name, Last Name, Date of Birth, E-mail address,
Password.

Customer shipping address: Customer_shipping_address_ID, Customer ID, Gender, First


Name, Last Name, E-mail address, Telephone number, Fax number, Street_address,
Zip_code, City, State-Province, Country, Address_type, date creation address.

Authors: Monica Villavicencio, Alain Abran


External Reviser: Charles Symons
All rights reserved. Mónica Villavicencio and Alain Abran ©2013 Page 11
A framework for education in software measurement Version 2.0 - October 2013

Product Group: Product Group ID, Product group description, Size chart group (footwear,
clothes, accessories, etc).

Product: Product ID, Product Group ID, Name, General description, set of characteristics
(size, color, additional details), Provider, Stock Quantity, Unit cost, Unit price, Image.

Order: Order ID, Customer ID, Creation date, Order status (selected, paid, cancelled,
delivered), total order value, customer_shipping_address ID, shipping method ID, shipping
charges, payment method, payment date, authorization payment ID, comments.

Order item: Order Item ID, Order ID, product ID, order quantity, item status (selected,
ordered, paid, cancelled, delivered).

Shipping method: Shipping method ID, Shipping method description (standard, FedEx, UPS,
etc), shipping charges.

Data movements:

Process Subprocess Data Group Data CFP Comment


movement

FP 1. Select The customer clicks on the Product


E 1
Product Group chosen group Group

All the items


The system retrieves the from that
Product R 1
products in the chosen group group are
retrieved
The system displays the
product group name and Product group X 1
count of products in group
The system displays some
details of all products in the Product X 1
group
E: Entry X: eXit R: Read W: Write 4 CFP

Process Subprocess Data Group Data CFP Comment


movement

FP 2. Search The customer enters a


Product E 1
product product name or keyword(s)

All the items


The system retrieves the list satisfying the
of products meeting the Product R 1 search criteria
search criteria are retrieved

Authors: Monica Villavicencio, Alain Abran


External Reviser: Charles Symons
All rights reserved. Mónica Villavicencio and Alain Abran ©2013 Page 12
A framework for education in software measurement Version 2.0 - October 2013

The system displays some


Product X 1
details
e.g. "no
product
Error/confirmation messages Messages X 1 matches the
search
criteria"
4 CFP

Process Subprocess Data Group Data CFP Comment


movement
FP 3. Display The customer selects the
Product E 1
product product

The system retrieves all


Product R 1
details about the product

The system shows all the


Product X 1
product details

3 CFP

Process Subprocess Data Group Data CFP Comment


movement

FP 4. View size The customer clicks on the


Product group E 1
chart size chart button

The size
chart from
The system retrieves the size
Product group R 1 that group
chart in the chosen group
appears on
the screen
The system displays the
Product group X 1
chart

3 CFP

Process Subprocess Data Group Data CFP Comment


movement
The customer
FP 5. Select for
enters the quantity and Order Item E 1
purchase
presses Add to bag
The system verifies the stock Product
R 1
of the product
This is
needed in
case the
System creates an ‘Order’ ** Order W 1
customer
selects other
products

Authors: Monica Villavicencio, Alain Abran


External Reviser: Charles Symons
All rights reserved. Mónica Villavicencio and Alain Abran ©2013 Page 13
A framework for education in software measurement Version 2.0 - October 2013

The
products are
reserved
System reserves the selected
Product W 1 until the
stock
payment and
order
confirmation
System stores the order item
Order Item W 1
with status ‘selected’

The system displays the


current content of the Order Item X 1
shopping cart (pre-order)
Example
Error/confirmation messages message
Messages X 1
may appear ‘Sorry, out
of stock’
7 CFP

** Assumption: an order number is assigned when an order item is first added to the cart. This
would be needed in case the customer adds other items to the cart.

Process Subprocess Data Group Data CFP Comment


movement
The customer changes the
FP 6 Update order quantity on one or
Order Item E 1
Order Item more Order Items, then hits
the ‘update cart’ button
The system checks that an
increased product quantity is Product R 1
available (enough stock?)
The system saves the
products contained in the Order Item W 1
shopping cart (bag)
Until
System reserves the selected payment and
Product W 1
stock order
confirmation

The system displays updated


Order Item X 1
cart contents

Display updated order value Order X 1

Example:
order
quantity is
Error/confirmation messages
Messages X 1 increased
appear
but not
enough
stock
7 CFP

Authors: Monica Villavicencio, Alain Abran


External Reviser: Charles Symons
All rights reserved. Mónica Villavicencio and Alain Abran ©2013 Page 14
A framework for education in software measurement Version 2.0 - October 2013

Process Subprocess Data Group Data CFP Comment


movement
The customer enters
FP 7. Delete ‘Remove’ on one or more
Order Item E 1
Order Item Order Items, then hits the
‘update cart’ button
The system deletes the A ‘Write’
products from the shopping Order Item W 1 accounts for
cart (bag) a delete.

The system updates the


Product W 1
available product quantity

Display updated cart Order Item X 1

Display updated order value Order X 1

5 CFP

Process Subprocess Data Group Data CFP Comment


movement
The customer enters email
FP 8.
address and password then Customer E 1
Place order
clicks on sign in

The system verifies the


Customer R 1
identity of the customer

Examples:
Error/confirmation messages ‘Wrong e-
Messages X 1
appear mail or
password’
Customer
The Customer’s stored
shipping R 1
billing address is retrieved
address
It appears as
Customer
The system displays the a default
shipping X 1
customer's address shipping
address
address
The system retrieves the
Shipping
shipping methods and R 1
methods
charges

The system displays the Shipping


X 1
available shipping methods methods

Customer selects the


shipping method and Order E 1
comments about the order

Authors: Monica Villavicencio, Alain Abran


External Reviser: Charles Symons
All rights reserved. Mónica Villavicencio and Alain Abran ©2013 Page 15
A framework for education in software measurement Version 2.0 - October 2013

The order is
The system updates de order
saved and
with the customerID and Order W 1
the customer
shipping information
can pay later
9 CFP

Process Subprocess Data Group Data CFP Comment


movement
The customer
FP 9. Create enters the information
Customer E 1
new customer including the home (billing)
address
The system verifies if there
Customer
is an existing customer with R 1
the same email address
The system creates a
Customer W 1
Customer
The system creates an Customer
address (of type billing) for shipping W 1
the customer address
e.g.‘email
Error/confirmation messages already
Messages X 1
may appear exists’
5 CFP

Process Subprocess Data Group Data CFP Comment


movement
Customer
FP 10. New The customer enters the new
shipping E 1
shipping address address
address
The system creates a new Customer
shipping address for the shipping W 1
customer address
The new
Customer
The system updates the shipping
shipping X 1
delivery information addresses
address
appears
e.g. ‘Zip
Error/confirmation messages code error’
Messages X 1
may appear

4 CFP

Process Subprocess Data Group Data CFP Comment


movement

FP 11: Make The customer chooses the


Order E 1
payment payment method

This data is
not stored. It
The customer enters the Transient data:
is used to
information of the credit credit card #, E 1
inquire the
card PIN
Banking
system

Authors: Monica Villavicencio, Alain Abran


External Reviser: Charles Symons
All rights reserved. Mónica Villavicencio and Alain Abran ©2013 Page 16
A framework for education in software measurement Version 2.0 - October 2013

Transient Inquiry to
This system requests the
data: credit the Banking
banking system to verify the
card #, PIN, X 1 system
credit card information and
amount to be
the availability of funds
paid.
The system receives the Transient Response
requested data: from the
E 1
authorization/rejection from authorization Banking
the Banking system # /reject system
Order; The system
Order Item; has to read
Product; the order
The system displays the Customer; information
order information and seek Customer R 6 from 6
the Customer's acceptance shipping different
address; data groups
Shipping
method
Order
The system updates the status=paid
Order;
order with the payment W 1
Order Item
method and authorization # Item status =
paid
e.g.
connection
Error/confirmation messages problem
Message X 1
may appear with the
Banking
system
12 CFP

Total = 63 CFP

Limitations:

This case study does not consider 'timeout' situations, which are commonly used in this type
of applications.

Authors: Monica Villavicencio, Alain Abran


External Reviser: Charles Symons
All rights reserved. Mónica Villavicencio and Alain Abran ©2013 Page 17

You might also like