Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Test automation
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Testing at different levels == A strategy to decide the amount of tests to automate is the test automation pyramid. This strategy suggests to write three types of tests with different granularity. The higher the level, less is the amount of tests to write.<ref name=":0" /> === Unit, service, and user interface levels === [[File:The test automation pyramid.png|thumb|The test automation pyramid proposed by Mike Cohn<ref name=":0" />]] * As a solid foundation, [[unit testing]] provides robustness to the software products. Testing individual parts of the code makes it easy to write and run the tests. Developers write unit tests as a part of each story and integrate them with CI.<ref>{{Cite web |title=Full Stack Testing by Gayathri Mohan |url=https://www.thoughtworks.com/en-us/insights/books/full-stack-testing |access-date=2022-09-13 |website=www.thoughtworks.com |language=en-US}}</ref> * The service layer refers to testing the services of an application separately from its user interface, these services are anything that the application does in response to some input or set of inputs. * At the top level we have [[UI Testing|UI testing]] which has fewer tests due to the different attributes that make it more complex to run, for example the fragility of the tests, where a small change in the user interface can break a lot of tests and adds maintenance effort.<ref name=":0">{{cite book | author = Mike Cohn | title = Succeeding with Agile | year = 2010 | publisher = Raina Chrobak | isbn = 978-0-321-57936-2}}</ref><ref>[https://martinfowler.com/articles/practical-test-pyramid.html The Practical Test Pyramid], by Ham Vocke</ref> === Unit, integration, and end-to-end levels === [[File:Testing Pyramid.png|alt=A triangular diagram depicting Google's "testing pyramid". Progresses from the smallest section "E2E" at the top, to "Integration" in the middle, to the largest section "Unit" at the bottom.|thumb|Google's testing pyramid<ref name=":1">{{Cite web |title=Just Say No to More End-to-End Tests |url=https://testing.googleblog.com/2015/04/just-say-no-to-more-end-to-end-tests.html |access-date=2023-02-11 |website=Google Testing Blog |language=en}}</ref>]] One conception of the testing pyramid contains unit, integration, and end-to-end unit tests. According to [[Google]]'s testing blog, unit tests should make up the majority of your testing strategy, with fewer integration tests and only a small amount of end-to-end tests.<ref name=":1" /> * Unit tests: These are tests that test individual components or units of code in isolation. They are fast, reliable, and isolate failures to small units of code. * Integration tests: These tests check how different units of code work together. Although individual units may function properly on their own, integration tests ensure that they operate together coherently. * End-to-end tests: These test the system as a whole, simulating real-world usage scenarios. They are the slowest and most complex tests.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)