Scala Summit 2026
Bill Venners

Bill Venners

President, Artima · Lead developer of ScalaTest

The talk

What's New in ScalaTest 3.3

ScalaTest 3.3 is the biggest release since 3.0, and it completes a plan that started in 3.1, when FunSuite, FlatSpec and their siblings were deprecated and renamed AnyFunSuite, AnyFlatSpec. The Any prefix indicates that test bodies have type Any. One consequence is a test that forgets to assert still compiles, runs, and passes. In 3.3 the original names come back, with a test body type of Assertion. A test that ends in a Boolean expression in a FunSuite, for example, will not compile. The Any* styles stay — they are still useful in many ways — but now there’s a more typesafe alternative.

We paired the safer style traits add a new kind of assertion, an Expectation, which always returns a value rather than sometimes throwing an exception. Fact is that value, and it composes using the logical operators — such as &&, ||, or implies — so a sequence of statements whose results get discarded becomes one expression.

In addition, we’ve been developing a property-based testing framework for several years, and it will be released as part of 3.3. Shrinking is integrated rather than bolted on. A generator produces a lazy tree of progressively simpler candidates instead of a bare value, and every candidate is filtered through the generator’s own validity check, so a shrunken counterexample is always a value that generator could have produced in the first place. Edge cases are first-class as well: each generator carries a list of boundary values, and a property run works through those as well as generating random values, so the cases most likely to break your code are tried regularly rather than left to chance. Because Randomizer is immutable and seed-based, any failing run can be replayed exactly.

About Bill

Bill Venners is president of Artima, Inc. He is the lead developer of the ScalaTest and Scalactic open source libraries and coauthor of Programming in Scala, Fifth Edition and Advanced Programming in Scala, Fifth Edition.