How do scalatest and spock differ? what is the added-value of each ? Which is more agile for Behavior Driven Development (BDD)? Please could you share some thoughts on the matter ?
I want to start BDD, I want to pick one between the two, therefore I'd like to make an educated decision. Hence i get the maximum of information first, especially given that I'm a java programmer and that scala seem to have a learning curve that is important.
Any advise or ideas or return from experiences would be welcome.
Many thanks
As we can see, Spock has more readability and a clearer documented code, it does not need 3rd parties, and it is more powerful than JUnit. In the end, using Spock or JUnit or TestNG or anything else is absolutely up to you. They each have their pros and cons for sure.
Scala provides type inference for variables and functions, much better than limited type inference in Java and C#. It also provides a compiler that uses type reference to a full extent. Applications of Scala provides various libraries and hence it can be used to build many frameworks.
In a nutshell, I would recommend to use ScalaTest for testing Scala code, and Spock for testing Java or Groovy code. (Of course, it's also perfectly possible to test Java code with ScalaTest.) Why not give both tools a shot and stick with the one that you are more comfortable with?
Disclaimer: I'm the creator of Spock.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With