Why I Don’t Use #Mocking Frameworks and Why You Might Not Need Them Either by @SimonMartinelli
https://martinelli.ch/why-i-dont-use-mocking-frameworks-and-why-you-might-not-need-them-either/
Given the major pre-work from Ryan Hoegg (shamsoft) i've been diving back into my coding passion, resulting in a major evolution of sham-ssh. https://github.com/janesser/sham-ssh #java #sshd #mocking
Mocha v3.0.0-rc.1 released
Looking for people to test the release candidate!
Highlights:
* Allow keyword arguments to match an expectation expecting *only* positional arguments
* Explicit support for Ruby v3.4
* Freeze all string literals used internally
* Use Ruby v1.9 Hash syntax in failure messages
* Drop support for Ruby v2.1
* Drop support for Minitest < v5
https://rubygems.org/gems/mocha/versions/3.0.0.pre.rc.1
Thanks to Herwin W, Nicholaus Ames, Sean Dilda & @drewnovo.
From AI-Aware Sites to AI-Aware APIs: Introducing the AI-Ready Isolator++ API by Eli Lopien.
https://www.typemock.com/introducing-the-ai-ready-isolator-api/
#ai #apis #cpp #unittesting #mocking #programming
From AI-Aware Sites to AI-Awar...
Mocha v2.7.1 released
* Deprecate `Configuration#stubbing_method_on_nil=` in preparation for dropping support for Ruby v2.1
* Indicate when parameter matcher logic is defined by block passed to `Expectation#with`
* Improve documentation for `Expectation#with`, especially when it is passed a block
Mocha v2.7.0 released
* Fail fast if invocation matches never expectation - thanks to Duke Tran & @DavidStosik for reporting
This fixes a long-time bug so that the following will fail fast instead of passing:
foo.stubs(:bar)
foo.expects(:bar).never
foo.bar # => unexpected invocation error
Mocha v2.6.1 released
* Fix logic added in v2.6.0 for displaying deprecation warnings for expectation with never cardinality - thanks to @DavidStosik for reporting.
The following will still pass despite an erroneous deprecation warning displayed in v2.6.0 suggesting otherwise:
foo.expects(:bar).never
foo.expects(:bar).once
foo.bar
Mocha v2.6.0 released
* Expectation with never cardinality should display deprecation warning - thanks to Duke Tran for reporting and testing.
In anticipation of fixing a long-time bug so that the following will fail fast instead of passing:
foo.stubs(:bar)
foo.expects(:bar).never
foo.bar # => deprecation warning / unexpected invocation error
I apparently missed this post from @maelle on #mocking #tests in #RStats packages, specifically recommending `testthat::local_mocked_bindings()` over `mockery::stub()` and giving a clear example of how to mock base functions.
https://blog.r-hub.io/2024/03/21/mocking-new-take/
Very pertinent today as one of the codebases I'm working on used `mockery::stub()` and my colleague found that it was leaking to other tests in a pattern that could only be described as...
vicious mockery (roll 1d4 for damage)
Selbstheilende Testfälle ein technischer Mythos oder Realität?
Selbstheilende was......
Nun erst mal ja, es gibt technische Möglichkeiten, selbstheilende Test
https://www.dev-crowd.com/2024/10/24/selbstheilende-testfaelle-ein-technischer-mythos-oder-realitaet/
#Mocking #MutationTesting #OwaspZap #Penetrationtest #Python #RegressionsTest #Requests #RestAPI #Sandboxtesting #Scapy #Security #Selenium #Server #SystemTestNetzwerk #Testframework #Webdriver
Tagged stable release v49 of Trompeloeil #cplusplus #mocking library.
* Automatic deduction of function arity
* Composable range matchers
* Runtime .RT_TIMES()
* Shortcirquited .WITH() logic
Moderne Regressionstests in der Cybersicherheit: Ein Paradigmenwechsel – Teil 1 neuer Ansatz, neuer Workflow
https://www.dev-crowd.com/2024/08/10/moderne-regressionstests-in-der-cybersicherheit-ein-paradigmenwechsel-teil-1-neuer-ansatz-neuer-workflow/
#Engineering #Mocking #MutationTesting #OwaspZap #PenetrationTest #Penetrationtest #Programmierung #Python #RegressionsTest #Requests #RestAPI #Sandboxtesting #Scapy #Security #Selenium #SystemTestNetzwerk #TestEngineering #Testframework #Testl
I'm looking for a way to test my #PHP #Symfony application #BehaviourDriven using #TDD without getting into DI #mocking hell. Currently ~90% of my tests consist of (mockery) mocks and their expectations. Are there ways/approaches to reduce this mocking on unit test level and focus more on the expected behaviour of the functions without having to constantly adapt the mocks during refactorings?
Any ideas/ tools/ articles/ videos/ composer packages?
While I've always tried hard to have Mocha support EOL versions of Ruby unless there was a compelling reason not to, I'm starting to think about dropping support for Ruby v2 because of all the hassle around the transition to support for keyword arguments.
Ruby v2.7 was EOL on 31 Mar 2023, i.e. 18 months ago.
Mocha still notionally supports Ruby v2.1 and later.
…but in case any of you want to do something similar, here’s me mocking a WritableStream using a Proxy to provide mock stdout and stderr streams to Console instances to capture the output and save them in my database:
https://codeberg.org/kitten/app/src/branch/logs/src/Logs.js#L47
And here’s the actual monkeypatching code:
https://codeberg.org/kitten/app/src/branch/logs/src/Logs.js#L140
Mocks let us build sophisticated tests and avoid integration test churn. But are they any good? Explore the debate. #testing #Mocking #java https://debugagent.com/api-mocking-essential-and-redundant