#UnitTesting
Although I can turn off this dialog using automationmodetool, I have some security concerns.
Do you authorize UI tests manually or give up and disable automation mode authorization on your personal machines?
#buildinpublic #unittesting

"React Testing Library & Accessibility - DEV Community" https://dev.to/steady5063/react-testing-library-accessibility-4fom #react #unittesting #accessibility
So I guess it was worth, implementing this #unitTest back then. Thank you, past self!
#unitTests #unitTesting
Simple idea how to unit test custom C++ concepts:
template<typename T>
bool resolved_as_concept(T arg)
{
return false;
}
template<thingable T>
bool resolved_as_concept(T arg)
{
return true;
}
TEST(concepts, thingable)
{ ASSERT_TRUE(resolved_as_concept(1));
ASSERT_TRUE(resolved_as_concept("string"));
ASSERT_FALSE(resolved_as_concept(CNotThingable()));
}
At first, it may seem like something is out of control here. Like is it normal to have UI Tests run for almost 9 hours?
#buildinpublic #unittesting

Improve Readability With Positive Booleans #UnitTesting https://testing.googleblog.com/2023/10/improve-readability-with-positive.html
In macOS 13, table views like these had accessibility type 'table'. In macOS 14, they become 'outline,' and their rows become 'outline rows', screwing all our UI tests.
WTF, AppKit? #accessibility #macos #unittesting

My book is on sale at Leanpub for the rest of October. Something that I didn't mention up until now is that all the proceeds have been donated to animal welfare organisations. All future sales will be donated as well.
Use the following link to receive a 20% discount. Get it while it lasts.
https://leanpub.com/writing-maintainable-unit-tests/c/LeanpubWeeklySale2023Oct18
#tdd #testdrivendevelopment #unittests #unittesting #softwaredesign
How to install and use Burp Suite for Web Application Security Testing
#ApplicationBlocking, #Applications, #BurpSuiteScanning, #CyberSecurity, #Cybersecurity, #End-to-endTesting, #FunctionalTesting, #HTMLApplication, #InformationSecurity, #IntegrationTesting, #NetworkSecurity, #NewSecurityFeatures, #Security, #SecurityBaseline, #SecurityDatabase, #SecurityService, #SecurityUpdates, #SoftwareTesting, #StaticWebsite, #Testing, #UnitTesting, #webapp #WebServer
Check out the new #JCON2023 🎥 with François Martin: Why Software Testing Is a Waste of Time
Learn more about common pitfalls, time wasters and what you can do to make your testing strategy more efficient!
Watch now: https://www.youtube.com/watch?v=qQVhb3z244Q&list=PLFeSAZzYdUodudf78KFy2tM9feahF0R-m&index=1
#DevOps #UnitTesting #DeveloperProductivity

Check out the new #JCON2023 🎥 with François Martin: Why Software Testing Is a Waste of Time
Learn more about common pitfalls, time wasters and what you can do to make your testing strategy more efficient!
Watch now: https://www.youtube.com/watch?v=qQVhb3z244Q&list=PLFeSAZzYdUodudf78KFy2tM9feahF0R-m&index=1
#DevOps #UnitTesting #DeveloperProductivity

