CSE 270: Software Testing - Reading Material

2.1 Gathering Requirements Using the SRS

A Software Requirements Specification (SRS) is a comprehensive document that outlines the functional and non-functional requirements of a software system. It serves as a blueprint for the development team, providing detailed information about what the software should achieve and how it should behave. The primary purpose of an SRS is to facilitate clear communication between stakeholders, including clients, project managers, designers, and developers, by specifying the features and functionalities of the software in a structured manner.

Example SRS Document

Key components of a Software Requirements Specification may include:

The first draft of the SRS should be completed early in the software development life cycle so that a line of communication can be established between the business stakeholders and the software development team before too much meaningful work has been done. On the other hand, it is important to not let development of a complete SRS hold up development on parts of the software that are well documented and well understood.

An effective SRS is characterized by requirements with clarity, completeness, and traceability, ensuring that each requirement can be traced back to the business goals and objectives of the software project. Regular reviews and updates to the SRS are often necessary as the project evolves and requirements are refined or changed.

Using the SRS - Pros and Cons

Although using the SRS is a common practice in software development, other methods are commonly found such as creating wiki pages, spreadsheets or documents. We can understand why this happens by considering the pros and cons of using SRS.

Pros

Cons

In summary, while an SRS is a valuable tool for clearly documenting and communicating software requirements, its effectiveness depends on factors such as project size, complexity, and the development methodology employed. Striking a balance between detailed documentation and adaptability is crucial for successful requirement specification.

Standards for Requirements Gathering

Several commonly recognized standards exist for requirements specification, each tailored to different industries, project types, and regulatory environments. These standards provide guidelines and best practices to ensure consistency, clarity, and quality in documenting software requirements. Some of the well-known standards for requirements specification include:

This is only a subset of the available standards for requirements engineering and software process management. Depending on where you work, some of these standards may apply and others may not.

In a report published in 2021, the IEEE standards body acknowledged that standards such as the ones published above are either not widely known in the software engineering industry, or when they are known are not widely adopted. There are many reasons for this but it can be best summarized with the following quote from the text, “The low degree of knowledge of relevant RE standards is an indicator that many requirements engineers feel that standards do not add sufficient value in the context of their work.”

The study can be found here: https://ieeexplore.ieee.org/document/9449943

Creating Effective Functional and Non-Functional Requirements

Creating requirements is a critical step in the software development process, and various techniques are employed to capture and communicate what a system must accomplish. Here are explanations of different ways to create requirements, including bulleted lists, user stories, use cases and prototypes:

Bulleted Lists:

Example

Functional Requirements

Non-functional Requirements

User Stories

Example

As a registered user, I want to be able to reset my password, So that I can regain access to my account if I forget my password.

Use Cases

Example

Use Case: Purchase Item

Description: The user selects items, adds them to the shopping cart, and completes the purchase.

Preconditions: User is logged in and has items in the shopping cart.

Steps:

  1. User selects items.
  2. User adds items to the shopping cart.
  3. User proceeds to checkout.
  4. User provides payment information.
  5. User confirms and completes the purchase.

Postconditions: The system processes the payment, updates the inventory, and sends a confirmation email.

Prototypes

Example

A clickable prototype illustrating the flow of a new feature in a mobile application.

Mobile application mock-up showing 6 UI elements arraigned vertically as follows. Four input boxes, a checkbox to agree to terms and conditions and a Continue button.
Mobile application mockup.

These techniques can be used individually or in combination, depending on the project's needs and the preferences of the development team. The goal is to choose a method that effectively communicates the requirements to all stakeholders and provides a solid foundation for the development process.

Dealing with Missing Requirements:

While the ideal scenario involves a complete set of requirements, the reality often presents challenges with missing information. Effectively addressing missing requirements requires a proactive and collaborative approach.

Conclusion: Navigating the Requirements Landscape

Mastering the art of requirements gathering, analysis, and specification sets the stage for a successful software development journey. From user stories to acceptance criteria and the creation of a Software Requirements Specification, the process demands collaboration, clarity, and adaptability. Testers, as crucial contributors, play a pivotal role in ensuring requirements are not only complete but also testable. By understanding the nuances of requirements and embracing a structured approach, teams can set the foundation for robust testing, effective development, and the delivery of software that aligns with stakeholder expectations.