Skip to content

Commit

Permalink
Create new version
Browse files Browse the repository at this point in the history
  • Loading branch information
pgroene committed Jan 30, 2017
1 parent 2b216b6 commit 423a4cd
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 10 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Xpirit-Vsts-Build-Pester

[See readme](Xpirit.Vsts.Build.Pester.Extension/readme.md)

[![Gitter](https://badges.gitter.im/XpiritBV/Xpirit-Vsts-Build-Pester.svg)](https://gitter.im/XpiritBV/Xpirit-Vsts-Build-Pester?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
8 changes: 4 additions & 4 deletions Xpirit-Vsts-Build-Pester/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
"name": "Pester Powershell unittest",
"friendlyName": "Run Pester powershell unittests",
"description": "Run Pester powershell unittests",
"helpMarkDown": "",
"helpMarkDown": "[More Information](https://pgroene.wordpress.com/2017/01/30/running-powershell-pester-unit-test-in-a-vsts-build-pipeline/)",
"category": "Test",
"visibility": [ "Build" ],
"author": "Peter Groenewegen - Xpirit",
"version": {
"Major": 1,
"Minor": 1,
"Patch": 2
"Patch": 3
},
"demands": [ ],
"minimumAgentVersion": "1.90.0",
Expand All @@ -20,9 +20,9 @@
"name": "ItemSpec",
"type": "string",
"label": "Test files",
"defaultValue": "*.tests.ps1",
"defaultValue": "**\\*.tests.ps1",
"required": true,
"helpMarkDown": "*.tests.ps1 will get all your tests."
"helpMarkDown": "**\\*.tests.ps1 will get all your tests."
},
{
"name": "FailOnError",
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 11 additions & 5 deletions Xpirit.Vsts.Build.Pester.Extension/readme.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Run Pester in VSTS build and release tasks
This build and release extension enables your to run Powershell unit test in your build and release pipelines. It uses the Pester Powershell test framework.
This build extension enables your to run Powershell unit test in your build and release pipelines. It uses the Pester Powershell test framework.

## Pester
[Pester](https://github.com/pester/Pester) will enable you to test your Powershell scripts from within Powershell. It is a set of function for unit testing Powershell functions. These functions will allow you to mock and issolate your test cases.
[Pester](https://github.com/pester/Pester) will enable you to test your Powershell scripts from within Powershell. It is a set of function for unit testing Powershell functions. These functions will allow you to mock and isolate your test cases.

## Pester build and release extension
This extension will run your pester unit test in a build and release pipeline.
## Pester build extension
This extension will run your pester unit test in a build pipeline.
The task will first check if Pester is installed. If Pester is installed, it uses the installed Pester version. When Pester is not installed, the task will install the latest stable Pester version.
On failure you can choose to break the build or just show it in the test results.

Expand All @@ -22,7 +22,7 @@ Fail build on error: true
This will run all *.tests.ps1 files in your repository

### Upload test results VSTS
When you want the test results visible in VSTS, you need to upload the test result file. This can be done with the Upload test results task. Pester will write the test results in nUnit format to a test results file. This test results file is located in the test results directory.
When you want the test results visible in VSTS, you need to upload the test result file. This can be done with the Upload test results task. Pester will write the test results in nUnit format to a test results file. This test results file is located in the test results directory. That is one directory higher than the working directory of the task.

The following configuration can be used:

Expand All @@ -33,3 +33,9 @@ Always run: true
```

![alt tag](images/screenshots/vsts-pester2-pester.png)




[See my blog for more tasks](https://pgroene.wordpress.com/)
[Sources](https://github.com/XpiritBV/Xpirit-Vsts-Build-Pester)
2 changes: 1 addition & 1 deletion extension-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"manifestVersion": 1,
"id": "PeterGroenewegen-Xpirit-Vsts-Build-Pester",
"name": "Pester unittest build task",
"version": "1.1.2",
"version": "1.1.3",
"publisher": "petergroenewegen",
"public": true,
"targets": [
Expand Down

0 comments on commit 423a4cd

Please sign in to comment.