Skip to main content
Home
  • Tutorials
    • Quality Assurance
    • Software Development
    • Machine Learning
    • Data Science
  • About Us
  • Contact
programsbuzz facebook programsbuzz twitter programsbuzz linkedin
  • Log in

Main navigation

  • Tutorials
    • Quality Assurance
    • Software Development
    • Machine Learning
    • Data Science
  • About Us
  • Contact

Component Testing

Profile picture for user dgulati
Written by dgulati on 09/20/2020 - 21:40

Component testing, also known as unit, module, structure, code, or program testing, focuses on components that are separately testable without integrating with other components. For Example, for any application, Login, Registration, and Forgot Password are three separate components.

Component testing is often performed by the developer who wrote the code, or peer review is done. Developers may alternate component development with finding and fixing defects. Defects are typically fixed as soon as they are found, often with no formal defect management. However, when developers report defects, this provides essential information for root cause analysis and process improvement.

Component testing is often done in isolation from the rest of the system, depending on the software development lifecycle model and the system, which may require mock objects, service virtualization, harnesses, stubs, and drivers. Component testing is performed on the Developer's Local Machine or Development Environment using debugging tools.

Objectives

Typical objectives of component testing include:

  • Verifying whether the functional and non-functional behaviors of the component are as designed and specified. Component testing may cover functionality (e.g., the correctness of calculations), non-functional characteristics (e.g., searching for memory leaks), and structural properties (e.g., decision testing).
  • Finding defects in the component
  • Reducing Risk by finding defects early
  • Building confidence in the component's quality by identifying as many defects as possible
  • Preventing defects from escaping to higher test levels

Test Basis

Examples of work products that can be used as a test basis for component testing include:

  • Detailed design
  • Code
  • Data model
  • Component specifications

Test Objects

Typical test objects for component testing include:

  • Components, units, or modules
  • Code and data structures
  • Classes or Interface
  • Database modules

Typical Defects and Failures

Examples of typical defects and failures for component testing include:

  • Incorrect functionality (e.g., not as described in design specifications)
  • Data flow problems
  • Incorrect code and logic

Specific Approaches and Responsibilities

Often Unit testing is performed after writing the code. However, in Agile Development, writing automated component test cases may precede writing application code. Test Driven Development (TDD) which originated in eXtreme Programming (XP), is an example of a test-first approach. Test-driven development is highly iterative and is based on cycles consisting of five steps:

  1. Developing automated test cases
  2. Executing the Test. The new test should fail for the expected reasons.
  3. Building and integrating small pieces of code
  4. Executing the component tests. All tests should now pass.
  5. Correcting any issues and Code Refactoring

Component Testing Techniques

There are two techniques of Component Testing −

  1. CTIS (Component Testing in Small): Component testing can be executed with or without separating the software components. When the testing is performed by isolating other components, it is known as CTIS.
  2. CTIL (Component Testing in Large): Component testing without separating the software components is known as component testing in large.
Related Content
ISTQB CTFL Tutorial
Test Levels
Integration Testing
  • Log in or register to post comments

Choose Your Technology

  1. Agile
  2. Apache Groovy
  3. Apache Hadoop
  4. Apache HBase
  5. Apache Spark
  6. Appium
  7. AutoIt
  8. AWS
  9. Behat
  10. Cucumber Java
  11. Cypress
  12. DBMS
  13. Drupal
  14. GitHub
  15. GitLab
  16. GoLang
  17. Gradle
  18. HTML
  19. ISTQB Foundation
  20. Java
  21. JavaScript
  22. JMeter
  23. JUnit
  24. Karate
  25. Kotlin
  26. LoadRunner
  27. matplotlib
  28. MongoDB
  29. MS SQL Server
  30. MySQL
  31. Nightwatch JS
  32. PactumJS
  33. PHP
  34. Playwright
  35. Playwright Java
  36. Playwright Python
  37. Postman
  38. Project Management
  39. Protractor
  40. PyDev
  41. Python
  42. Python NumPy
  43. Python Pandas
  44. Python Seaborn
  45. R Language
  46. REST Assured
  47. Ruby
  48. Selenide
© Copyright By iVagus Services Pvt. Ltd. 2023. All Rights Reserved.

Footer

  • Cookie Policy
  • Privacy Policy
  • Terms of Use