Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
A

assertj

> 测试质量
Open source

Fluent testing assertions for Java and the JVM

2.8K stars0 likes0 views
WebsiteGitHub

About

Fluent testing assertions for Java and the JVM

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

  • AssertJ's Goals
  • Quick start
  • Documentation
  • Want to Contribute?

You can ask questions in stackoverflow (assertj tag) and make suggestions by simply creating an issue.

Sponsors

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

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Javaassertionsassertjgroovyhacktoberfest

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category测试质量
PricingOpen source

> Related tools

J
Jest
JavaScript 测试框架
P
Playwright
现代端到端测试框架
E
eslint-plugin-test-selectors
Enforces that data-test-id attributes are added to interactive DOM elements (JSX) to help with UI testing. JSX only.