Truth is a library for performing assertions in tests. Truth makes your test assertions and failure messages more readable. Similar to AssertJ, it natively supports many JDK and Guava types, and it is extensible to others. Truth is owned and maintained by the Guava team. It is used in the majority of the tests in Google’s own codebase.

Features

  • The Truth code is faster to type, especially with autocompletion
  • The Truth code is easier to read
  • Truth and AssertJ are very similar
  • Add static imports for Truth’s entry points
  • If you’re using an IDE with autocompletion, it will suggest a list of assertions you can make about the given type
  • Write test assertions

Project Samples

Project Activity

See All Activity >

Categories

Libraries

License

Apache License V2.0

Follow Truth

Truth Web Site

Other Useful Business Software
Forever Free Full-Stack Observability | Grafana Cloud Icon
Forever Free Full-Stack Observability | Grafana Cloud

Our generous forever free tier includes the full platform, including the AI Assistant, for 3 users with 10k metrics, 50GB logs, and 50GB traces.

Built on open standards like Prometheus and OpenTelemetry, Grafana Cloud includes Kubernetes Monitoring, Application Observability, Incident Response, plus the AI-powered Grafana Assistant. Get started with our generous free tier today.
Create free account
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of Truth!

Additional Project Details

Programming Language

Java

Related Categories

Java Libraries

Registered

2023-08-08