Skip to content

Commit

Permalink
Add content testing docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Mab879 committed Sep 26, 2022
1 parent b1366e7 commit b0ff8e1
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions docs/manual/developer/08_content_tests.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Content Testing

The project has many tests that are run via `ctest` from [`cmake`](https://cmake.org/).
The tests are defined in `tests/CMakeLists.txt`.
All kinds tests ran with our `ctest` suite, including Python Unit tests, content validations, and if enabled Ansible syntax checks, among many others.
For help on how to run the tests please review the test section from the [Building ComplianceAsCode](02_building_complianceascode) guide.

## Python

### `MyPy`

Some utility scripts in the project are type checked with [mypy](http://mypy-lang.org/).
If you are writing a new Python file in the project you should consider using MyPy.
Add to your script to be type checked add path to your file in the `test-mypy` test in `tests/CMakeLists.txt`.

### Unit Tests

`ctest` is used to run the unit tests for the `ssg` python package that is in the repo.
File renamed without changes.

0 comments on commit b0ff8e1

Please sign in to comment.