DESOSA 2022

AssertJ Core

AssertJ is a Java library that enables developers to create concise and readable test code. The power of AssertJ is shown by one of their nice examples on the docs page:

assertThat(fellowshipOfTheRing).hasSize(9)
                               .contains(frodo, sam)
                               .doesNotContain(sauron);

AssertJ has an extensive collection of assertions, making the possibilities almost endless. It is an alternative to JUnit’s own assertion module, offering clearer and more specific options. A nice example comes from the assertEquals, where AssertJ clarifies the positions of the expected / actual values:

// JUnit
assertEquals(42, 40 + 2);

// AssertJ
assertThat(40 + 2).isEqualTo(42);

In our project, we focus on the core module containing the assertions for standard JDK types.

Authors

Hana Jirovská

CS MSc Student at TU Delft and Student Assistant at QuTech. Enjoys learning about quantum communication, sustainability, and a bunch of other topics.

Sára Juhošová

Software engineer interested in concepts of programming languages, software quality, and functional programming. TA and Master student at TU Delft.

Wouter Polet

Master Computer Science student and Teaching Assistant at TU Delft. Specialising in Bioinformatics. I like testing my software well and writing beautiful code. Also check out my Advent of Code repo.

Natália Struharová

Master student of CS at TU Delft with a specialisation in Software Technology, interested in mobile app development and use of AI in software quality assessment.

AssertJ Core: Scalability

Over the past few weeks, we have been exploring the product vision, the architecture, and the quality of AssertJ Core. For this final essay, we will be exploring the scalability of this Java assertion library. The dimension we focus on is processing time and we examine this using an experiment directed at the low code health spots of the library. AssertJ Core is a testing library, focused on providing tailored assertions to specific JDK types.

AssertJ Core: Quality & Evolution

In our previous essay, we focused on the architecture of AssertJ Core and examined how architectural decisions influence the quality attributes. We begin this essay by summarising the degree to which these attributes are currently satisfied, and then we focus on the different means through which the quality of AssertJ Core is safeguarded. This includes quality assurance steps taken, means of automating these steps with CI, as well as an analysis of hotspot components and technical debt.

AssertJ Core: From Vision to Architecture

This essay explores the architecture and implementation of key quality attributes of AssertJ Core in relation to the previously defined key concepts and product vision. We first look at the architecture as a whole and then dive into the various views which provide insights into the design. This includes discussing the components, their connections, and the way they act at runtime and during development. We also reflect on the realisation of the key quality attributes and explore the API design principles used.

AssertJ Core: Product Vision & Problem Analysis

AssertJ is a testing library for Java which provides users with clear and specific assertions. It is used by testers to test production code, by developers to understand the bugs in their code, and (indirectly) by users of software which AssertJ tests. It is an open-source project used widely across the Java community and has many stakeholders and desired quality attributes. This essay focuses on determining the product vision and analysing the domain.

Contributions