random

2 posts

How to generate a random password in Groovy?

Sometimes you need to generate a random password (or just random string of any kind.) Today I will show you how to do it with a single line of code in Groovy 3 (or newer.)

Spock random order of tests - how to?

Spock Framework executes test methods (features) in a single class (specification) in the declaration order. There is nothing wrong in this default behavior - we should write tests with their isolation in mind. However, in some cases, we would like to randomize test methods execution. Today we are going to learn how to do it.