+```
+
+Build the application and run the unit/integration tests:
+
+```
+$ npm run build -- --light
+$ npm test
+```
+
+If you just want to run 1 test (which is what you want to debug a specific test rapidly):
+
+```
+$ TS_NODE_FILES=true npm run mocha -- --exit -r ts-node/register -r tsconfig-paths/register --bail server/tests/api/videos/single-server.ts
+```
+
+While testing, you might want to display a server's logs:
+
+```
+NODE_APP_INSTANCE=1 NODE_ENV=test npm run parse-log -- --level debug | less +GF
+```
+
+Instance configurations are in `config/test-{1,2,3,4,5,6}.yaml`.
+Note that only instance 2 has transcoding enabled.
+
+#### Testing the federation of PeerTube servers
+
+Create a PostgreSQL user **with the same name as your username** in order to avoid using the *postgres* user.
+Then, we can create the databases (if they don't already exist):
+
+```
+$ sudo -u postgres createuser you_username --createdb
+$ createdb -O peertube peertube_test{1,2,3}
+```
+
+Build the application and flush the old tests data:
+
+```
+$ npm run build -- --light
+$ npm run clean:server:test
+```
+
+This will run 3 nodes:
+
+```