From aefdbeb84fa212d31fb9789711a78ed768d02f13 Mon Sep 17 00:00:00 2001 From: Keith Bentrup Date: Thu, 3 Dec 2020 11:53:44 -0500 Subject: [PATCH] add section on debugging --- README.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/README.md b/README.md index 69df763..84204fc 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,8 @@ - [Application Configuration For Development](#application-configuration-for-development) - [Configuration of MDM](#configuration-of-mdm) - [Configuration of an MDM app](#configuration-of-an-mdm-app) + - [Running tests](#running-tests) + - [Debugging](#debugging) # Overview @@ -314,3 +316,23 @@ $ sudo shutdown -r now | |`mdm_tunnel_pk_url`| ### Configuration of an MDM app + +## Running tests + +MDM uses [Bats](https://github.com/bats-core/bats-core) for testing. You'll find all tests in the numbered subdirectories of `tests`. + +Example #1: Call all tests in all immediate subdirectories of the specified one and show test timings. +``` +./tests/libs/bats/bin/bats -T ./tests/1-generic-lib-and-non-app-specific/**/*.bats +``` + +Example #2: Call all tests recursively for the specified dir and show test timings. +``` +./tests/libs/bats/bin/bats -T -r ./tests/2-dockerize-then-run-detached-app +``` + +See `.gitub/workflows` for additional example invocations. + +## Debugging + +A VSCode launch file (`.vscode/launch.json`) containing many debugging examples is included. Stepping through example debug configurations is a great way to become familiar with the control flow of MDM.