#unittesting

Peter SommerladPeterSommerlad
2026-02-01

@Sdowney GoogleTest is one of the worst legacy C++ design. I hate it and won't use it. however, the brand makes it too attractive for the uninitiated.

I also hate some of its features that allow you to write large tests (EXPECT instead of REQUIRE), where in my unit testing philosophy a test function should have a single reason to fail and be named like that.

2026-01-31

I like #UnitTesting. The original #SUnit was wonderful, but it was ported to the land of needless complexity and became #JUnit which begat a whole lot of add on pieces. A simple idea buried under feature creep.

My favorite testing framework is #SRFI-78 srfi.schemers.org/srfi-78/srfi which provides a little reporting and summarization but it doesn't interfere with the tests. In C the MinUnit header file from Jera Design is beautiful. I use a beefier implementation, again to get simple reporting.

#Forth has ttester. It is terse to the point that I am tempted to add some reporting. So far I've resisted the temptation.

As in SRFI-78, you test a phrase and compare against expected results on the stack.

T{ 1 2 3 drop -> 1 2 }T passes
T{ 1 2 3 dup -> 1 2 3 }T fails

I'm writing tests for my library code and use them to test expressions in my AoC efforts.

I'm trying to decide if I should include the test in the library source (compiled conditionally) or in separate test-* files. #Programming

Vassil Nikolov | Васил Николовvnikolov@ieji.de
2026-01-27

A test suite is to its software
as a map is to its territory.
_________
("The map is not the territory.")

—Vassil, arms covered in virtual grease to the elbows,
having fun fixing a test suite (whose software seems to work).

--␠
My other signature is really witty.

#ComputerProgramming
#SoftwareEngineering
#TestingSoftware
#UnitTesting
#UnitTests

Jan Van Ryswyckjanvanryswyck
2026-01-20

This book was published in 2003, which is also the year that I read it. The sentence “A developer is a tester is a developer” has always stuck with me. Unfortunately, in 2026, not much has changed. There is certainly a correlation between quality and ownership of testing. Software teams that adopt a holistic approach, where everyone is responsible for quality, will always outperform those that don’t. (2/2)

Jan Van Ryswyckjanvanryswyck
2026-01-20

One of the books that had a profound impact during my early years as a software developer was “Debugging Applications for Microsoft .NET and Microsoft Windows” by John Robbins. I fondly remember the following paragraph from one of the first chapters of the book. (1/2)

JAVAPROjavapro
2026-01-15

Was tun, wenn nicht mehr reicht? Christopher Olbertz zeigt, wie für bessere Lesbarkeit sorgt, Architekturverstöße erkennt & Tests entkoppelt.

Jetzt Teststrategie modernisieren: javapro.io/de/testen-mit-java-

2026-01-09

[Перевод] Гексагональная архитектура в Rust: отвязываем бизнес-логику от Solana

Представьте: вы строите сервис выдачи дипломов на Solana. Всё отлично, пока дело не доходит до тестов. Внезапно оказывается, что для проверки бизнес-логики нужно поднимать валидатор, искать тестовые токены и молиться на стабильность сети. Знакомая боль? В этой статье я покажу, как мы решили проблему, используя async-trait и dyn Trait. Мы превратили интеграционные тесты длиной в минуты в юнит-тесты, которые проходят за миллисекунды. Узнать решение

habr.com/ru/articles/983874/

#rust #solana #гексагональная_архитектура #блокчейн #unittesting #dependency_injection #axum #web3 #mocking #refactoring

2026-01-09

📈 Bài viết hướng dẫn cách kiểm tra hiệu suất code qua Big-O - đánh giá độ phức tạp thuật toán. Phần 1 tập trung vào phương pháp unit test để đảm bảo mã chạy hiệu quả khi dữ liệu tăng. Dành cho dev quan tâm optimization! 👨💻
#Programming #BigO #PerformanceOptimization #UnitTesting #LậpTrình #TốiƯuHiệuSuất #KiểmThửĐơnVị

reddit.com/r/programming/comme

2026-01-09

