Description
This repository contains AssertJs website.
To contribute, please read how to edit AssertJs site.
Please use https://github.com/joel-costigliola/assertj-core/issues to create issues for AssertJ Core itself.
AssertJ alternatives and similar libraries
Based on the "Testing" category.
Alternatively, view AssertJ alternatives based on common mentions on social networks and blogs.
-
Apache JMeter
Apache JMeter open-source load testing tool for analyzing and measuring the performance of a variety of services -
TestContainers
Testcontainers is a Java library that supports JUnit tests, providing lightweight, throwaway instances of common databases, Selenium web browsers, or anything else that can run in a Docker container. -
MockServer
MockServer enables easy mocking of any system you integrate with via HTTP or HTTPS with clients written in Java, JavaScript and Ruby. MockServer also includes a proxy that introspects all proxied traffic including encrypted SSL traffic and supports Port Forwarding, Web Proxying (i.e. HTTP proxy), HTTPS Tunneling Proxying (using HTTP CONNECT) and SOCKS Proxying (i.e. dynamic port forwarding). -
PowerMock
PowerMock is a Java framework that allows you to unit test code normally regarded as untestable. -
Awaitility
Awaitility is a small Java DSL for synchronizing asynchronous operations -
ArchUnit
A Java architecture test library, to specify and assert architecture rules in plain Java -
Pact JVM
JVM version of Pact. Enables consumer driven contract testing, providing a mock service and DSL for the consumer project, and interaction playback and verification for the service provider project. -
JSONAssert
Write JSON unit tests in less code. Great for testing REST interfaces. -
JMockit
Advanced Java library for integration testing, mocking, faking, and code coverage -
Citrus
Framework for automated integration tests with focus on messaging integration -
System Rules
A collection of JUnit rules for testing code which uses java.lang.System. -
junit-dataprovider
A TestNG like dataprovider runner for JUnit with many additional features -
ConcurrentUnit
Toolkit for testing multi-threaded and asynchronous applications -
Mutability Detector
Lightweight analysis tool for detecting mutability in Java classes -
Lamdba Behave
A modern testing and behavioural specification framework for Java 8 -
Jukito
The combined power of JUnit, Guice and Mockito. Plus it sounds like a cool martial art. -
Arquillian
Integration and functional testing platform for Java EE containers. -
Randomized Testing
Randomized Testing (Core JUnit Runner, ANT, Maven) -
Spectrum
A BDD-style test runner for Java 8. Inspired by Jasmine, RSpec, and Cucumber. -
Scott Test Reporter
Never debug a test again: Detailed failure reports and hassle free assertions for Java tests - Power Asserts for Java -
pojo-tester
Java testing framework for testing pojo methods. It tests equals, hashCode, toString, getters, setters, constructors and whatever you report in issues ;) -
raml-tester
Test if a request/response matches a given raml definition
Write Clean Java Code. Always.
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of AssertJ or a related project?
Popular Comparisons
README
AssertJ - Fluent Assertions for Java

AssertJ provides a rich and intuitive set of strongly-typed assertions to use for unit testing (with JUnit, TestNG or any other test framework).
You can ask questions in stackoverflow (assertj tag) and make suggestions by simply creating an issue.
AssertJ's goals
AssertJ's ambition is to provide a rich and intuitive set of strongly-typed assertions for unit testing.
The idea is that disposal assertions should be specific to the type of the objects we are checking when writing unit tests. If you're checking the value of a String
, you use String-specific assertions. Checking the value of a Map
? Use Map-specific assertions to easily check the contents of the map.
AssertJ's assertions are super easy to use: just type assertThat(underTest).
and use code completion to show you all assertions available.
Assertion missing? Please create an issue to discuss it and even better contribute to the project!
AssertJ is composed of several modules:
- A core module (this one) to provide assertions for JDK types (
String
,Iterable
,Stream
,Path
,File
,Map
...) - see AssertJ Core documentation and javadoc. - A Guava module to provide assertions for Guava types (
Multimap
,Optional
...) - see AssertJ Guava documentation and javadoc. - A Joda Time module to provide assertions for Joda Time types (
DateTime
,LocalDateTime
) - see AssertJ Joda Time documentation and javadoc. - A Neo4J module to provide assertions for Neo4J types (
Path
,Node
,Relationship
...) - see AssertJ Neo4J documentation and javadoc. - A DB module to provide assertions for relational database types (
Table
,Row
,Column
...) - see AssertJ DB documentation and javadoc. - A Swing module provides a simple and intuitive API for functional testing of Swing user interfaces - see AssertJ Swing documentation and javadoc.
Want to contribute?
You are encouraged to contribute any missing useful assertions.
Please read the contributing section and raise a PR!