Running My First Test
For writing tests, we prefer Groovy and JUnit. Although Groovy and JUnit are sufficient, we also use the Spock framework as it brings a huge amount of very helpful features to the tests.
To get started:
- Clone the example project from:Â https://gitlab.pricefx.eu/tdd4c/tdd4c-example-logic
- Set up your IDE.Â
- Open tdd4c/MyFirst1Test.groovy
- Run it.
The test itself instantiates an instance of the TestRun class which is the tiny (test run) context holder that evaluates all the formulas and stores element results.
When executed, you can query the element results.
Explore the other tests in the repository.
Found an issue in documentation? Write to us.
Â