🛠️ Nhiều dev nhảy vào framework mà chưa hiểu lý do test thất bại. Bài viết chia sẻ nền tảng kiểm thử: unit vs integration vs end‑to‑end, cách làm test có giá trị, những anti‑pattern thường gặp và cách test tăng tốc độ phát triển lâu dài. Bạn lần đầu nào “bật sáng” về kiểm thử? #testing #unitTesting #integrationTesting #e2e #dev #pháttriển #kiểmthử

reddit.com/r/programming/comme

Jan Van Ryswyckjanvanryswyck
2026-01-08

Test-Driven Development and software design are two sides of the same coin. However, one doesn’t automatically lead to the other. We have to learn about what good design entails, while also learning and practicing Test-Driven Development in conjunction with each other.

Jan Van Ryswyckjanvanryswyck
2026-01-06

These are ones that received their share for 2025:
- Elephant Haven
- De Zonnegloed
- Knaagje
- VOC Brasschaat
- Forrest and Friends
- Lwiro Primates Rehabilitation Center
- Ongehoord
- Dryade
- Sea Shepherd Belgium
- Sheldrick Wildlife Trust

(2/2)

Jan Van Ryswyckjanvanryswyck
2026-01-06

On the first day of the new year, I divide all the proceeds of my book to animal welfare organisations. When you buy a copy of my book, you’re not only learning about unit tests, you’re also providing a helping hand to these organisations. Thanks to everyone who purchased my book in 2025!
principal-it.eu/books.html

(1/2)

Level Up Your SharePoint Skills: SPFx Best Practices for Coders

784 words, 4 minutes read time.

The world of SharePoint development is constantly evolving, and mastering the skills required to build robust and scalable applications is crucial for any serious coder. With the rise of SPFx, it’s essential to stay up-to-date with best practices and patterns that can help take your skills to the next level.

Introduction

The SharePoint Framework (SPFx) has revolutionized the way developers build custom applications for Microsoft 365. With its powerful combination of web development, DevOps, and business intelligence capabilities, SPFx offers a unique opportunity for coders to create innovative solutions that can transform businesses. In this article, we’ll explore some essential best practices for SPFx developers, providing practical guidance on how to level up your skills and build high-quality applications.

Understanding the Power of Modularize

import { declareCustomElement } from '@microsoft/sp-core-library'; import { BaseClientSideWebPart } from '@microsoft/sp-webpart-base';@declareCustomElement({name: 'MyWebPart',metadata: {description: {type: String,default: 'This is a custom web part'}}})export class MyWebPart extends BaseClientSideWebPart {render() {return Hello World!;}onInit() {this.properties.description = 'This is an updated description'; }}

Modularize is a powerful pattern in SPFx development that allows you to break down complex applications into smaller, reusable components. By doing so, you can improve maintainability, scalability, and overall quality of your codebase. In this article, we’ll explore the benefits of modularize and provide guidance on how to implement it effectively.

Using Dependency Injection for Loose Coupling

import { injectable } from 'tsyringe';@injectable()export class MyService {private logger: Logger;constructor(logger: Logger) {this.logger = logger;}public doSomething() {this.logger.log('Doing something');}}

Dependency injection is a design pattern that allows you to decouple components from each other, making it easier to test, maintain, and extend your codebase. In SPFx development, dependency injection is particularly useful when working with services and libraries that need to be injected into your web part or component. In this section, we’ll explore the benefits of using dependency injection in SPFx and provide guidance on how to implement it effectively.

Optimizing Performance with Caching

import { CacheManager } from 'sp-core-library';const cache = new CacheManager();cache.add('myKey', 'myValue');console.log(cache.get('myKey')); // Output: 'myValue'

Optimizing performance is crucial in any web application, and SPFx is no exception. One effective way to improve performance is by using caching mechanisms. In this section, we’ll explore the benefits of caching in SPFx and provide guidance on how to implement it
effectively.

Best Practices for Unit Testing

import { TestBed } from '@angular/core/testing';import { MyService } from './my.service';describe('MyService', () => {beforeEach(() => {TestBed.configureTestingModule({providers: [MyService]});});it('should do something', () => {const service = TestBed.get(MyService);expect(service.doSomething()).toBe(true);});});

