ScalaCheck
Simulacrum
ScalaCheck | Simulacrum | |
---|---|---|
3 | 1 | |
1,933 | 936 | |
0.3% | -0.4% | |
8.3 | 3.7 | |
6 days ago | about 1 month ago | |
Scala | Scala | |
BSD 3-clause "New" or "Revised" License | BSD 3-clause "New" or "Revised" License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
ScalaCheck
-
How to Survive Your Project's First 100k Lines
Regarding numbers 2 and 3, I believe you are describing "property-based testing"[0]. A Scala version of this is ScalaCheck and can be found here[1].
There appears to be at least one Rust library which claims to provide same, but I am not a Rust developer so cannot recommend any for fitness of purpose.
0 - https://hypothesis.works/articles/what-is-property-based-tes...
1 - https://github.com/typelevel/scalacheck/blob/main/doc/UserGu...
-
Friction-less scala - Tell us what is causing friction in your day-to-day life with Scala
And the readmes and tutorials written for the major libraries are some of the best, and most concise out there. Seriously, even the old stuff, like scalacheck's guide is really good. Compare that to hypothesis. The hypothesis uses readthedocs, but other than the window dressing, much better. Try to find similar concise guides for major Java projects outside of spring boot. They're all external to the projects, published on Baeldung.
-
I’m really struggling with testing using Scalatest.
Write your test as properties that must be held, and let the framework generate random values and apply the function to thus values and compare the output by those properties. Take a look to ScalaCheck for that approach.
Simulacrum
-
Friction-less scala - Tell us what is causing friction in your day-to-day life with Scala
The Cats ecosystem offers mature named abstractions providing algebraic laws virtually identical to those offered by Haskell and PureScript and that have stood the test of time, at the cost of relying on a "design pattern" approach to implementation you have to squint a bit to see ("typeclasses" based on higher-kinded types and implicit arguments) and that sometimes doesn't play nicely with Scala's colored local type inference. The selling point of this, coupled with parametricity ("tagless-final style"), is the ability to reason algebraically about your code.
What are some alternatives?
ScalaTest - A testing tool for Scala and Java developers
Ammonite-Ops - Scala Scripting
Gatling - Modern Load Testing as Code
scribe - The fastest logging library in the world. Built from scratch in Scala and programmatically configurable.
scalaprops - property based testing library for Scala
Quicklens - Modify deeply nested case class fields
Nyaya - Random Data Generation and/or Property Testing in Scala & Scala.JS.
Freestyle - A cohesive & pragmatic framework of FP centric Scala libraries
ScalaMock - Native Scala mocking framework
LArray - Large off-heap arrays and mmap files for Scala and Java
Specs2 - Software Specifications for Scala
Shapeless - Generic programming for Scala