Skip to content

autosysops/CodeQuality

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PSScriptAnalyzer and Pester

This repo shows how you can use PSScriptAnalyzer and Pester together to generate a test report.

Usage

If you want to use this locally call the test.ps1 file. Here are the examples to use in this demo:

.\test.ps1

This will call the script in default settings, it will use the simple way of combinding PSScriptAnalyzer and Pester to give you an output in the host.

.\test.ps1 -Type advanced

This will use the more advanced way of combining PSScriptAnalyzer and Pester. It will now show in which files there are issues and what these issues are.

.\test.ps1 -Type advanced -TestLocation '.\src\exemptions\'

This will have the script test the exemptions folder in src instead and will give an succesfull tests due to the excemptions being inserted into the scripts.

.\test.ps1 -Type advanced -OutputResults   

This will use the more advanced way of combining PSScriptAnalyzer and Pester. It will generate a file called pssa.testresults.xml in the root of this folder. This file can be published in a pipeline to show the testresults.

Pipeline

There is a pre-made azure devops pipeline available in the repository. You can take the azure-pipeline-pssa.yml file. It has no predefined trigger as the intended use case would be to use it as build validation for a certain branch.

About

Demo and scripts to automatically test code quality with PSScriptAnalyzer and Pester

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy