ConfluencePS Testing Guide

This guide explains the test layout used by ConfluencePS.

Test Structure

ConfluencePS uses Pester 5.9.x for new and modernized tests. Tests are organized to mirror the module structure:

Test Templates

Use the templates in the target folder when adding new function tests:

Public cmdlet tests should normally cover signature, behavior, and input validation. Private helper tests should normally cover object conversion, property mapping, and pipeline behavior.

Running Tests

Focused validation while iterating:

Invoke-Build -Task Lint
Invoke-Pester -Path 'Tests/Functions/Public/<Cmdlet>.Unit.Tests.ps1'
Invoke-Pester -Path 'Tests/Functions/Private/<Helper>.Unit.Tests.ps1'
Invoke-Pester -Path 'Tests/Build.Tests.ps1'

Full non-live validation before committing:

Invoke-Build -Task Build, Test

Integration tests require Cloud credentials or a local Dockerized Data Center instance. See Tests/Integration/README.md for integration setup and runner details.