Software Development and Testing Overview

Sep 29, 2024

Software Development and Testing

Key Points

  • Software is dynamic, unlike traditional engineering (e.g., bridges).
  • Development involves multiple abstractions and evolving requirements.
  • The primary goal is to ensure code meets product requirements.

Test-Driven Development (TDD)

  • Definition: A development process that emphasizes writing tests before the actual code.
  • Benefits:
    • Scientifically proven to reduce defects.
    • Improves maintainability of the codebase.
  • Drawbacks: Requires additional effort from developers.

Testing Methods

Manual Testing

  • Involves a human clicking through the application and filling forms.
  • Generates Jira tickets for developers to address issues.
  • Limitation: Inefficient for large-scale products.

Automated Testing

  • Utilizes tools to automate testing processes.
  • Developers write specific code to test the main application code.
  • Test files typically end in .test or .spec.

Test Structure

  • Test Suite: Contains one or more individual tests.
  • Individual Test: Begins with it, describes the test case.
  • Expectations/Assertions: Used to verify the results of the tests.
    • If false, the test fails; if true, it passes.

Test Runners

  • Examples: Jest, Karma.
  • Can run tests automatically in the background or on CI servers before deployment.

Types of Testing

  1. Unit Testing:

    • Tests individual functions or methods.
    • Example: Checks if a function returns the correct value for given inputs.
  2. Integration Testing:

    • Evaluates how different components work together.
    • Example: Checks if a component can access data from a database service.
  3. End-to-End Testing:

    • Conducted in a mock browser or device.
    • Simulates actual user interactions (e.g., clicking buttons, filling forms).
    • Functions like automated manual testing.
  4. Other Types:

    • Performance Testing
    • Smoke Testing

Conclusion

  • More detailed exploration of testing strategies to come in future content.
  • Call to action: Like the video for more short videos on this topic.