Boas práticas de programação fazem bem para as pesquisas quantitativas... e, por acaso, para a prática clínica:
https://blog.leonardof.med.br/2025/ckd-epi-sbn.html
Fui usar "teste de unidade" ("unit testing", em inglês) no código de análise estatística que eu estava escrevendo, e descobri que uma calculadora online da Sociedade Brasileira de Nefrologia estava errada.
That won't work. It says so in the docs:
> pyfakefs will not work with Python libraries that use C libraries to access the file system.
Which is what numpy is doing.
A couple weeks ago, I gave a talk at @omt_conf on What's New in Testing. That talk was recorded, but while I wait for it to be edited and published, I published an edited (and updated!) version of my speaker notes from that talk.
There's a lot new in testing since last year. I'm still surprised there wasn't a WWDC video about all the new things you can do.
https://rachelbrindle.com/2025/06/26/whats-new-in-testing-swift-6-2/
@nedbat I'm used to JUnit's assertEquals(expected, butgot) and it prints
Expected <<<x>>> but got <<<b>>>
Which is slightly better when you have long chunks of output (HTML and XML), butgot will be at the end instead of buried a page or two up. For short answers it doesn't matter.
#unitTesting #extremeProgramming #soExtreme!
Check out video 2 in my new series #Xcode #UnitTesting https://youtu.be/r21JXSQtvgs
Automate your unit tests in #DotNet like a pro!
Learn how I use GitHub #Copilot Agents to create, run, and iterate on tests until everything compiles and passes!
Smart prompts
Save time and focus on what matters
#VSCode #UnitTesting #DeveloperExperience
wp.me/p29SK-YK
falsify
A few days ago, Edsko de Vries of Well-Typed published an in-depth article on property-based software testing, with a focus on the concept of “shrinking.”
In brief, property-based testing is sort-of like fuzz testing but for algorithms and protocols. Like fuzz testing, random test cases are procedurally generated, but unlike fuzz testing, the test cases are carefully designed to verify whether a software implementation of an algorithm satisfies a specific property of that algorithm, such as:
n*log(n)
number of iterations for input dataset of size n
““the sequence of log messages is guaranteed to obey this rules of this particular finite-state automata: (connect | fail) -> (send X | fail) -> (receive Y | receive Z | fail) -> success .”
Shrinking is the process of simplifying a failed test case. If you have found some input that makes your function return a value when it should have thrown an exception, or produce a result that does not satisfy some predicate, then that input is a “counterexample” to your assertion about the properties of that function. And you may want to be able to “shrink” that counterexample input to see if you can cause the function to behave incorrectly again but with a simpler input. The “QuickCheck“ library provides a variety of useful tools to let you define property tests with shrinking.
Defining unit tests with such incredible rigor takes quite a lot of time and effort, so you would probably do not want to use property-based testing for your ordinary, every-day software engineering. If you are, for example, being scrutinized by the US Department of Government of Efficiency, you would likely be fired if you were to take so much time to write such high-quality software with such a strong guarantee of correctness.
But if you are, for example, designing a communication protocol that will be used in critical infrastructure for the next 10 or 20 years and you want to make sure the reference implementation of your protocol is without contradictions, or if you are implementing an algorithm where the mathematical properties of the algorithm fall within some proven parameters (e.g. computational complexity), property-based testing can give you a much higher degree of confidence in the correctness of your algorithm or protocol specification.
Neat! #Duende is sponsoring #dotnet project Shouldy for the next year for $3,000. #unittesting #xunit #nunit #mstest
https://blog.duendesoftware.com/posts/20250415-shouldly-assertion-framework/
3 Reasons .NET Developers Still Struggle with Unit Testing (And How to Fix It).
https://www.typemock.com/why-dotnet-unit-testing-feels-hard/
3 Reasons .NET Developers Still Struggle with Unit Testing (And How to Fix It).
buff.ly/Cjn1j6m
#dotnet #csharp #unittesting
3 Reasons .NET Developers Stil...
The testing attachments proposal has been accepted (with modifications)! To be attached to some upcoming swift version! https://forums.swift.org/t/accepted-with-modifications-st-0009-attachments/79193
No real negative feedback, either. I guess people quickly became attached to the idea.
There were some disagreements about naming in the review, but I’m glad that we resolved that amicably. I’d really hate it if we were too attached to an idea to come to an agreement.
Adding Attachments to Swift Testing is up for review! It's my first time being a review manager.
Forum thread: https://forums.swift.org/t/st-0009-attachments/78698
Proposal: https://github.com/swiftlang/swift-evolution/blob/main/proposals/testing/0009-attachments.md
via @dotnet : MSTest 3.8: Top 10 features to supercharge your .NET tests!
https://ift.tt/0gv2iIn
#MSTest #DotNet #TestingFramework #SoftwareDevelopment #VisualStudio #OpenSource #CrossPlatform #UnitTesting #TestAutomation #CSharp #MSTest38 #ContinuousIntegration…
MSTest 3.8: Top 10 features to supercharge your .NET tests!
buff.ly/oV8YdmU
#dotnet #mstest #csharp #unittesting
MSTest 3.8: Top 10 features to...
MSTest 3.8: Top 10 features to supercharge your .NET tests!
https://devblogs.microsoft.com/dotnet/mstest-3-8-highlights/?hide_banner=true
Microsoft.Testing.Platform: Now Supported by All Major .NET Test Frameworks.
https://devblogs.microsoft.com/dotnet/mtp-adoption-frameworks/?hide_banner=true
#mstest #xunit #nunit #dotnet #unittesting #csharp
Microsoft.Testing.Platform: No...
Bonus content from Pragmatic Unit Testing in Java, Third Edition. Jeff explores how embedding invariant checks within your classes can help catch subtle bugs early.
Read more: https://www.langrsoft.com/2025/01/28/invariants2
ebook: https://pragprog.com/titles/utj3
Jeff just sent me this pic of Luna posing with his book! Looks to me like she is saying, "Why haven't you read Pragmatic Unit Testing in Java with JUnit, Third Edition yet?"
ebook: https://pragprog.com/titles/utj3/
print: https://tinyurl.com/jlujt3