Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rulasg/TestingHelper
Posh library to help on Powershell modules unit testing
https://github.com/rulasg/TestingHelper
dev posh powershell pwsh testing unittesting
Last synced: about 1 month ago
JSON representation
Posh library to help on Powershell modules unit testing
- Host: GitHub
- URL: https://github.com/rulasg/TestingHelper
- Owner: rulasg
- License: mit
- Created: 2020-10-18T13:57:02.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2024-04-12T12:57:31.000Z (9 months ago)
- Last Synced: 2024-05-18T05:33:57.480Z (8 months ago)
- Topics: dev, posh, powershell, pwsh, testing, unittesting
- Language: PowerShell
- Homepage: https://rulasg.github.io/TestingHelper/
- Size: 313 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 17
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - rulasg/TestingHelper - Posh library to help on Powershell modules unit testing (PowerShell)
README
# TestingHelper Powershell Module
This `module` contains `functions` to help create and run Unit Testing for Powershell modules.
## CI/CD Status
[![powershell](https://github.com/rulasg/TestingHelper/actions/workflows/powershell.yml/badge.svg)](https://github.com/rulasg/TestingHelper/actions/workflows/powershell.yml)
[![Test with TestingHelper](https://github.com/rulasg/TestingHelper/actions/workflows/test_with_TestingHelper.yml/badge.svg)](https://github.com/rulasg/TestingHelper/actions/workflows/test_with_TestingHelper.yml)
[![Deploy on Release Deployed](https://github.com/rulasg/TestingHelper/actions/workflows/deploy_module_on_release.yml/badge.svg)](https://github.com/rulasg/TestingHelper/actions/workflows/deploy_module_on_release.yml)## How to use it
This library will allow you to create a PowerShell Module with all the gearing for a full SDLC on GitHub platform.
- Create a Module with sample code
- Add Testing for sample tests
- Add Module gearing
- Add Helper scripts to create releases and deploy
- Add GitHub Worflows for Code Analysis, Testing and Deploy[Information on how to use it on the Docs](docs/index.md)
## API V3
### Testing
- Invoke-TestingHelper
- Import-TestingModule
- Test-Module (*ObsoleteAttribute*)
- Test-ModulelocalPSD1 (*ObsoleteAttribute*)### Tracing
- Trace-Message
- Write-AssertionSectionEnd### Files and Folders
- New-TestingFile
- New-TestingFolder
- Remove-TestingFile
- Remove-TestingFolder### New Module
- New-Module (Alias New-ModuleV3)
- New-ModuleV1
- New-ModuleV2
- New-ModuleV3- Add-ModuleV3
### Add Testing
- New-TestingModule
- Add-TestModuleV3### AddToModule*
- Add-ToModuleAll
- Add-ToModuleSampleCode
- Add-ToModuleAbout
- Add-ToModuleReadme
- Add-ToModuleLicense
- Add-ToModuleDevContainerJson
- Add-ToModuleGitRepository- Add-ToModuleDeployScript
- Add-ToModuleReleaseScript
- Add-ToModuleSyncScript- Add-ToModuleTestAll
- Add-ToModuleLaunchJson
- Add-ToModuleTestScript
- Add-ToModuleTestModule
- Add-ToModuleTestSampleCode- Add-ToModuleDeployWorkflow
- Add-ToModulePSScriptAnalyzerWorkflow
- Add-ToModuleTestWorkflow### Asserts
- Assert-AreEqual
- Assert-AreEqualContent
- Assert-AreEqualPath
- Assert-AreEqualSecureString
- Assert-AreNotEqual
- Assert-AreNotEqualContent
- Assert-AreNotEqualPath
- Assert-CollectionIsNotNullOrEmpty
- Assert-CollectionIsNullOrEmpty
- Assert-ContainedXOR
- Assert-Contains
- Assert-ContainsPath
- Assert-Count
- Assert-CountTimes
- Assert-FileContains
- Assert-FilesAreEqual
- Assert-FilesAreNotEqual
- Assert-IsFalse
- Assert-IsGuid
- Assert-IsNotNull
- Assert-IsNull
- Assert-IsTrue
- Assert-ItemExist
- Assert-ItemNotExist
- Assert-NotContains
- Assert-NotContainsPath
- Assert-NotImplemented
- Assert-SkipTest
- Assert-StringIsNotNullOrEmpty
- Assert-StringIsNullOrEmpty