Skip to content

Latest commit

 

History

History
545 lines (405 loc) · 50.2 KB

File metadata and controls

545 lines (405 loc) · 50.2 KB

drawing

Let's learn about Unit Testing via these 134 free blog posts. They are ordered by HackerNoon reader engagement data. Visit the /Learn or LearnRepo.com to find the most read blog posts about any technology.

A software testing method where individual units or components of a software are tested independently, ensuring each part functions correctly before integration.

Setup

Master Python testing: From unit tests to TDD and BDD, learn to build resilient code with pytest and unittest in this in-depth guide.

In the Flutter ecosystem, you have several state management options to structure and scale your applications.

Latest August of this year I started to learn Rails. I was following the book Ruby on Rails Tutorial from Learn Enough To Be Dangerous website which uses Minitest to test their application. Truth is: I was not understanding a single line of code about those tests. So I decided to skip them and try to write it using RSpec because the syntax is way more similar to human language than others. But you may be wondering:

How to migrate your Karma/Jasmine project setup to Jest?

Nowadays every one of us is facing REST APIs by either developing or consuming such a service. Also, we’re in the trendy era of microservices, where we splitting our business logic into small separate services independent from each one. Mostly these services follow RESTful principles and using the JSON format for communication, which became the most widely used format, because of its simplicity.

The microservices approach of building applications is most suitable when we develop complex applications with diverse functionalities. Since microservices, unlike monolithic architecture, keeps each function independent of the other, it is the most followed technique in modern times for large applications. 

Recently at a client, a question came up about unit testing functionality that used setTimeout and setInterval.

A detailed step-by-step guide to writing unit tests for your node express API using mocha, chai, sinon, supertest, rewire, and nyc.

When I started working in Go and AWS Lambda, one of the difficulties that I faced was unit testing. I had a decent idea about what is unit testing and knew how to do it in Ruby but in Go, I had no idea because I was a beginner.

Unit tests are just a waste of time: you'll always end up spending more effort maintaining them than writing code

Automating the writing of unit tests, the bugbear of every software developer

LLMs can generate unit tests, but do they truly validate code behaviour? This article explores Codex experiments revealing their real limits and pitfalls.

Hello guys, today I am going to talk about JUnit and unit testing, one of the key skills for any software developer. You may already know that JUnit and Mockito are two of the most popular testing libraries for Java applications, and you will find them in almost every Java application classpath. 

How to get rid of the weird styled component names in test snapshots

Did you know you could unit test your Sass/Scss? No? Me neither.

Page Object Model (POM) is the most popular design pattern for test automation, and that's how you should implement it on your project!

Read the article to know the definition, key characteristics & benefits of two of the most common types of tests - unit and integration testing.

Here's a quick and easy guide to writing unit tests for iOS projects in Xcode.

Testing is a method of checking individual units of source code to confirm it works optimally before shipping code to production.

Hands-on tutorial on automating your unit tests using the CI/CD platform GitHub Actions.

Shift-left testing is a technique focused on finding bugs as early as possible in the development process. Here's why it's important.

Debugging is not something that is taught to anyone at any point in their careers, which leads to the belief that it is very difficult.

Unit testing with bigquery is hard. See how we built robust unit testing suites for data pipelines that use bigquery

The way you test has a huge impact on your codebase maintainability. There is a simple way to improve it

Here is a workable, reusable way to test an expressjs/mongoose application.

“If you don’t like unit testing your product, most likely your customers won’t like to test it either.” — Anonymous

Even if you are not directly concerned with QA and testing, it is recommended that you at least know the types of tests that need to be run at various...

.Net NUnit tests for Azure Functions with Event Hub Integration

Pythagora is an open source tool that uses GPT-4 to generate unit tests. With a single command, you can get from 0 to 90% code coverage.

A senior engineer explains how AI tools changed document writing, code review, and system understanding, without replacing judgment or accountability.

My top favorite tools for spotting N+1 problems in database queries for Laravel projects.

Learn how to get better consistency around your automated tests by both fixing your existing flaky tests, and writing better tests going forward!

AI writes code faster than you can review it. Here's a structured unit testing method that keeps your codebase trustworthy and easy to maintain.

Fluent Assertions is a .NET library that provides use with a bunch of useful extension methods that allow us to test our C# code in a more natural way

I will show you some examples of how you can verify requests to third-party services in tests using of async FastAPI + httpx and mocks

Test Driven Development puts emphasis on unit over integration tests. The result can be lower quality featuring bugs that are baked into the product.

Test-driven development (TDD) is all the rage these days and has been a discussion topic for quite some time. If you are brand new to TDD, this article should serve as a good introduction to what TDD is, why it’s useful, what a typical TDD workflow looks like, and when to use TDD.

TL;DR

Humans are complex creatures, with a wide variety of motivations for getting work done. Our motivation as developers is not purely extrinsic, or financial—sometimes it's for the joy of delivering code. 

The writing of Clojure/Script macro may seem as a wizard senior programming craft, but this article will show you that it's not the case. This is the second part of my journey to learn Clojure/Script macro and this article will deal with Clojure macro.

