Tagged articles

unit-testing

5 articles · Page 1 of 1
Go Programming World
Go Programming World
Jul 14, 2024 · Backend Development

Embedding Static Resources in Go with //go:embed

Since Go 1.16, the //go:embed directive allows developers to embed files, directories, or entire static assets directly into the compiled binary, simplifying deployment; this article explains the directive, its three embedding methods, usage in HTTP servers, unit tests, handling parent directories, and important considerations.

HTTP serverembedgo1.16
0 likes · 24 min read
Embedding Static Resources in Go with //go:embed
Open Source Tech Hub
Open Source Tech Hub
Jun 21, 2024 · Backend Development

Boost PHP Testing Efficiency with Kahlan: A Complete Guide

Discover how Kahlan, a full‑featured BDD testing framework for PHP, enhances unit and integration testing with RSpec‑style syntax, built‑in code coverage, powerful stubbing, monkey‑patching, and flexible reporting, all without requiring PECL extensions.

BDDMockingcode coverage
0 likes · 5 min read
Boost PHP Testing Efficiency with Kahlan: A Complete Guide
FunTester
FunTester
Feb 5, 2024 · Backend Development

How to Write Testable Business Code in Go: From Pure Functions to Dependency Injection

This article explains why unit testing is often seen as burdensome in long‑running Go projects and provides practical techniques—such as using pure functions, extracting dependencies, object‑oriented design, and function variableization—to make business code easy to test and maintain.

Dependency InjectionGoPure Functions
0 likes · 16 min read
How to Write Testable Business Code in Go: From Pure Functions to Dependency Injection
MaGe Linux Operations
MaGe Linux Operations
Jan 29, 2018 · Backend Development

Master Python Mock: Simulate External Calls for Seamless Unit Testing

This article explains what the Python Mock library does, how to install and import it, demonstrates basic and advanced usage including creating mock objects, setting return values and side effects, and shows how to apply patch and patch.object for effective unit testing without a real server.

MockPATCHunit-testing
0 likes · 12 min read
Master Python Mock: Simulate External Calls for Seamless Unit Testing