From ca768c803b20da8742ba5e7e6a71c124298e1940 Mon Sep 17 00:00:00 2001 From: Gary Ewan Park Date: Fri, 25 Oct 2024 04:16:41 -0500 Subject: [PATCH] (doc) Add testing section to link to other docs It was pointed out in community discussion that the main README file doesn't mention anything to do with running tests for the Chocolatey CLI codebase. This commit adds a new Testing section to the README.md file, that links off to the pertinent information in the TESTING.md file. Used the Markdown All in One VSCode extension to update the table of contents. Initially this was adding an entry in the TOC section for the first heading, which was not there before, so added an entry in workspace settings.json file to exclude this. Updating this table of contents actually picked up on some previously entries which hadn't been added. --- .vscode/settings.json | 3 ++- README.md | 12 ++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 4dc317cc50..1d0b65848d 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,5 +1,6 @@ { "[powershell]": { "files.encoding": "utf8bom", - } + }, + "markdown.extension.toc.levels": "2..6" } \ No newline at end of file diff --git a/README.md b/README.md index 34ab0dc342..f001a8aede 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,10 @@ You can just call me choco. - [Windows](#windows) - [Other Platforms](#other-platforms) - [Prerequisites:](#prerequisites) + - [Before building:](#before-building) - [Build Process:](#build-process) + - [Testing](#testing) + - [Installing on Other Platforms:](#installing-on-other-platforms) - [Credits](#credits) @@ -200,6 +203,15 @@ chmod +x *.sh Running the build on Mono produces an artifact similar to Windows but may have more rough edges. You may get a failure or two in the build script that can be safely ignored. +### Testing + +The Chocolatey CLI codebase contains a number of different tests, including unit, integration, and end-to-end tests. +These are all documented in the [TESTING.md](https://github.com/chocolatey/choco/blob/develop/TESTING.md) file. + +The unit and integration tests are NUnit tests, which can be executed directly within Visual Studio, or as part of the [build process](https://github.com/chocolatey/choco/blob/develop/TESTING.md#running-tests). + +The end-to-end tests use Pester as the test framework. Since these tests have the potential to actually make changes to your system, we recommend using the [provided Vagrant file to run these tests in a dedicated virtual machine](https://github.com/chocolatey/choco/blob/develop/TESTING.md#pester-tests). + ### Installing on Other Platforms: 1. Get a copy of the source code and build.