Basically, we need to ability to write test classes and methods and have the base infrastructure for them.

Scrum is a set of rules for organizing a flexible workflow, which consists of a team approach, working in iterations, focusing on the goal of each iteration.

How React Testing Library Can Improve Your Mental Health Part 2

xUnit support many ways of parameterizing tests, however none of the existing documentation I could find covered the use case of re-using and mixing parameter datasets across different tests. This article shows how this can be done with xUnit in Visual Studio.

Any test that has never failed has no value, and therefore, can be deleted. In order for any test to add value, it must have failed at least once.

At Supabase we love writing as little code as possible, so we decided to combine our unit tests with same JSDoc comments that power VSCode's IntelliSense.

In this article you will learn what code coverage is, how code coverage is calculated, and how much code coverage to aim for in your tests.

Android development has witnessed massive growth in all these years, and any developer who’s worth his salt will thoroughly test his products before launching them into the market. While having a conversation about testing in Android, we often hear two forms of tests doing the rounds — Unit Test and Integration Test. 

All you need to know about unit testing LINQ and mappings in .NET to make more reliable code faster as you develop software using systems like AutoMapper

Have you ever wanted to write unit tests for your code, but you’ve found that it’s difficult to do so? Often this is the result of not writing code with testing in mind. An easy way to solve this is through utilizing test-driven development, a development process in which you write your tests before your app code.

Let's look at the differences between unit tests and integration tests and when you might prefer one or the other.

High unit test code coverage is often viewed as a key indicator of code quality, but it's important to focus on the quality of the unit tests, not just the cod

I use Jest nearly every day when working, and it's a fantastic tool. It lets me ship my code with confidence, knowing that I have produced something which works as intended.

This is some thoughts about TDD and how things don't always work out perfectly even with the best-written tests when developing new software on a deadline.

In this article, we will explore the key concepts of Java unit testing, including simple code examples, parametrization, exception testing, and annotations.

In this article we will review some best practices and must-have libraries which will get your unit tests to the next level.

Besides testing functions, did you know you can test mixins as well?

