ubill.github.io

Date

ERLANG NEW PROJECT:

withdocs/ - because we're going to have full docs automatically built. first make two folders, src/ and test/ .

The first file(s) you should then write are the common test SUITE files. Under test/.

Why?

You will find that you need to trigger a sequence of steps to test that the many Erlang processes that you will write (even to do the simplest of tasks, that's how Erlang works) and the best way to save up all the (Erlang shell) commands that do that, in sequence, is just to record them in a common test suite.

Out-of-the-box, Erlang common test generates HTML reports for both test execution, as well as for coverage.

Another nifty batteries-included feature is auto-generating comprehensive HTML documentation out-of-the-box, without installing Sphinx tool as in Python.

Why not unit tests first?

Reason is that we have not yet even written our code or even know how to write it. But from an even higher-level perspective, we would know what our app is supposed to do, and the sequence of steps for the first flow, the simplest flow.

That, we can record down into a common test first, while it's still fresh in our minds.

Unit tests can be written to test our implementation(which we don't have yet) - later.

Auto documentation HTML

Create the first file exercise_001_SUITE.erl in our tests/ folder.

(to continue writing more about this later)