You'll find here materials that we have developed at ENX to facilitate code retreat.
When you're not comfortable with a language, it might take you a lot of time to scaffold the minimum and start right away. This is a pity!
We provide a scaffold allowing you to start to write code and practice Test Driven Development quickly for the following programming languages:
test && commit || revert
is a practice invented by Kent Beck.
We provide scripts to use TCR with the scaffolds:
./scripts/tcr
: the classic version../scripts/btcr
: this script is easier to work with: build failures will not be reverted, giving you a chance to fix them.
Those scripts can be called from within a scaffold folder. They will directly
call the appropriate scripts/build
and scripts/test
of that folder.
For example:
cd scaffolds/javascript
../../scripts/tcr
Inspirations:
We try to follow these recommendations:
- There should be a simple, minimal example of a test
- As much as possible, the scaffold should use a well-known and established build tool and dependency management tool.
- Instructions should be provided to explain how to:
- install the necessary dependencies,
- build and
- run the tests.
- Scripts should be provided to build and test in a consistent and predictable
way, so that it's easy for users to switch to another language location. These
scripts are also expected by the TCR scripts. The scripts provided should be:
./scripts/test
./scripts/build
- For those who don't want to install dependencies, a script should be provided to make it possible to run the commands in a container, so that people can use the scaffolds without having anything to install except docker. Examples of such scripts can be found here:
To check that all the scaffold scripts are present and work as intended, a
testing script can be launched: test_all.sh
.