Abstract
In agile development processes, the rewards from acceptance testing are maximized by using the practice to drive the development process. Traditionally, User Stories are used in agile projects to describe a system’s usage scenarios and are utilized as a basis for developing acceptance tests. This paper introduces a technique that aims to achieve the benefits of acceptance testing within large-scale development projects that deploy a V-model development process, specifically those that utilize use case models. The approach is based on utilizing a number of artifacts: use case models supported by robustness diagrams and domain models. The feasibility of the proposed approach is demonstrated by applying it to a real-world system—the RestoMapper system. The results show that a comprehensive set of acceptance tests can be developed based upon use case models.
Similar content being viewed by others
Notes
UCAT is a proof-of-concept tool that can be freely downloaded from http://www.ece.ualberta.ca/~melattar/UCAT.rar. UCAT is dependant on the full-version of a third party tool named MagicDraw version 9.0, which is available at http://www.magicdraw.com. The tool is also dependant on an open source tool named FIT/Fitnesse, which can be downloaded from http://fitnesse.org/.
The RestoMapper system is based on the Mapplet system which is feature and discussed in great detail in the book Agile Development with ICONIX Process: People, Process, and Pragmatism authored by Rosenberg et al. [Rosenberg]. The RestoMapper system has been modified to prevent any copyright infringements.
References
Agarwal R, Venkatesh V (2002) Assessing a firm’s web presence: a heuristic evaluation procedure for the measurement of usability. Inform Syst Res 13(2):168–186
Basanieri F, Bertolino A, Marchetti E (2002) The Cow_Suite Approach to Planning and Deriving Test Suites in UML Projects. In: Proceedings of fifth international conference UML: model engineering languages and concepts and tools, pp 383–397
Briand L, Labiche Y (2002) A UML-based approach to system testing. J Softw Syst Model 1(1):10–42
Cockburn A (2000) Writing effective use cases. Addison-Wesley, Reading
Cohn M (2004) User stories applied: for agile software development. Addison Wesley, Reading
El-Attar M, Miller J (2008) Producing robust use case diagrams via reverse engineering of use case descriptions. J Softw Syst Model 7(1):67–84
Good M, Spine TM, Whiteside J, George P (1986) User-derived impact analysis as a tool for usability engineering. In: Proceedings of CHI’86 human factors in computing systems, pp 241–246
Goodhue DL, Thompson RL (1995) Task-technology fit and individual performance. MIS Quart 19(2):213–236
Gould JD, Lewis C (1985) Designing for usability: Key principles and what designers think. Commun ACM 28:300–311
Gould JD, Conti J, Hovanyecz T (1983) Composing letters with a simulated listening typewriter. Commun ACM 26:295–308
Gould JD, Boies SJ, Lewis C (1991) Making usable, useful, productivity- enhancing computer applications. Commun ACM 34:74–85
Harwood RJ (1997) Use case formats: requirements, analysis, and design. J Object Orient Program 9(8):54–57
International Institute of Business Analysts: Business Analysts Body of Knowledge. http://www.theiiba.org/AM/Template.cfm?Section=Body_of_Knowledge. Version 1.6. Last accessed February 2009
Jaaksi A (1998) Our cases with use cases. J Object Oriented Program 10(9):58–65
Jacobson I (1992) Object-oriented software engineering: a use case driven approach. Addison-Wesley, Reading
Kulak D, Guiney E (2000) Use cases: requirements in context. Addison-Wesley, Reading
Mantei MM, Teorey TJ (1988) Cost/benefit analysis for incorporating human factors in the software lifecycle. Commun ACM 31:428–439
Mattingly L, Rao H (1998) Writing effective use cases and introducing collaboration cases. J Object Oriented Program 11(6):77–84
Mugridge R, Cunningham W (2005) Fit for developing software: framework for integrated tests. Prentice Hall, Englewood Cliffs
Nebut C, Fleurey F, Le Traon Y, Jézéquel J (2006) Automatic test generation: a use case driven approach. IEEE Trans Soft Eng 32(3):140–155
OMG 2003, UML Superstructure Specification, Object Management Group. http://www.omg.org/docs/ptc/03-08-02.pdf, 2003
Rosenberg D, Scott K (1999) UC driven object modeling with UML. Addison-Wesley, Reading
Rosenberg D, Stephens M, Collins-Cope M (2005) Agile development with ICONIX process: people process and pragmatism. Apress, Berkely
Rosson MB, Maass S, Kellogg WA (1987) Designing for designers: an analysis of design practice in the real world. In: Proceedings of CHI+GI’87 conference, 1987, pp 137–141
Ryser J, Glinz M (1999) A scenario-based approach to validating and testing software systems using statecharts. In: Proceedings of 12th international conference on software and systems engineering and their applications
Sauvé JP, Neto OLA, Cirne W (2006) Tools and environments: EasyAccept: a tool to easily create, run and drive development with automated acceptance tests. In: Proceedings of the 2006 international workshop on Automation of software test AST ‘06
Schneider G, Winters J (1998) Applying use cases—a practical guide. Addison-Wesley, Reading
Selenium Reference Documentation. http://www.openqa.org/selenium-core/documentation.html. Last accessed 21 Jan 2008
Acknowledgments
The authors would like acknowledge the support of King Fahd University of Petroleum and Minerals in the development of this work.
Author information
Authors and Affiliations
Corresponding author
Appendices
Appendix 1: syntax for creating ColumnFixtures and RowFixtures
A ColumnFixture is most suitable for checking rules and calculations—basically input/output relationships in the absence of state information. For a given business logic, a series of input values are provided and the resulting outputs are checked accordingly. The fixture shown in Table 14 tests the return on investment calculation, which is used to test the behavior described by the “Calculate Investments” UC.
RowFixtures are more suitable for checking sets of data. Rows in the test data are compared to the contents of objects under test. Test data are used to examine an object under test for any missing or surplus (unexpected) data sets. The test shown in Table 15 is also relative to the behavior described by the “Perform Transactions” UC and it evaluates the transaction log after the transactions performed in the test presented by the ActionFixture shown in Table 16. FIT uses the fixtures created to generate code skeletons for later implementation.
When fixtures run, the data returned by the software under test are compared against the values provided in the tables. Test results are indicated by color-coding the cells containing the expected data (cell containing output). For example, running the RowFixture shown in Table 15 will result in coloring the data fields of “Balance” column. The following is the list of color codes for test results as defined in [19]:
-
Green: The software returned an expected value.
-
Red: The software returned an incorrect value.
-
Yellow: The software caused an exception to be thrown.
-
Grey background: The cell was ignored for some reason.
-
Grey text: When cell is left intentionally blank by the user, FIT will fill in the answer from your software.
Appendix 2: detailed robustness analysis of the featured UCs
2.1 Traced paths through the robustness diagram of the “generate restaurant map for city” UC
2.1.1 Basic flow:
-
1.
Get restaurants for current city with valid zoom setting
-
1.1.
The MapViewer interface is provided with the current city and the zoom setting by the “Generate City” UC or the User.
-
1.2.
MapViewer invokes “get restaurants for city” given the current city and the zoom setting
-
1.3.
“get restaurants for City” then passes these parameters to “map scale is OK?” to check the validity of the zoom setting.
-
1.4.
Given the validity of the zoom setting, “map scale is OK?” then passes on the two parameters to the RestaurantServer
-
1.5.
RestaurantServer invokes MapServer to get the restaurant layer
-
1.6.
MapServer returns the Restaurant layer to RestaurantServer
-
1.7.
RestaurantServer then return the queried restaurants to “map scale is OK?
-
1.8.
“map scale is OK?” then returns the restaurants to “get restaurants for city”
-
1.9.
“get restaurants for city” then creates the RestaurantCollection
-
1.1.
Inputs: Current City, Zoom setting
-
2.
Get map
-
2.1.
The MapViewer interface is provided with the current city and the zoom setting by the “Generate City” UC.
-
2.2.
MapViewer invokes “get map for City” and provides it with the two external parameters
-
2.3.
“get map for City” passes those two parameters to the MapServer which return the required map data that can be used to build the map
-
2.4.
“get map for City” uses the returned map data to build a Map
-
2.1.
-
3.
Add restaurant icons to map
-
3.1.
“add Restaurant icons to map” retrieves information about the Restaurants to be displayed as icons from the RestaurantCollection
-
3.2.
“add Restaurant icons to map” retrieves information about the desired display filters from the DisplayFilter
-
3.3.
“add Restaurant icons to map” add the qualifying Restaurants as icons by editing the Map entity object
-
3.1.
Inputs: DisplayFilter
Outputs: Edited Map entity object containing Restaurant icons
2.1.2 Alternative flow: invalid zoom setting
-
1.
Get restaurants for current city with invalid zoom setting
-
1.1.
The MapViewer interface is provided with the current city and the zoom setting by the “Generate City” UC or the User.
-
1.2.
MapViewer invokes “get restaurants for city” given the current city and the zoom setting
-
1.3.
“get restaurants for city” then passes these parameters to “map scale is OK?” to check the validity of the zoom setting.
-
1.4.
“map scale is OK?” determines that the given zoom setting is invalid invokes the “Show Invalid Zoom Popup” control object.
-
1.5.
The “Show Invalid Zoom Popup” object then creates an interface object “Invalid Zoom Popup” to display a message prompting the User change the zoom setting.
-
1.1.
Inputs: Current city, zoom setting
Outputs: Invalid zoom popup
Appendix 3: analyzing UC display rollover information
The “Display Rollover Information” UC extends the “View Map” UC to provide additional information to the “User” about restaurants displayed in the map”. The additional information are presented in the form of a popup and is only presented when the “User” points to a restaurant icon or clicks on it with the mouse cursor. The UC description is shown in Table 17.
3.1 Examining the UC description and creating its HLATs (Phase 1)
A common precondition for all flows is that the map is displayed. For the Basic Flow to be performed successfully, the map must contain at least one restaurant icon. In order to perform the Alternative Flow: Clicked on coordinates with multiple restaurants, where the “User” clicks on coordinates with multiple restaurant icons, it is required that the map contain at least two restaurant icons located at the same coordinates. Finally, for the Alternative Flow: Clicked on coordinates with no restaurants, where a “User” clicks on nothing, it is not necessary for the map to contain any restaurant icons. The set of HLATs created are shown in Table 18.
It is important to note that the output of the Alternative Flow: Clicked on coordinates with no restaurants indicates that nothing should happen in response to a mouse click. However, how is it possible to verify that nothing happened? From a Software Testing perspective, to verify that nothing has happened, certain data values need to be checked in order to determine that the system state has not changed. Therefore, an infinite number of tests to explore an infinite number of scenarios will be required to ensure that the system behaves correctly, which is infeasible and unpractical. Therefore, it is a judgment call as to how many tests should be created, and which specific scenarios they should address.
3.2 Robustness analysis (Phase 2)
Tracing the steps in each flow indicate that MapViewer handles mouse inputs (see Appendix 2). For the Basic Flow and the Alternative Flow: Clicked on coordinates with multiple restaurants, the interface object MapTipWindow implements the display of the map tip window. The map tip window is generated in response to a mouse pointer moving over it (Basic Flow) or a mouse clicking at coordinates where multiple restaurant icons are present (Alternative Flow: Clicked on coordinates with multiple restaurants). Meanwhile, for both the Basic Flow and the Alternative Flow: Clicked on coordinates with multiple restaurants, the RestaurantInfoPopup object handles the popup window containing information about the selected restaurant. The results of performing robustness on the flows are shown in Tables 19, 20, 21, respectively.
3.2.1 Basic flow:
-
1.
Display Map Tip Window containing the name of the pointed to Restaurant icon
-
1.1.
The “User” rolls the mouse cursor over a Restaurant icon presented by the “MapViewer” interface.
-
1.2.
The “MapViewer” detects that the mouse cursor is over a Restaurant icon and invokes “Change cursor and highlight Restaurant icon” to change the cursor to “selection hand” and the Restaurant icon to “selected Restaurant”.
-
1.3.
“Change cursor and highlight Restaurant icon” then invokes “Get Restaurant name(s)” to get the name of the pointed to Restaurant.
-
1.4.
“Create the Tip Text” is then invoked to create tip text containing the Restaurant name.
-
1.5.
“Show the tip window” is then invoked to show the tip window.
-
1.6.
The tip window is then visually displayed and handled by the “Map Tip Window” interface.
-
1.1.
Inputs: Coordinates of mouse pointer that occurred over a Restaurant icon.
Outputs: Map Tip Window containing the name of the Restaurant that had the mouse roll over it.
-
2.
Display a popup window containing various information about the clicked on Restaurant
-
2.1.
The “MapViewer” interface is provided with the coordinates of a mouse click from the “User”.
-
2.2.
The “MapViewer” detects that the mouse was clicked on a single Restaurant icon or name in a list.
-
2.3.
The attributes of the clicked Restaurant is retrieved using “Get Restaurant Attributes”
-
2.4.
“Get Restaurant Attributes” retrieves the required Restaurant information from the “Restaurant” entity that corresponds to the clicked Restaurant.
-
2.5.
The Restaurant attributes are then used by “Show Restaurant Info Popup” to prepare them for display.
-
2.6.
After the Restaurant attributes are prepared, they are displayed and controlled by the “Restaurant Info Popup” interface.
-
2.1.
Inputs: Coordinates of mouse click that occurred over a Restaurant icon.
Outputs: Popup window containing the information of the Restaurant that was selected.
3.2.2 Alternative flow: clicked on coordinates with multiple restaurants
-
1.
Generate Pop-up of Clicked Restaurants
-
1.1.
The “MapViewer” interface is provided with the coordinates of a mouse click from the “User”.
-
1.2.
The “MapViewer” detects that the click was on multiple Restaurants and invokes “Get list of Restaurants”.
-
1.3.
The list of Restaurants are retrieved and stored in a “MultipleRestaurantCluster” object.
-
1.4.
The “MultipleRestaurantCluster” object then invokes “Get Restaurant name(s)” to get the name of each Restaurant it contains.
-
1.5.
“Get Restaurant name(s)” is then invoked to retrieve the name of each Restaurant in “MultipleRestaurantCluster”.
-
1.6.
“Create the Tip Text” is then invoked to create tip text containing the Restaurant names.
-
1.7.
“Show the tip window” is then invoked to show the tip window.
-
1.8.
The tip window is then visually displayed and handled by the “Map Tip Window” interface.
-
1.1.
Inputs: Coordinates of a mouse click that occurred over multiple Restaurant icons.
Outputs: Map Tip Window showing a list of Restaurants corresponding to the Restaurants that were selected by the mouse click.
-
2.
Display a popup window containing various information about the clicked on Restaurant→See Basic Flow
Inputs: Coordinates of a mouse click that occurred over a Restaurant name in a Map Tip Window.
Outputs: Popup window containing the information of the Restaurant that was selected.
3.2.3 Alternative Flow: Clicked on coordinates with no restaurants
-
1.
Ignore mouse click
-
1.1.
The “MapViewer” interface is provided with the coordinates of a mouse click from the “User”.
-
1.1.
Inputs: Coordinates of mouse click that occurred that do not match a Restaurant icon coordinates.
Outputs: None.
-
2.
Ignore mouse click.
3.2.4 Creating low-level acceptance tests (Phase 3)
The EAT corresponding to the Basic Flow consists of four fixtures (Fig. 16):
-
An ActionFixture to simulate a mouse rollover on a single restaurant icon. The ActionFixture also checks that a tip window ( MapTipWindow ) is displayed;
-
a RowFixture to check that the MapTipWindow is displaying the expected restaurant;
-
an ActionFixture to simulate a mouse click on the restaurant icon. The ActionFicture checks that a pop-up window ( RestaurantInfoPopup ) is displayed; and
-
a RowFixture to examine that the RestaurantInfoPopup is displaying information about the selected restaurant.
The EAT corresponding to the Alternative Flow: Clicked on coordinates with multiple restaurants consists of four fixtures (Fig. 17):
-
An ActionFixture to simulate a mouse click over multiple restaurant icons and that the MapTipWindow is displayed; while a subsequent RowFixture examines the MapTipWindow produced to check that the expected list of restaurant names is displayed; and
-
A second ActionFixture to simulate a mouse click on a single restaurant name displayed by the MapTipWindow , which is followed by a RowFixture to check the details of the restaurant that was selected.
The EAT for the Alternative Flow: Clicked on coordinates with no restaurants (Fig. 18) consists of one ActionFixture that simulates a mouse click over an area with no restraurants and checks that RestaurantInfoPopup is not displayed.
Rights and permissions
About this article
Cite this article
El-Attar, M., Miller, J. Developing comprehensive acceptance tests from use cases and robustness diagrams. Requirements Eng 15, 285–306 (2010). https://doi.org/10.1007/s00766-009-0088-6
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s00766-009-0088-6