From bf0a18b98196f51f110ecd89c4ad16484b72f3fc Mon Sep 17 00:00:00 2001 From: Julio Biason Date: Wed, 19 Jun 2019 14:49:58 -0300 Subject: [PATCH] New Chapter: Run Tests In The Command Line --- content/books/things-i-learnt/_index.md | 1 + .../books/things-i-learnt/tests-apis/index.md | 2 +- .../tests-in-the-command-line/index.md | 37 +++++++++++++++++++ 3 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 content/books/things-i-learnt/tests-in-the-command-line/index.md diff --git a/content/books/things-i-learnt/_index.md b/content/books/things-i-learnt/_index.md index 9c0d13a..0021ef9 100644 --- a/content/books/things-i-learnt/_index.md +++ b/content/books/things-i-learnt/_index.md @@ -13,3 +13,4 @@ template = "section-contentless.html" * [Gherkin Is Your Friend to Understand Expectations](gherkin) * [Unit Tests Are Good, Integration Tests Are Gooder](integration-tests) * [Tests Make Better APIs](tests-apis) + * [Make Tests That You Know How To Run on the Command line](tests-in-the-command-line) diff --git a/content/books/things-i-learnt/tests-apis/index.md b/content/books/things-i-learnt/tests-apis/index.md index fba4979..425b2ed 100644 --- a/content/books/things-i-learnt/tests-apis/index.md +++ b/content/books/things-i-learnt/tests-apis/index.md @@ -42,4 +42,4 @@ can see how much one would suffer -- or, hopefully, enjoy -- using that. [^1]: Again, let's ignore for a second that there are no "unit" in "unit tests"... -{{ chapters(prev_chapter_link="/books/things-i-learnt/integration-tests", prev_chapter_title="Unit Tests Are Good, Integration Tests Are Gooder") }} +{{ chapters(prev_chapter_link="/books/things-i-learnt/integration-tests", prev_chapter_title="Unit Tests Are Good, Integration Tests Are Gooder", next_chapter_link="/books/things-i-learnt/tests-in-the-command-line", next_chapter_title="Make Tests That You Know How To Run on the Command line") }} diff --git a/content/books/things-i-learnt/tests-in-the-command-line/index.md b/content/books/things-i-learnt/tests-in-the-command-line/index.md new file mode 100644 index 0000000..73dd373 --- /dev/null +++ b/content/books/things-i-learnt/tests-in-the-command-line/index.md @@ -0,0 +1,37 @@ ++++ +title = "Things I Learnt The Hard Way - Make Tests That You Know How To Run on the Command line" +date = 2019-06-19 + +[taxonomies] +tags = ["en-au", "book", "things i learnt", "tests", "command line"] ++++ + +You know that "Play" with a little something on your IDE that runs only the +tests? Do you know what it does? + + + +A long time ago I read the story about a professor that taught his students to +code. He preferred to teach using an IDE, 'cause then "students have to just +press a button to run the tests". + +I get the idea, but I hate the execution. + +When we get into professional field, we start using things like [continuous +integration](https://en.wikipedia.org/wiki/Continuous_integration) which, +basically, is "run tests every time something changes" (it's a bit more than +that, but that's the basic idea). + +Now, let me ask you this: Do you think the students of the professor above +would know how to add the command to run the tests in a continuous +integration system? + +I know I'm being too picky (one could even call me "pricky" about this) but +the fact is that whatever we do today, at some point can be automated: our +tests can be run in an automated form, our deployment can be run in an +automated form, our validation can be run in an automated form and so on. If +you have no idea how those things "happen", you'll need the help of someone +else to actually build this kind of stuff, instead of having the knowledge +(well, half knowledge, the other half is the CI tool) with you all the time. + +{{ chapters(prev_chapter_link="/books/things-i-learnt/tests-apis", prev_chapter_title="Tests Make Better APIs") }}