What are unit testing and integration testing, and what other types of testing should I know about?

后端 未结 9 2160
感动是毒
感动是毒 2020-12-22 22:42

I\'ve seen other people mention several types of testing on Stack Overflow.

The ones I can recall are unit testing and integration testing. Especially unit testing i

相关标签:
9条回答
  • 2020-12-22 23:12

    should I be aware of any other important testing of my code?

    These are some of the different kinds of test, according to different phases of the software lifecycle:

    • Unit test: does this little bit of code work?
    • Unit test suite: a sequence of many unit tests (for many little bits of code)
    • Integration test: test whether two components work together when they're combined (or 'integrated')
    • System test: test whether all components work together when they're combined (or 'integrated')
    • Acceptance test: what the customer does to decide wheher he wants to pay you (system test discovers whether the software works as designed ... acceptance test discovers whether "as-designed" is what the customer wanted)

    There's more:

    • Usability test
    • Performance test
    • Load test
    • Stress test

    And, much more ... testing software is nearly as wide a subject as writing software.

    0 讨论(0)
  • 2020-12-22 23:12

    Unit Testing: The testing done to a unit or to a smallest piece of software. Done to verify if it satisfies its functional specification or its intended design structure.

    Integration Testing: Testing the related modules together for its combined functionality.

    Regression Testing: Testing the application to verify that modifications have not caused unintended effects.

    Smoke Testing: Smoke testing is verified whether the build is testable or not.

    0 讨论(0)
  • 2020-12-22 23:14

    Off the top of my head:

    • Unit testing in the sense of "testing the smallest isolatable unit of an application"; this is typically a method or a class, depending on scale.
    • Integration testing
    • Feature testing: this may cut across units, and is the focus of TDD.
    • Black-box testing: testing only the public interface with no knowledge of how the thing works.
    • Glass-box testing: testing all parts of a thing with full knowledge of how it works.
    • Regression testing: test-cases constructed to reproduce bugs, to ensure that they do not reappear later.
    • Pointless testing: testing the same basic case more than one way, or testing things so trivial that they really do not need to be tested (like auto-generated getters and setters)
    0 讨论(0)
提交回复
热议问题