Skip to main content

Command Palette

Search for a command to run...

Software Engineering Principles

Updated
•6 min read•View as Markdown
S

Hello people. I am here to document my learnings.

See yah!!

Write on Software testing and different software testing techniques.

Software testing is the process of evaluating a software application or system to identify differences between expected and actual results. It ensures that the software meets the specified requirements, is free of defects, and performs as intended.

Techniques Used for Software Testing:

Software testing techniques can be broadly categorized into static and dynamic testing.

1. Static Testing Techniques:

These techniques are applied without executing the code.

  1. Code Reviews:

    • Developers manually review the source code to identify errors, coding standards violations, or potential improvements.

    • Example: Peer reviews, walkthroughs, and inspections.

  2. Static Analysis:

    • Tools analyze the code for syntax errors, coding standards, and potential vulnerabilities without executing it.

    • Example: Tools like SonarQube for code quality analysis.

  3. Document Reviews:

    • Testing team reviews requirements, design documents, and test plans to ensure clarity, completeness, and correctness.

    • Example: Reviewing a Software Requirements Specification (SRS) document.

2. Dynamic Testing Techniques:

These techniques involve executing the software to validate its behavior.

  1. Black-Box Testing:

    • The internal structure of the software is not known to the tester. Testing is based on requirements and functionality.

    • Techniques:

      • Equivalence Partitioning: Dividing input data into valid and invalid partitions to reduce test cases.

      • Boundary Value Analysis: Testing at the boundaries of input ranges.

      • Decision Table Testing: Testing combinations of inputs and their corresponding outputs.

  2. White-Box Testing:

    • The internal structure of the software is known to the tester. Testing focuses on code logic, paths, and conditions.

    • Techniques:

      • Statement Coverage: Ensuring every line of code is executed at least once.

      • Branch Coverage: Ensuring every decision point (e.g., if-else) is tested.

      • Path Coverage: Testing all possible paths through the code.

      • Condition Coverage: Testing all possible outcomes of logical conditions.

  3. Gray-Box Testing:

    • A combination of black-box and white-box testing. Testers have partial knowledge of the internal structure.

    • Example: Testing APIs.

  4. Functional Testing:

    • Validates that the software functions according to the specified requirements.

    • Examples:

      • Unit Testing: Testing individual components or units of code.

      • Integration Testing: Testing interactions between integrated modules or components.

      • System Testing: Testing the complete system as a whole.

      • Acceptance Testing: Ensuring the software meets user requirements and is ready for deployment.

  5. Non-Functional Testing:

    • Validates the non-functional aspects of the software.

    • Examples:

      • Performance Testing: Evaluating speed, responsiveness, and stability under load.

      • Load Testing: Testing the system's behavior under expected load conditions.

      • Stress Testing: Testing the system's behavior under extreme conditions.

      • Usability Testing: Evaluating how user-friendly the software is.

      • Security Testing: Identifying vulnerabilities and ensuring data protection.

  6. Regression Testing:

    • Ensures that new changes or fixes do not introduce new defects or break existing functionality.

    • Example: Re-running previously executed test cases after a code change.

  7. Exploratory Testing:

    • Testers explore the software without predefined test cases to identify unexpected issues.

    • Example: Ad-hoc testing based on the tester's intuition and experience.

  8. Automated Testing:

    • Using tools and scripts to automate repetitive or complex test cases.

    • Example: Selenium for web application testing, JUnit for unit testing.


Phases of SDLC. How can the SDLC be used to analyze, plan and document systems changes in an organization? Explain with suitable examples.

The Software Development Life Cycle (SDLC) is a structured process used to design, develop, and maintain high-quality software systems.

Phases of SDLC:

  1. Planning:

    • Objective: Define the project scope, goals, and feasibility.

    • Activities: Identify requirements, assess risks, estimate costs, and create a project plan.

    • Deliverables: Project charter, feasibility study, and initial project plan.

  2. Analysis:

    • Objective: Understand and document the system requirements.

    • Activities: Gather requirements through interviews, surveys, and observations. Analyze current systems and processes.

    • Deliverables: Requirement Specification Document (SRS).

  3. Design:

    • Objective: Create a blueprint for the system.

    • Activities: Design system architecture, databases, user interfaces, and workflows.

    • Deliverables: System Design Document (SDD), wireframes, and prototypes.

  4. Implementation (Development):

    • Objective: Build the system based on the design.

    • Activities: Write code, integrate components, and perform unit testing.

    • Deliverables: Functional software system.

  5. Testing:

    • Objective: Ensure the system meets requirements and is free of defects.

    • Activities: Perform system testing, integration testing, and user acceptance testing (UAT).

    • Deliverables: Test cases, bug reports, and a tested system.

  6. Deployment:

    • Objective: Release the system to users.

    • Activities: Install the system, migrate data, and train users.

    • Deliverables: Deployed system and user documentation.

  7. Maintenance:

    • Objective: Ensure the system remains functional and up-to-date.

    • Activities: Fix bugs, optimize performance, and add new features.

    • Deliverables: Updated system and maintenance logs.

Using SDLC to Analyze, Plan, and Document System Changes:

The SDLC provides a structured framework for managing system changes in an organization. Here's how it can be applied, using the example of upgrading a customer relationship management (CRM) system:

  1. Analyze System Changes:

    • Use the Analysis Phase to identify the need for changes. For example:

      • A company wants to upgrade its CRM system to improve sales tracking. During this phase, stakeholders (e.g., sales teams, managers) are interviewed to understand their pain points with the current system. Requirements for the new system, such as better reporting and integration with marketing tools, are documented.
  2. Plan System Changes:

    • Use the Planning Phase to define the scope, budget, and timeline for the changes. For example:

      • For the CRM upgrade, a project plan is created, outlining resource allocation (e.g., developers, analysts), risk management (e.g., potential delays), and a timeline for implementation. The budget for software licenses, training, and hardware is also estimated.
  3. Document System Changes:

    • Use the Design Phase to document the proposed changes. For example:

      • A System Design Document (SDD) is created for the new CRM system, detailing the architecture (e.g., cloud-based), database schema (e.g., customer data tables), and user interface (e.g., dashboards for sales analytics). Wireframes and prototypes are developed to visualize the new system.
  4. Implement and Test Changes:

    • Use the Implementation and Testing Phases to build and validate the changes. For example:

      • The new CRM system is developed, with features like automated sales reporting and integration with email marketing tools. Unit testing ensures individual components work correctly, while user acceptance testing (UAT) ensures the system meets the sales team's needs.
  5. Deploy and Maintain Changes:

    • Use the Deployment and Maintenance Phases to roll out the changes and ensure ongoing functionality. For example:

      • The CRM system is deployed to all sales teams, and employees are trained on how to use it. Data from the old system is migrated to the new one. Ongoing maintenance addresses bugs, optimizes performance, and adds new features based on user feedback.