01 - Best practices

General instructions

When developing for Squash TA, we recommand you to follow those simple instructions:

  • Always check your environment is encoded in UTF-8.

  • Respect and apply our code convention.

  • If you develop a plugin, also apply our package name convention.

  • Respect basic Java recommandations (document your code, give your variables significant names, etc.)

We also recommand you to add tests to your code, to allow a better maintainability and prevent from regressions.

Add tests

Groovy Unitary tests

Our unitary tests are wrote in Groovy (you can find documentation here if you don’t know the language).

Unitary tests must be put in src/test/groovy directory of the project (if any, test resources can be put in the src/test/resources).

In SquashTA, Groovy classes and packages are named after the Java classes in src/main/java they are testing: a groovy file is named {{JavaClassName}}Test.groovy

As far as possible, try to make groovy tests for all your functionality, in order to have a 100% cover.

Squash TA integration tests

You can also add Squash TA tests to test your new implementations: those must be put in the squash-ta-new-engine/test package.