Test double: Difference between revisions

Content deleted Content added
m External links: removed link that's already in the refs
Wojtek-tp (talk | contribs)
covered over-the-wire test doubles and service virtualization
Line 9:
* [[Fake object]] (used as a simpler implementation, e.g. using an in-memory database in the tests instead of doing real database access)
* [[Dummy object]] (used when a parameter is needed for the tested method but without actually needing to use the parameter)
 
For both manual and automated [[Black-box_testing|black box testing]] of [[Service-oriented_architecture|service oriented architecture]] [[Software_system|systems]] or [[Microservices|microservices]] [[Software_developer|software developers]] and [[Software_testing|testers]] use test doubles that communicate with the [[System_under_test|system under test]] over a network protocol<ref>Clemson, Toby [https://martinfowler.com/articles/microservice-testing/#testing-component-out-of-process-diagram "Testing Strategies in a Microservice Architecture"], ''martinfowler.com'', 18 November 2014. Retrieved on 07 December 2017.</ref><ref>Byars, Brandon. "Testing Microservices with Mountebank", ''[[Manning Publications]]'', MEAP began March 2017. ISBN 9781617294778. Retrieved on 07 December 2017.</ref>. These test doubles are called different names depending on the tool vendor. A commonly used term is [[Service_virtualization|service virtualization]]. Others used names include [[Comparison_of_API_simulation_tools|API simulation]], API mock<ref>Bryant, Daniel [https://www.infoq.com/news/2016/08/wiremock-v2-api-mocking "API Mocking Tool WireMock v2 Released with Improved Request Matching and Stub Management"], ''[[InfoQ]]'', 16 August 2016. Retrieved on 07 December 2017.</ref>, HTTP stub, HTTP mock, over the wire test double<ref>ThoughtWorks [https://www.thoughtworks.com/radar/tools/mountebank "Technology Radar, Tools: Mountebank"], ''[[ThoughtWorks]]'', November 2015. Retrieved on 07 December 2017.</ref>
<ref>Bulaty, Wojciech [https://www.infoq.com/articles/stubbing-mocking-service-virtualization-differences "Stubbing, Mocking and Service Virtualization Differences for Test and Development Teams"], ''[[InfoQ]]'', 19 February 2016. Retrieved on 07 December 2017.</ref>.
 
Another form of test double is the Verified Fake, a [[Fake object]] whose behavior has been verified to match that of the real object using a set of tests that run against both the Verified Fake and the real implementation.<ref>{{cite web |url=http://codewithoutrules.com/2016/07/31/verified-fakes/ |title=''Write test doubles you can trust using verified fakes'' |last=Turner-Trauring |first=Itamar |year=2016 |accessdate=2016-07-31 }}</ref>
Line 18 ⟶ 21:
* [[Test-driven development]]
* [[Object-oriented programming]]
* [[Service virtualization]]
* [[Comparison of API simulation tools]]
 
==References==