Skip to content

Latest commit

 

History

History
319 lines (237 loc) · 29.9 KB

unit-testing.md

File metadata and controls

319 lines (237 loc) · 29.9 KB

drawing

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.

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

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

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.

Intro

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.

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.

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

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

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

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...

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

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.

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?

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

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.

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.

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

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

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

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.

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

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

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!

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

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

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

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

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.

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

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

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.

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

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

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.

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.

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

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

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.

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?

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.

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!

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.

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.

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.

Setup

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

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. 

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

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. 

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

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.

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

Why does my application get so buggy after each release?

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. 

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:

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

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

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.

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

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

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

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.

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.

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.

How React Testing Library Can Improve Your Mental Health Part 2

TL;DR

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

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.

Understand flaky tests with some real-world examples.

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. 

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.

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.

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.

(Licensed from Adobe Stock Photo)

Using Linting, Formatting, and Unit Testing with Code Coverage to Enforce Quality Standards