Close-CatProject
Forgets the open project and ends the CAT session. Never required, never fails.
On this page
Synopsis
Close-CatProject
Parameters
None (common parameters only).
What it does
Removes the open project from the module state and disposes the session behind it, releasing the connections it held. Nothing has to be closed before another Open-CatProject — opening replaces the previous project by itself — and ending the PowerShell session releases everything as well; Close-CatProject is for scripts that want to release data-source connections explicitly, or to make sure a later Get-Cat* cannot accidentally read a stale project.
After it, Get-CatTestResultSummary and Get-CatTestResult report There is no CAT session active… — the results of the last run go with the session.
Output
Nothing. With -Verbose, what was removed.
Errors
None. Calling it with no open project or no session is not an error.
Examples
Open-CatProject -Path 'D:\Testing\DwhTests.cat.yaml'
$summary = Invoke-CatTest
Close-CatProject
Related
- Introduction — session model, logging, errors, sign-in.
Open-CatProject— the counterpart.