Are there really only 15 people in the world using JetBrains Rider and xUnit in combination? That can't be right.
If you want to see console output when running xUnit tests in JetBrains Rider, vote on this issue!
https://youtrack.jetbrains.com/issue/RIDER-90245/Capture-console-output-in-XUnit-tests
#dotnet #JetBrains #Rider #xUnit #UnitTesting #TDD #Logging #Development #Testing
This is the value of software testing.
I'm not an inexperienced coder, and this is not a complex project by any means:
https://github.com/audiodude/ismygem.online
But in writing about 16 Python unit tests, I found 2 significant bugs, including a syntax error in error handling code (which is why you should always test your error handling code folks!)
All software has bugs, but software without tests can't even pretend to be working.
Nimble 13 proper is now released!
This renames the `Predicate` APIs (`Predicate`, `AsyncPredicate`, `PredicateResult`, etc.) to `Matcher` (`Matcher`, `AsyncMatcher`, `MatcherResult`, etc.), with typealiases so that your existing matchers continue to work (though, they'll be marked as using a deprecated API).
Nimble now supports Windows!
Check out the new #JCON2023 🎥 with Johannes Dienst: Real Cross-Platform Workflow #UIAutomation
I´ll show a live demo that will walk the audience step-by-step through a typical 2-Factor Authentication using a physical smartphone. We will see what automation is possible today and how it enables testing currently untestable workflows...
Watch: https://www.youtube.com/watch?v=IsPUPiAsvi4&list=PLFeSAZzYdUodudf78KFy2tM9feahF0R-m&index=1

Check out the new #JCON2023 🎥 with Johannes Dienst: Real Cross-Platform Workflow #UIAutomation
I´ll show a live demo that will walk the audience step-by-step through a typical 2-Factor Authentication using a physical smartphone. We will see what automation is possible today and how it enables testing currently untestable workflows...
Watch: https://www.youtube.com/watch?v=IsPUPiAsvi4&list=PLFeSAZzYdUodudf78KFy2tM9feahF0R-m&index=1

Just released: Unit testing Cheat Sheet by Alexandre Rosano
Download it free at http://www.cheatography.com/alexandre-rosano/cheat-sheets/unit-testing/?utm_source=mastodon
Here's their description of it: Best practices for writing good unit tests.
@cheatsheets #CheatSheet #CheatSheets #test #programming #testing #code #software #cleancode #unittesting #unittest #tests #crafting

PSA: If you're using Moq 4.20+ to test your .NET code, you might want to look somewhere else. Starting with 4.20, they've added code that, and I quote "spawns external git process to get your email and does some hashing and sends to https://cdn.devlooped.com/sponsorlink".
Which, you know, is not cool. And quite creepy come to think of it, who would expect a unit testing library to steal your email and send it to whoever.
I find a lack of tests disturbing. https://blog.code-cop.org/2023/10/i-find-your-lack-of-tests-disturbing.html #unittesting
Existing Java projects can also benefit from a Maven JaCoCo code coverage quality gate, but we have to ensure that the build doesn't break for existing classes when we add the new check. #mavenBuild #java #unitTesting #testing #qualityGate
http://codingchica.com/2023/10/02/adding-jacoco-quality-gate-to-an-existing-code-base/
Nimble 13 RC 1 has been released! There are quite a few breaking changes here, notably the `Predicate` APIs have been renamed to `Matcher` (there are typealiases to make migrating easier).
Also, Nimble 13 adds support for Windows!
I'd love feedback on this before the actual release!
A broken or flaky test can be quickly skipped by adding the Disabled annotation to the JUnit test. #java #junit #unitTesting
http://codingchica.com/2023/09/28/junit-disabled-annotation/
At Full Stack Europe 2023, I'll be hosting a full day workshop about "Well-Balanced Test-Driven Development". We'll be learning several aspects of Test-Driven Development while working on an existing code base.
There are still some seats left.
The following link provides you with a 10% discount on the conference ticket price:
ti.to/on3/fseu23/discount/Jan
Hope to meet you there!
#tdd #testdrivendevelopment #unittests #unittesting #softwaredesign
👨💻 I'm building an app with as little #JavaScript as possible (only sending and receiving push notifications). I don't use any framework, and everything else is handled by the server.
❓ Now I'm wondering how to handle #testing. Does it make sense to do #UnitTesting for a few lines of JavaScript? How do you handle that? Do you only do #E2ETesting in such cases?
💭 I was already thinking about using #JSDom in #Jest, but the #HTML is generated by #Symfony, making it hard to get it in there…
In iOS 15/macOS Sonoma/etc. Apple renamed `NSPredicate` to `Predicate`. Which has caused a ton of frustration with Nimble because Nimble has used `Predicate` as the name of an API for a few years now, leading to a bunch of "'Predicate' is ambiguous for type lookup in this context" build errors when you make your own custom Nimble predicates.
To resolve this issue, Nimble will be renaming the `Predicate` API: https://github.com/Quick/Nimble/pull/1090
In a r/SoftwareEngineering thread on "#UnitTesting is a generalized approach not an ideal solution for all systems" I touch on why #XP and #TDD haven't taken over.
My rebuttal boils down to this: Does the lack of XP among businesses really mean it's less effective? Or are there other reasons it hasn't spread?
Here's the middle of the thread where it gets really interesting: https://www.reddit.com/r/SoftwareEngineering/comments/165dv8k/comment/k1o6mfj/?utm_source=share&utm_medium=web2x&context=3
At Full Stack Europe 2023, I'll be hosting a full day workshop about "Well-Balanced Test-Driven Development". We'll be learning several aspects of Test-Driven Development while working on an existing code base.
There are still some seats left.
The following link provides you with a 10% discount on the conference ticket price:
https://ti.to/on3/fseu23/discount/Jan
Hope to meet you there!
#tdd #testdrivendevelopment #unittests #unittesting #softwaredesign
Sobotni poranek pierwszego dnia kalendarzowej jesieni 2023 na pewno nie będzie nudny. Krzysztof Stawik będzie nauczał jak "skonfigurować i uruchomić lokalne laboratorium z pipelinem Continuous Inetgration wykorzystując Jenkins, Python i testy jednostkowe".
Więcej informacji: https://jesien.org/2023/agenda/
#CI #Jenkins #Python #UnitTesting #Ubuntu #Linux #JesienLinuksowa #Docker #OCI
The Unit in Unit Testing
📢 New blog post alert! 📢
In my latest blog post, I discuss the importance of unit testing in research code. Even if the code is eventually thrown away, rigorous testing can provide valuable insights and ensure correctness. Check it out and let me know your thoughts! #coding #research #unittesting #softwaredevelopment
Read the full post here: https://ericmjl.github.io/blog/2023/8/30/research-code-benefits-from-unit-testing/
👉 Like 👍 | 💬 Comment 🗨️ | ↪️ Share 🔗
.NET 8 introduces a new TimeProvider abstraction.
It allows time mocking in the test scenarios.
It is supported by other features that rely on time, for example, Task.Delay.
Also, a netstandard 2.0 library Microsoft.Bcl.TimeProvider has been created with this provider.
My "run both algorithms and report on any discrepancies" phase for my new algorithm has already borne fruit from production interactions: a corner case I hadn't considered finds a good many situations in which the new algorithm misses scheduling opportunities that the original algorithm finds.
Definitely worth the time and effort to run a comparison phase, and now I have ready-made test data for the algorithmic fix (which is fairly straightforward). Our regular unit tests didn't catch this particular corner case, but the way people actually use the tooling did.
(And from now on, our unit tests WILL be catching this corner case.)
#softwareEngineering #softwareDevelopment #testing #unitTest #unitTests #unitTesting #comparisonTesting
At Full Stack Europe 2023, I'll be speaking about "Fast Feedback Development By Avoiding The Fallacy Of Integrated End-To-End Tests". Not only that. The day before the conference I will also be hosting a full day workshop about "Well-Balanced Test-Driven Development".
The following link provides you with a 10% discount on the conference ticket price:
https://ti.to/on3/fseu23/discount/Jan
Hope to meet you there!
#tdd #testdrivendevelopment #unittests #unittesting #softwaredesign

Working on Nimble[^1] and making the async variant of toEventually[^2] more natively async. The current version, built upon dispatch timer sources, is fine for synchronous work, but the async variant kicks off an unstructured task every time it polls the matcher. Which, in addition to the concurrent access issues, just isn't efficient or good practice. You can see a PR for it at https://github.com/Quick/Nimble/pull/1079
Hoping to merge & release it soon, but I want to test this some more to verify it. I'd rather not accidentally introduce some weird error case that breaks people's tests or adds flakiness.
[^1]: A test-matcher library for swift/objc. Makes it much easier to write assertions. https://github.com/Quick/Nimble
[^2]: A mechanism to continuously poll a matcher (i.e. run an assert) until it passes or times out. Super useful for check code that sets something asynchronous (e.g. after dispatching to the main queue, or running an async task).
@thumper @kiwipycon
Sounds like a really interesting topic. I've been enjoying nose2 for #Python #unittesting for a long time, never quite got into pystest. Would be interesting to see the contrast between the two (or other options) by the community.
Too bad I can't make #KiwiPyCon myself :-(
Painful task of the last week or so... Unit testing celery tasks.
The individual tasks weren't horrible, but definitely a lot of work...
But trying to do integration tests has proved to be difficult to say the least. Since you need to be able to mock calls, it needs to run in the context of the test suite, but just running it inline and not through a worker it doesn't run as it will in production so you might miss things.
Overall it's been a very painful experience #celery #unittesting
Even in a small test class, like AnimalTest, avoidable code duplication can be avoided by moving repeated steps like the no-argument Animal constructor call out to a test instance variable.
#java #junit #unitTesting #testing #refactoring
http://codingchica.com/2023/07/31/a-new-instance-every-test-junit-classes-and-fields/
Just released Quick 7.2 and Nimble 12.2 this morning.
Quick 7.2 re-adds the TestState property wrapper. You can use it to remove boilerplate around setting optional variables to nil. You can also use it to automate setting up those variables.
Nimble 12.2 extends the equal matcher to support matching arrays of tuples.
Quick 7.2: https://github.com/Quick/Quick/releases/tag/v7.2.0
Nimble 12.2: https://github.com/Quick/Nimble/releases/tag/v12.2.0
Let's use the new AgeUnits enum in a switch expression. Unlike the old switch statements, Java switch expressions require us to list all possibilities. #java #switch #enum #tdd #unitTesting
http://codingchica.com/2023/07/27/calculating-age-using-our-new-enum-in-a-switch-expression/
It's our first official #BenchmarkMockNet results of the year -- see how various .NET mocking frameworks and libraries stack up so you can make sure your tests are running as fast as possible!
https://github.com/ecoAPM/BenchmarkMockNet/blob/main/Results.md
Saturday MP Show 7: Trying to Add a System Test for the Standard Ruby Linter ToDo Bug Fix
I try to add a system test for the todo bug fix in episode 5 but run into some issues, like I stupidly hard coded the todo file name in a previous PR. I do successfully refactor a bit of code.
Have question you want answered in a future video? Feedback? Send me a DM or email to ask@saturdaymp.com.
#systemtesting #unittesting #ruby #standardrb #saturdaympshow
“The best time to build a test was before the first commit. The next best time is now.” – Proverbious the Commitor, probably
https://www.whynotestflight.com/excuses/hello-usd-part-13-test-test-test/
Released v12.1.0 of Nimble today! This adds `AsyncPredicate`, which allows you to create matchers utilizing async/await!
This allows you to move `await` calls out of the `expect()` call and into the matcher. Which removes a little bit of boilerplate.
Also, this allows you to write matchers against actors, so that you can write `await expect(someActor).to(someAsyncMatcher(...))`. Which, to me, is the main draw here.
Stay ahead of the curve with the latest updates in #dotnet: TimeProvider & ITimer in #dotnet8 Preview 4, universal time abstractions for #DependencyInjection & #UnitTesting.
Dive deeper into the topic with this enlightening #InfoQ article by Artur Ampilogov: https://bit.ly/44c0p7z
Blogged yesterday: In this third and final article about contract tests, I explain how to apply the "Parameterised Test Cases" pattern and what the benefits of this approach are.
https://principal-it.eu/2023/06/parameterised-contract-tests/
#tdd #testdrivendevelopment #unittests #unittesting #softwaredesign
If you think Git is addictive, try GitHub Copilot Chat. Here it is getting to work on my DNS monitoring script.
Could be garbage, but it's more test code than I've managed to write on my own for PowerShell. 😁
In this third and final article about contract tests, I explain how to apply the "Parameterised Test Cases" pattern and what the benefits of this approach are.
https://principal-it.eu/2023/06/parameterised-contract-tests/
#tdd #testdrivendevelopment #unittests #unittesting #softwaredesign

With Java primitives, Java stores the raw values. Let's look at how Java handles integer values (bytes) and what happens when they are too large or small to fit in the allowed space. #tdd #java #java101 #unittesting
I wrote a blog post! On testing test helpers. Those little only-used-in-our-tests components that make tests easier to understand and write. I've been at several places where it's standard practice to just... assume those will work. Which works until something breaks. Then you waste time wondering why this code that should pass tests isn't passing tests until you consider maybe it's something else.
I feel like this should be more standard practice.
https://blog.rachelbrindle.com/2023/06/25/testing-test-helpers/
At Full Stack Europe 2023, I'll be speaking about "Fast Feedback Development By Avoiding The Fallacy Of Integrated End-To-End Tests". Not only that. The day before the conference I will also be hosting a full day workshop about "Well-Balanced Test-Driven Development".
For more information, checkout the following link:
https://fullstackeurope.com/2023/speakers/jan-van-ryswyck
Hope to meet you there!
#tdd #testdrivendevelopment #unittests #unittesting #softwaredesign
Really feeling the conflict between Nimble.Predicate and Foundation.Predicate. Like, yes, namespacing is a thing in Swift, but being forced to go update your Nimble matchers to specify "Nimble.Predicate" in almost every usage is not a good experience.
Starting to think that renaming `Predicate` to something else is the best course of action. (`Matcher`? There's a conceptual overload with the old Nimble Matcher API, which was fully removed in Nimble 10. That gives me hesitation).
Join @brendoneus and @sadukie for a pair of Test-Driven Development workshops at #techbash 2023. Register for 4 days and pick your workshop today! Early bird ends on July 4th.
Xcode 15 adds new `-enumerate-tests` options to the `test` and `test-without-building` subcommands. It lists the tests that Xcode can detect, but doesn't run them. Image is some example output from running this against Quick.
This DOES work with Quick out of the box. I'd really like it if Xcode could then use this command to figure out where to place test gems.
I think that "write a test for every bug" is a foolish advice.
Write #tests for business logic only. Everything else is an implementation detail.
#unitTesting #softwareTesting #automatedTests #e2eTesting #testing #software #softwaredevelopment #unitTest
@davetron5000 In what way are you differentiating this from #UnitTesting or functional testing? I agree you should never have to test core Ruby or Rails features, but doesn't a view test exercise whatever you're bumping against here?
#Emacs DENOTE #unittesting - YouTube https://www.youtube.com/watch?v=44_eLHxSMmo
Protesilaos discovers #ert to write unit tests.
Quick 7 is fully released! Quick 7 introduces a different way to create async tests in a way also lets you create synchronous tests (a la Quick 5 and earlier).
Additionally, Quick 7 will now generate human-readable test selectors! No more mangled "some_thing___in_some_condition___does_a_thing", it's now "some thing, in some condition, does a thing".
Release notes and more at https://github.com/Quick/Quick/releases/tag/v7.0.0
Thanks so much to everyone who has supported me and the rest of the Quick team in getting this out! I really appreciate all the feedback.
💡 Just realised that you can use @coveragepy not only to determine your test coverage but also to find out how much of your codebase is present in your documented examples! 😁
:python: #Python #testing #unitTesting #documentation
I'm one of the speakers at Full Stack Europe this year. I'll be delivering a brand new talk "Fast Feedback Development By Avoiding The Fallacy Of Integrated End-To-End Tests". Thanks to the organisers for the opportunity to speak about this topic.
https://fullstackeurope.com/2023/speakers/jan-van-ryswyck
#tdd #testdrivendevelopment #unittests #unittesting #softwaredesign
Feeling a bit confused by my decision making in @xunit.
This passes:
`Assert.Equal(42, 42L);`
This fails:
`Assert.Equivalent(42, 42L);`
That feels wrong. It's either backward, or both should pass. Equivalent was designed to be the "less strict" version of things, so why did I decide that equal values of different intrinsic types were a failure?
Equal has passed for 15 years. Equivalent is relatively new. I'm leaning towards both passing.
What do you think I should do?
I composed a list of the best books to learn about Test-Driven Development. The nice folks over at Shepherd were kind enough to add the list to their website. Interested? Go check it out!
https://shepherd.com/best-books/to-start-your-software-developer-journey
#tdd #testdrivendevelopment #unittests #unittesting #softwaredesign
What's your approach when mocking large API-responses (JSON) for your Unit Tests? I usually just create files with the API-responses.
@hans I'm firmly of the position that being an #OpenSource maintainer is crazy hard, there are SO many things to juggle. #UXDesign is no different that #UnitTesting (in the need to recognize and motivate it)
"Getting better #UX in #FOSS" is mostly a social issue, not a technical one.
It is astonishing at how difficult it is to convince people to automate testing.
#unitTesting #testing #e2e #integratedTesting #UI #UITesting
We open-source our CLI fuzzing solution for Java ☕
With CI Fuzz CLI, you can now deploy fuzz testing to uncover blind spots in your Java code.
The CLI tool can be incorporated into existing unit testing frameworks (e.g., JUnit) using three basic commands on your command line or IDE.
If you ever ran a unit test, you will be able to use CI Fuzz CLI.
Compatible with #Maven and #Gradle.
Check out the repo: https://github.com/CodeIntelligenceTesting/cifuzz
(My #introduction reposted from a previous instance)
I'm Siddarth, a #SoftwareEngineer in India. Love discussing #software, #SoftwareCraftsmanship, #UnitTesting and #SoftwareArchitecture. I mainly use #Java and #Kotlin, though I'm looking to learn #Rust soon, likely on my weekday #Twitch streams. Usually highly opinionated on things I care about 😁
I also enjoy #books, #anime and #manga; I'll toot more about those whenever I come across anything interesting. Drop me a follow if you'd like!
#Testing your #WebComponent's close button? if it removes the element from the #DOM, check `Node.isConnected` to see whether your custom element is still part of the page or not
📚 Read More: https://developer.mozilla.org/en-US/docs/Web/API/Node/isConnected
🥽 Example: https://lit.dev/playground/#gist=b0639065ab09e87708e56a6c8d2fdc2f