[61. Comprehensive Coverage:

The AI Solution To Unit Testing](https://hackernoon.com/comprehensive-coverage-the-ai-solution-to-unit-testing) AI automated test generation tools can help improve coverage of source code

Why does my application get so buggy after each release?

Create immutable object java. The best way to create Immutable object. Reliable Objects Java

How to achieve 100% coverage of I/O file based applications in DotNet (.NET) CSharp (C#) Test Driven Development (TDD) Development Software Best Practices

Learn about IServiceCollection in C# and dependency injection. See how Dependency Inversion, Single Responsibility, and Open/Closed Principles fit together!

You're pushing to main, something you've done 100s of times before, and by the time you go to refresh your production environment, you notice something's wrong

I’m learning the Clojure and ClojureScript craft and I must say, I enjoy it. This article explains what leads me on the track of learning Clojure/Script macro. This is the first part of my journey on this topic.

Unlocking the Power of Test-Driven Development: Building Robust React Apps with Confidence

Intro

In this article, I’ll walk through what I see as the main benefits of unit tests for developers working alone and in teams.

Checkout my article on JUnit 5 to write better unit tests and improve your code quality.

Testing your code is an important part of the software development process. Learn why it's so important and the most common way of testing.

How do you prove that the software is working? How do you know you are not introducing harmful side effects? This is Software Testing 101!

Explore how IntelliGame, a gamification plugin for IntelliJ, impacts JavaScript unit testing in a controlled experiment with 152 participants.

Who knows what the future will hold for the world of end-to-end test automation, but TestProject is certainly a platform worth keeping your eye on.

For the last few of months I started digging into the software testing world. I really wanted to learn more about how to create more effective tests, refactor code with more confidence and feel safe about adding new features. However, I felt it is little difficult to dive right in this area, that in my point of view, is underestimated.

The text you are about to read describes an imaginary dialog between two programmers on their way to discover the orgastic pleasures of a library called asyncFn.

This article explores non-trivial, production-grade patterns for the Clock component, moving beyond simple “now” calls to integrating with JWT authentication.

ReactJs patterns can be a source of mistakes when it comes to the structure of a components hierarchy.

In this article, we are going to discuss a testing approach known as unit testing. What are unit tests? How should you implement them? and their benefits.

Code coverage is a poor metric for indicating whether or not your code has been tested well. Instead, we should invert the metric.

This comprehensive guideline assists in decision-making regarding testing at different levels - from Unit to End-to-end. It offers practical practices, rules of

By getting used to unit tests, they can start to familiarize themselves with the codebase and make significant progress while facing no risk or stress.

AI fails catastrophically at: Business logic validation, bug detection, and user experience validation.

Tests are a way to explicitly set expectations about code. You establish them to allow the machine to check whether your code meets the expectations.

I didn’t trust AI to write my code. Things changed. With tests written first, AI stopped being a risk and started behaving like a serious engineering tool.

Mocking is often seen as a default choice when writing tests. Yet it introduces unnecessary complexety to your system. There are other approaches in testing.

Test coverage cannot ensure that the code is highly performant and that it runs error-free when used in unpredictable ways.

Unit testing is utilized to examine small segments of code that can be secluded logically in the system. Frameworks normally managed to do unit testing are JUnit, NUnit, JMockit, PHPUnit, or tools like TestComplete.

No more awkward test cases. Here's one fixture-based testing framework that cleaned up my Rust unit tests.

Until I stumbled upon TDD, I had never really understood tests. I remember writing a whole project without tests and publishing it. Can you believe it?

Learn how to effectively utilize xUnit for testing ASP.NET Core applications, ensuring product quality and reliability.

11/2/2025: Top 5 stories on the HackerNoon homepage!

Explore the power of WebApplicationFactory in ASP.NET Core testing to ensure code quality and prevent issues.

A key strategy for reducing reliance on mocks is adopting principles from functional programming, particularly the use of pure functions.

End-to-end testing is a technique to test a software’s workflow from start to end to ensure it works as expected.

Dive into a comprehensive guide on unit testing that emphasizes aligning tests with user interactions, maintaining semantic structure, and optimizing component.

In true TDD, tests must fail, tests must pass, and the code must be refactored.

With the introduction of Selenium, automation testing has become an easy task. All you need to do is find an appropriate unit testing framework for Selenium.

Philosophy of testing and rules how to reliably test complex applications with python examples. How to prepare data for tests and check the results.

In this blog post, we'll discuss why testing is so important and how we build our own testing library to encourage good testing practices...

There are often debates on the best way to describe what constitutes a "unit" when unit testing. Considering the scope of tests is an important part of code structure and complementary to how implementation is grouped.

Ever wondered why it takes nearly a month to ship out a few lines of code change to the star and reliable customers of your company? When the changes made are formally aligned with the product, marketing and application managers, what stops it from being shipped immediately? Why do managers quote timelines for a maintenance release that seems so "unrealistic" to you? These were the thoughts that were going through my mind during my first few months of writing production-quality code.

Get to know the different types of software testing methods and know the use cases, advantages, objectives to identify the best way to go about testing.

Learn how to improve the performance of your JavaScript unit tests with this comprehensive guide.

Explore how IntelliGame, a gamification plugin for IntelliJ, impacts JavaScript unit testing in a controlled experiment with 152 participants.

The Software Testing Pyramid: a framework for efficient test coverage, early bug detection, and maintaining software quality with unit, integration, and E2E.

Explore how IntelliGame, a gamification plugin for IntelliJ, impacts JavaScript unit testing in a controlled experiment with 152 participants.

We are humans, we forget, we make mistakes, we change things, ideas; This happens when we work solo, imagine when you are in a team!

Getting started with Unit testing with Rspec on ruby with rails

Currently, we see two main categories of verification activities for vehicle cybersecurity that testing platforms have aimed to support.

This guide explores the specific prompt engineering patterns senior devs use to generate boilerplate, unit tests, and documentation.

Treat ChatGPT like a junior dev on your team — helpful, but always needing review.

Understand flaky tests with some real-world examples.

This article highlights the critical need for fail conditions in tests expecting exceptions.

Navigating API testing challenges in a fast-paced startup: discover solutions & insights for seamless development.

How many automated tests should you write? Just Enough. Just Enough Testing balances the need to ship with the quality your customers deserve.

From your first “Hello, World” to QA mastery, learn how manual and automated testing build curiosity, confidence, and reliable software quality.

Discover how the Orchestrator/Actions Pattern can simplify your codebase, making it easier to navigate, test, and maintain.

Explore how IntelliGame, a gamification plugin for IntelliJ, impacts JavaScript unit testing in a controlled experiment with 152 participants.

After examining thousands of experiments from top tech companies, I discovered six critical A/B testing mistakes that are squandering your team's hard work.

Explore how IntelliGame, a gamification plugin for IntelliJ, impacts JavaScript unit testing in a controlled experiment with 152 participants.

Learn how to write effective unit tests in Python, explore best practices, common pitfalls, and tools like Keploy for comprehensive testing.

learn how unit testing enhances code quality and accelerates development.

Explore robust model validation in C#, covering unit testing, BDD, and best practices for enhanced application reliability.

Testing code that uses .NET's DateTime.Now sucks!!!! This is how to mock them, to properly validate DateTime when writing unit tests.

Explore how IntelliGame, a gamification plugin for IntelliJ, impacts JavaScript unit testing in a controlled experiment with 152 participants.

Discover fcfTest, an MIT-licensed C++ unit testing library with a single assertion macro, one-header setup, logging, and hierarchical test support.

Learn how Jest finds related tests in an optimal way using the Breadth First Search (BFS) algorithm and how to leverage its API in your local development enviro

Why manual testing is the new technical debt, and how to automate confidence.

Discover strategy to use when writing unit tests for Redux-connected components using React Testing Library (RTL).

Unit tests help ensure your code works better and prevents bugs. However, that explanation sounds too abstract and impractical for real-world scenarios.

EasyTdd 0.5.0 introduces Incremental FluentMock—streamlining .NET mocking with less boilerplate, intuitive setups, and improved test case generation.

Explore the world of integration testing and its critical role in the field of software development.