Code360 powered by Coding Ninjas X Naukri.com. Code360 powered by Coding Ninjas X Naukri.com
Last updated: May 3, 2022

Junit Unit Tests

JUnit is a unit testing framework for Java programming language-based applications. It plays an essential role in test-driven development and is a family of unit testing frameworks known as xUnit. TDD approach basically helps us in identifying edge test cases during unit testing only, so that we can develop our app while thinking about those edge cases. Here, we will learn about features of Junit 4 and Junit 5 both like, annotations, packages, writing test cases and executing them, different types of tests, ignoring tests, testing asynchronous code, etc.
JUnit Introduction and Features
This blog discusses JUnit, its features, and how it makes coding simple.
JUnit Environment Setup and Framework
This blog discusses the installation and Setup of the JUnit Environment and Framework
Author Parth
0 upvotes
JUnit Basic Test cases and Syntax EASY
This article introduces the JUnit and the basic test cases with syntax along with the detailed description and code.
Junit Packages
In this blog, we will go through various packages available in Junit. We will work with examples to implement some packages and their usage.
Junit testing for Java Classes and methods EASY
This article introduces you to JUnit, Testing classes, and methods along with detailed description and code.
JUnit Annotations MEDIUM
The JUnit annotations are predefined texts provided by Java API, which helps JVM to recognize the type of method or class for testing. We need to install the JUnit dependencies first to use JUnit annotations for testing.
Display Name Generator EASY
In this article, we will discuss the concept of Name and Sentence Generators in JUnit. We will further discuss how to implement DisplayNames in JUnit.
JUnit Assertions EASY
In this article, we will discuss the concept of Assertions in JUnit. We will further discuss an example of Assertion in JUnit.
Disabling Tests in junit5
This article introduces you to JUnit and how to disable tests in JUnit with a detailed description and code.
JUnit Execution Procedure EASY
This article will discuss about the Execution procedures of JUnit Testing in Java. We will look at a detailed Java code to understand the JUnit Procedure for Testing.
JUnit Executing Tests
This article introduces you to Junit and Executing JUnit Tests with a detailed description and code.
JUnit Test Suites
This blog will introduce you to JUnit Test Suites, why we need test suites, and the step-by-step process to create an example test suite
Tagging and Filtering JUnit Tests
This blog will introduce you to tag classes and tests in JUnit. We will discuss the need and examples of tagging in JUnit.
JUnit Order of Tests
This blog will introduce you to testing the JUnit tests in a specific order. We can run tests in alphanumeric, custom, and random order.
JUnit Test Instance
In the article, we will discuss the @TestInstance in JUnit 5 and how you can change test instance lifecycle behavior using @TestInstance Annotation.
Custom JUnit Test Runners
In this blog, we will learn how to run a test suite in JUnit using a custom test runner and understand the primary responsibilities of a JUnit test runner.
@ignore Annotation in JUnit
@ignore Annotation is a tool in JUnit to ignore or not execute particular tests. In this article, we will use and implement @ignore Annotation with the help of examples.
JUnit Time Test
This blog will introduce you to JUnit Timeouts. Timeouts are essential to test the efficiency of the source code.
JUnit Exceptions Test
This blog will introduce you to testing exceptions in Junit. We will use @Test and @Rule to test the expected exceptions.
JUnit Error Collector
This blog will introduce you to error collectors in JUnit. We will also learn about @rule and see example test code.
Junit Nested Tests
The article discusses the nested classes and the implementation and setup of nested classes using JUnit5.
JUnit5 Repeated Tests
The article discusses the RepeatTest and RepetitionInfo annotation usage.
JUnit Tests Interfaces and Default Methods
In this blog, we will discuss the test interfaces in JUnit 5. We will apply JUnit annotations to default test interface methods.
JUnit Parameterized Test
The article covers various aspects of annotations which are being used in parameterized testing involved in JUnit.
JUnit - Extensions
In this article, we will discuss Extensions in JUnit. We will further discuss all the different extensions in JUnit and how they can be implemented.
Dynamic Tests in Junit 5
In this article, we will discuss Dynamic Testing in JUnit 5. We will further discuss the advantages and disadvantages of Dynamic Testing.
Conditional tests MEDIUM
This blog discusses various types of Conditional tests available in JUnit.
JUnit5 Dependency Injection for constructors and Methods
This article discusses the Dependency Injection for constructors and Methods in Junit5 using ParameterResolver.
JUnit Platform Launcher API
In this article, we will discuss the Platform launcher APIs in JUnit 5. We will further discuss the features and the methods of implementation of Platform Launcher API in JUnit.
JUnit Platform Test Kit
In this article, we will discuss the Platform Test Kit in JUnit. We will further discuss all the Platform Test Kit and JUnit features and how to implement Platform Test Kit.
JUnit Jupiter EASY
This blog discusses the theoretical and practical implementation of JUnit Jupiter.
Junit Vintage Engine
Developers use Junit Vintage Engine for running Junit4 and Junit4 based tests. This blog will go through the needs to use Junit Vintage Engine, what it consists of, and how the engine works.
JUnit Plugin with Apache Ant
This blog will introduce you to plugging JUnit in Apache Ant. we will also write a sample test in JUnit.
JUnit Introduction with Eclipse
This Blog will introduce you to JUnit. We will set up an eclipse environment for JUnit and write our first unit test.
Migrating from JUnit4 to JUnit5
The article covers migration to JUnit5 from JUnit4 and gives a detailed overview of annotations, assertions and assumptions in JUnit5.
JUnit for Kotlin Developers
The article covers kotlin testing configuration in JUnit5 and writing various test annotations in JUnit5.
Junit vs TestNG Difference
The article covers similarities and differences between Junit and TestNG testing. Their characteristics and features.