Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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 is mentioned a lot. What exactly is unit testing? What is integration testing? What other important testing techniques should I be aware of?

Programming is not my profession, but I would like it to be some day;stuff about production etc is welcomed too.

like image 299
Daniel Sloof Avatar asked Jan 13 '09 03:01

Daniel Sloof


People also ask

What is unit testing and integration testing?

Unit Testing is a kind of white box testing, whereas Integration Testing is a kind of black-box testing. For Unit Testing, accessibility of code is required, as it tests the written code, while for Integration Testing, access to code is not required, since it tests the interactions and interfaces between modules.

What are the 4 types of testing?

There are four main stages of testing that need to be completed before a program can be cleared for use: unit testing, integration testing, system testing, and acceptance testing.


1 Answers

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)
like image 149
Steven A. Lowe Avatar answered Oct 04 '22 21:10

Steven A. Lowe