JiraPS icon indicating copy to clipboard operation
JiraPS copied to clipboard

Add tests for examples

Open lipkau opened this issue 7 years ago • 2 comments

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.

lipkau avatar Jun 05 '18 10:06 lipkau

@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.

alexsuslin avatar Mar 19 '19 23:03 alexsuslin

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

lipkau avatar Mar 21 '19 13:03 lipkau