AtlassianPS / JiraPS

PowerShell module to interact with Atlassian JIRA
https://AtlassianPS.org/module/JiraPS
MIT License
323 stars 131 forks source link

Add tests for examples #279

Open lipkau opened 6 years ago

lipkau commented 6 years ago

Expected Behavior

CI ensures that all EXAMPLEs in the documentation are valid

Current Behavior

EXAMPLEs are not tested

Possible Solution

Add logic into test files for reading all examples and test them.

alexsuslin commented 5 years ago

@lipkau,

Are you thinking about testing examples through a public available JIRA? imho, that should be tested on appropriate pester test for every function, as each example is unique (like add something, delete something). We cannot properly test it even for simple get commands, e.g. Get-JiraIssue. Example may be valid, but the issue won't exist.

lipkau commented 5 years ago

First thought was to mock Invoke-WebRequest. But that would make a lot of cmdlets which expect a certain response.

running against our current cloud instance would work with a BeforeEach {} segment to set up a common environment