Unit testing is an essential part of any software development workflow. In SPFx, unit testing allows you to ensure that your components and services are working as expected, reducing the risk of bugs and errors in your application. In this section, we’ll explore best practices for unit testing in SPFx and provide guidance on how to write effective tests.

Conclusion / Next Steps

In this article, we’ve explored essential best practices for SPFx developers, including modularize, dependency injection, caching, unit testing, and more. By following these guidelines, you’ll be able to build high-quality applications that are scalable, maintainable, and efficient.

Next steps include implementing the patterns and techniques discussed in this article. Start by identifying areas where you can apply modularize, then experiment with dependency injection and caching mechanisms. Finally, take some time to learn about unit testing best practices and apply them to your existing codebase. With dedication and persistence, you’ll become a master SPFx developer in no time.

Call to Action

If this post sparked your creativity, don’t just scroll past. Join the community of makers and tinkerers—people turning ideas into reality with 3D printing. Subscribe for more 3D printing guides and projects, drop a
comment
sharing what you’re printing, or reach out and tell me about your latest project. Let’s build together.

Sources

Disclaimer:

The views and opinions expressed in this post are solely those of the author. The information provided is based on personal research, experience, and understanding of the subject matter at the time of writing. Readers should consult relevant experts or authorities for specific guidance related to their unique situations.

Related Posts

#agileMethodology #bestPractices #businessIntelligence #caching #ClientSide #codingPatterns #collaborationPlatform #customApplication #dependencyInjection #devops #enterpriseSoftware #microsoft365 #modularize #performanceOptimization #serverSide #SharePoint #SharePointDevelopment #SharePointFramework #softwareDevelopment #SPFx #testDrivenDevelopment #unitTesting #WebDevelopment #webPart #workflow

Developer working on SPFx project
2025-12-29

Almost every WordPress developer has written this code at some point: putting add_action() calls right inside a class constructor.

It feels clean for small plugins. But sooner or later, this pattern starts fighting you.

Read the complete guide here: kishanjasani.in/why-should-dev

#WPDevelopment #PHP #OOP #SoftwareArchitecture #UnitTesting

Why Developers Should Avoid Using Hooks Within a Class Constructor?
Andreas Schneidercryptomilk
2025-12-19

I've released version 2.0.1 of cmocka, a unit testing framework for C.

* Option to disable deprecation warnings via `CMOCKA_NO_DEPRECATION_WARNINGS`
* Documentation theme is now downloaded during `make docs` instead of at configure time
* Fixed const-correctness issues throughout the library

Merry xmas

cmocka.org/

Jorge D. Ortiz-Fuentesjdortiz@fosstodon.org
2025-12-18

One more article before you start opening the presents under the Xmas tree. This time I start testing a basic HTTP server implemented with Axum.
jorgeortiz.dev/posts/rust_unit
Let me know if there are other #Rust 🦀 #Testing 🧪 topics you'd like to see covered. Pls, share!
#RustLang #UnitTesting #Test

Philip Withnallpwithnall
2025-12-17
Screenshot of a table of code coverage results, showing 100% line and function coverage (meh), and 90.3% branch coverage (worth celebrating).
2025-12-14

An diesem Wochenende habe ich Form Block 1.7.0 veröffentlicht und sichergestellt, dass alle anderen Plugins deren Unterstützung für WordPress 6.9 anzeigen. Dabei gibt es ein paar coole neue Funktionen, über die ich sprechen möchte.

[…]

epiph.yt/blog/2025/form-block-

#Anpassung #BlockControl #Impressum #ImpressumPlus #MultisiteAutoLanguageSwitcher #PHPUnit #Plugin #UnitTesting #Update #WordPress

2025-12-14

This weekend, I released Form Block 1.7.0 and made sure that all other plugins correctly state their support for WordPress 6.9. There are some cool new features I would like to talk about.

[…]

epiph.yt/en/blog/2025/form-blo

#BlockControl #Customization #FormBlock #Impressum #ImpressumPlus #MultisiteAutoLanguageSwitcher #PHPUnit #Plugin #UnitTesting #Update #WordPress

Block transforms menu with examples for different input types to transform the current one into

Client Info

Server: https://mastodon.social
Version: 2025.07
Repository: https://github.com/cyevgeniy/lmst