Skip to content

Conversation

t2gran
Copy link
Member

@t2gran t2gran commented Sep 5, 2025

Summary

This is a POC to demonstrate TableTest in OTP. We can discuss if this is something we want to use in a dev meeting.

The TableTest is written by a colleague of mine in Scienta. The TableTest is inspired by the Spock framework.

Pros

  • More readable tests. Most of the "ugly looking" @ParameterizedTest can be replaced by @TableTest

Cons

  • Depend on a small utility with limited support

There is a IntelliJ plugin witch must be installed to get syntax highlighting and editing support for the tables.

In IntelliJ the test will look like this:

Skjermbilde 2025-09-05 kl  13 02 32

The custom parsing of the int values is achieved by adding a @FactorySource to the class:

@FactorySources(TableTestValueParser.class)
public class TestTripScheduleSearchTest implements RaptorTestConstants {

Issue

  • This improve unit tests, no issue.

Unit tests

Improve

Documentation

JavaDoc added

Changelog

Not relevant

Bumping the serialization version id

Not needed

@t2gran t2gran added !Technical Debt Improve code quality, no functional changes. +Skip Changelog This is not a relevant change for a product owner since last release. labels Sep 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

+Skip Changelog This is not a relevant change for a product owner since last release. !Technical Debt Improve code quality, no functional changes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant