Software Development Life Cycle (SDLC): Methodologies, Testing, and Tools

Software Development Life Cycle (SDLC)

SDLC Phases

The SDLC typically involves seven phases:

  1. Planning
  2. Defining Requirements
  3. Design and Prototyping
  4. Software Development
  5. Testing
  6. Deployment
  7. Operations and Maintenance

SDLC Methodologies

Waterfall Method

The Waterfall method follows a sequential approach, where each phase is completed before moving on to the next. It is documentation-driven and well-suited for large, critical applications with clearly defined requirements.

Pros:

  • Disciplined and structured process
  • Clear understanding of objectives before implementation
  • Early planning can save time during development

Cons:

  • Limited flexibility and feedback between phases
  • No development parallelism
  • Single delivery date, with integrations often happening late in the process
  • Challenges in accommodating changes

Kanban

Kanban uses a visual system with stages to represent the workflow. It limits the number of tasks in each stage to improve quality and focus. Tasks are not assigned specific deadlines, making it suitable for individual or small group development.

Scrum

Scrum is an agile framework that emphasizes teamwork, transparency, and adaptability. It involves specific roles, such as Scrum Master, Scrum Team, and Product Owner, and uses time-boxed iterations called sprints.

Pros:

  • Balances development and business interests
  • Dedicated roles for focused work
  • Allows for shifting priorities

Cons:

  • Frequent meetings
  • Potential for feature creep
  • No defined end date or final product

Sprint Cycle

A sprint cycle in Scrum involves the following steps:

  1. Product Backlog creation and prioritization
  2. Sprint Planning and task breakdown
  3. Daily Stand-up meetings for information sharing
  4. Sprint Review and evaluation
  5. Sprint Retrospective and planning for the next sprint

Prerequisites for Effective SDLC

  1. Problem Definition
  2. Requirements Gathering and Agreement
  3. Architecture Design

User Stories

User stories are concise descriptions of features from a user’s perspective. They follow the format: “As a [role], I [want] [goal] so that [reason].”

UML (Unified Modeling Language)

UML is a visual language for modeling software systems. It includes diagrams for classes, relationships, and interactions.

CMake

CMake is a tool for managing the build process of software projects. It generates platform-specific build files, such as Makefiles.

Git Practices

Git is a version control system for tracking changes in source code. Best practices include using a .gitignore file, writing descriptive commit messages, and branching for new features.

GTest

GTest is a unit testing framework for C++. It provides assertions and mocking capabilities.

GDB (GNU Debugger)

GDB is a debugger for C and C++ programs. It allows setting breakpoints, inspecting variables, and stepping through code.

Valgrind

Valgrind is a tool for memory debugging and profiling. It can detect memory leaks, invalid memory access, and other memory-related errors.

Testing

Types of Testing

  • Unit Testing: Tests individual units of code (e.g., functions, classes)
  • Integration Testing: Tests how different components interact
  • Smoke Testing: Tests for major issues and stability
  • Alpha/Beta Testing: Early testing with limited users
  • Acceptance Testing: Verifies if business requirements are met
  • Performance Testing: Evaluates system performance under load
  • Load Testing: Tests system behavior under heavy load
  • Stress Testing: Tests system behavior under extreme conditions
  • Security Testing: Identifies security vulnerabilities
  • Compatibility Testing: Ensures functionality across platforms
  • Recovery Testing: Tests system recovery after failures
  • Usability Testing: Evaluates user experience
  • Localization Testing: Tests for regional adaptations
  • Global Testing: Tests for internationalization
  • Compliance Testing: Ensures adherence to standards and regulations
  • Regression Testing: Retests after changes to ensure functionality

Code Coverage

Code coverage measures the percentage of code executed by tests. A minimum of 80% coverage is generally recommended.

Continuous Integration and Delivery

Continuous Integration (CI) involves frequent merging of code changes into a main branch. Continuous Delivery (CD) automates the release process to deliver features quickly and reliably.

Unit Testing with GTest

GTest provides assertions for verifying expected outcomes in unit tests. It also supports mocking objects for simulating dependencies.

GMock

GMock is a mocking framework that works with GTest. It allows creating mock objects with predefined behaviors.

Git Commands

  • git commit: Records changes to the local repository
  • git add: Stages changes for commit
  • git push: Uploads local commits to a remote repository
  • git pull: Downloads changes from a remote repository
  • git branch: Creates or manages branches
  • git checkout: Switches between branches
  • git merge: Combines branches

html>