DEV Community

Cover image for Know Your Tests: A Summary of Common Testing Patterns
Hannah Masila
Hannah Masila

Posted on

Know Your Tests: A Summary of Common Testing Patterns

Unit Testing
Unit testing is where individual units/ components of a software are tested. A unit is the smallest testable part of software. It usually has one or a few inputs and usually a single output. In procedural programming a unit may be an individual program, function, procedure, etc. In object-oriented programming, the smallest unit is a method. The purpose is to validate that each unit of the software performs as designed.
Integration Testing
Integration tests verify that different parts of an application work correctly together. Unlike unit testing, integration tests frequently involve application infrastructure concerns, such as a database, file system, network resources, or web requests and responses. Unit tests use fakes or mock objects in place of these concerns, but the purpose of integration tests is to confirm that the system works as expected with these systems.
End-to-end Testing
End to end testing is performed by the testing team and the focus is to test end to end flows e.g. right from order creation till reporting or order creation till item return etc and checking. End to end testing is usually focused on mimicking real life scenarios and usage. End to end testing involves testing information flow across applications.
Acceptance Testing
Acceptance testing is a testing technique performed to determine whether or not the software system has met the requirement specifications. The main purpose of this test is to evaluate the system’s compliance with the business requirements and verify if it is has met the required criteria for delivery to end users.
Functional Testing
Functional tests check a particular feature for correctness by comparing the results for a given input against the specification. Functional tests don’t concern themselves with intermediate results or side-effects, just the result (they don’t care that after doing x, object y has state z). They are written to test part of the specification such as, “calling function Square(x) with the argument of 2 returns 4”.

Top comments (4)

Collapse
 
lluismf profile image
Lluís Josep Martínez

Where are the patterns?

Collapse
 
marioidival profile image
Mario Idival

Unit test is a pattern. Integration test is a pattern... Do you read this blog post?

Collapse
 
lluismf profile image
Lluís Josep Martínez

These are testing patterns wiki.c2.com/?TestingPatterns

Unit and integration testing are levels en.wikipedia.org/wiki/Software_tes...

Collapse
 
courier10pt profile image
Bob van Hoove

Thanks, that was short and informative :)