Which are the basic types of test?

Which are the basic types of test?

Understanding Software Testing Types

Overview of Software Testing

  • The discussion begins with an overview of various types of software testing, specifically acceptance tests and service acceptance tests, emphasizing the need for a broader understanding of available testing types.
  • It is noted that there are multiple classifications for tests in literature, leading to inconsistencies in terminology and categorization.

Dimensions of Testing

  • The speaker introduces the concept of classifying tests based on different dimensions, focusing on quality factors verified by each test.
  • Tests aim to verify if system implementations meet expected behaviors, which can be characterized in terms of correctness, performance, security, robustness, and compatibility.

Functional vs. Non-functional Testing

  • The importance of identifying the specific quality factor being tested is highlighted; functional tests focus on verifying correct implementation while non-functional tests may assess other aspects like performance.
  • Examples include functional acceptance testing (e.g., user interface checks), contrasting with performance testing which would have a different classification.

Acceptance Tests Explained

  • Acceptance tests are categorized as functional when they check if functionalities are implemented correctly through visual results from the system's graphical interface.
  • Service acceptance tests also fall under this category but focus primarily on verifying service functionality rather than user interface elements.

Test Execution Context

  • The distinction between different types of acceptance tests is made based on what part or element of the system is being exercised during testing (e.g., direct interaction via GUI vs. service calls).
  • Further clarification is provided regarding how these distinctions affect naming conventions for various test types based on their execution context (e.g., "guy" for GUI-based interactions).

Future Discussions and Class-Based Testing

  • The conversation anticipates future discussions about class-based testing where individual classes or methods will be directly tested instead of services or GUIs.
  • A brief mention indicates that upcoming content will explore additional examples beyond those already discussed.

Understanding Testing in Software Development

Performance and Quality Testing

  • The discussion begins with the importance of performance testing, emphasizing how each dimension contributes to the overall quality assurance process. It highlights that tests can be designed to assess functionalities like student addition and removal.
  • The speaker mentions various combinations of terminology related to testing, indicating that both class and functional tests are essential for verifying operations such as student management.
  • A critical point is made about dependencies in testing; it’s noted that a test executed from an independent class does not rely on other components, which simplifies the testing process.

Unit Tests vs. Class Tests

  • Clarification is provided on the distinction between unit tests and class tests. Unit tests do not solely focus on a single class but can encompass methods or packages, broadening their scope beyond just one component.
  • The concept of unit testing is further elaborated upon, explaining that it involves exercising a specific class while managing its dependencies effectively.

Stubs and Mocks in Testing

  • The use of stubs (or mocks), which simulate behaviors of dependent classes during unit testing, is introduced. This allows for isolated testing without needing full implementations of all components involved.
  • An example illustrates how a stub might function within a student registration system by simulating successful registrations without implementing complete logic for data handling.

Integration Testing

  • Transitioning to integration testing, it's explained that this type of test uses updated versions of dependencies rather than stubs, ensuring more realistic interactions between components being tested.
  • Integration tests are described as crucial when multiple developers work on different parts of a system simultaneously; they ensure compatibility across new code versions before final deployment.

End-to-End Testing

  • End-to-end (E2E) testing encompasses all dependencies within the production environment. It ensures comprehensive validation by including every aspect necessary for real-world application functionality.

Understanding the Importance of Unit and Integration Testing

The Role of Unit Tests

  • Unit tests ensure that new functionalities work correctly with existing code or stubs, but they do not guarantee how components will behave when integrated.
  • If an error occurs after integration, unit tests help identify whether the issue lies within a specific part or in a colleague's implementation.
  • A failing unit test post-integration indicates a problem with dependencies, either due to incorrect implementation by a colleague or misassumptions about behavior.

Integration Testing Insights

  • Integration tests are crucial for locating errors that arise from component interactions; they provide insights into communication issues between parts.
  • Running unit tests early allows developers to catch defects without waiting for colleagues to finish their work, providing immediate feedback on code quality.

Test Pyramid Concept

  • The "test pyramid" illustrates the recommended distribution of different types of tests: more unit tests at the base, fewer integration tests in the middle, and even fewer end-to-end (E2E) tests at the top.
  • This structure is widely adopted in companies to balance testing efficiency and effectiveness; unit tests are faster and provide quicker feedback compared to integration or E2E tests.

Variability in Testing Strategies

  • While the pyramid serves as a guideline, actual testing strategies may vary based on project needs; teams can have different configurations depending on specific situations.
  • Before committing changes, it's essential to run various test suites tailored for different scenarios throughout development cycles.

Acceptance vs. Regression Testing

  • Acceptance tests offer strong guarantees regarding system functionality based on specifications; passing these indicates alignment with client expectations.
  • Regression tests verify that previously functioning features remain intact after changes; they serve as routine checks following each commit or integration.
  • These regression checks are vital for maintaining system stability over time by ensuring no unintended side effects occur from updates.

Basic Functionality Tests

Understanding Acceptance Testing

Characteristics of Acceptance Testing

  • The discussion introduces the concept of "acceptance testing," specifically referring to a type known as "guy acceptance testing." This involves validating that the system meets specified criteria outlined in scenarios and exercises, ensuring contractual guarantees.
  • It is emphasized that these tests are functional in nature. When executed with all dependencies, they qualify as both functional and system acceptance tests.
  • If the tests are run with only some updated dependencies, they transition into being classified as integration acceptance tests while still maintaining their functional aspect.
  • The importance of executing these tests correctly is highlighted, as it directly impacts whether a release can be accepted based on its performance against defined specifications.
Playlists: Testing