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:

  1. Clone the example project from: https://gitlab.pricefx.eu/tdd4c/tdd4c-example-logic
  2. Set up your IDE. 
  3. Open tdd4c/MyFirst1Test.groovy
  4. 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.

Â