Comments (10)
I don't think there are. However, I think I am going to start adding some. I have a pending pull requests (well, one with several updates) so hopefully if we start making unit tests, they will be easier to accept.
My idea is to use Pester and some sort of wrapper to call the step template JSON.
from library.
Nice, I haven't heard of pester before. It looks like the right tool for the job. I might take some time looking into this approach as well, let me know if you come up with anything. I agree It could help speed up acceptance of these site templates.
from library.
I haven't used Pester myself, but it seems to be pretty popular.
I have a slow start on a test for IIS app creation... nothing worth seeing. But in thinking about the test code, I've settled on writing more of a functional test as opposed to a unit test. Most of the Pester examples have a lot of mock setup, which I can see getting pretty unruly. I'd rather test that the step works than focus on a specific method being called.
from library.
At some point I'd like to have a way to testing the step templates so that these tests can be run as part of our CI build when a PR is submitted.
Once I have some free time, I will sit down and spike a way to do these tests. For now I will close this issue.
from library.
Reopening this so that I have a way to track it. (silly of me to close the issue at all really)
from library.
@lavinski has some great comments on testing Octopus Step Templates. http://www.lavinski.me/making-great-octopus-powershell-step-templates/
from library.
Here's another approach http://mjrichardson.com/blog/continuous-integration-with-octopus-deploy-step-templates/ that I have used with success previously.
from library.
@matt-richardson That's awesome! I think I'd run across ASOS at some point, but the style and testability is fantastic.
from library.
but the style and testability is fantastic.
Credit to @paulmarsy here. Before he got to it, it was just a plain old build.ps1
:)
from library.
Closing as no comment in 4 years.
from library.
Related Issues (20)
- Azure Logo HOT 1
- Repository - support Libraries of Departmental ALIA HOT 1
- Slack Detailed Notification failed if the release notes includes some special characters like & or | HOT 5
- GCP Secret Manager - Retrieve Secrets - Add option to ignore warning when retrieving latest version of secret HOT 2
- Upcoming major releases of Chocolatey products that may impact functionality on the Chocolatey step templates HOT 7
- Command Timeout parameter has no effect in SQL - Deploy DACPAC using SqlPackage step template HOT 2
- The service cannot accept control messages at this time HOT 2
- Issue with Microsoft Teams - Post a message HOT 6
- Issue with Git - Pull (HTTPS)
- SQL - Deploy DACPAC using SqlPackage - Lost functionality when updating from legacy package HOT 10
- Issue with Run Azure DevOps Build Pipeline HOT 2
- Issue with Run Azure DevOps Build Pipeline
- Slack - Send Simple Notification cannot create SSL connection HOT 11
- Issue with Variables - Substitute in Files HOT 3
- Issue with Run Azure DevOps Build Pipeline HOT 2
- asp.net check fails with new versions using new registry key HOT 1
- run-octopus-runbook failing to get machine ID HOT 5
- "Slack - Detailed Notification" broken on Windows Powershell 4.x
- Azure Cli Issue with Azure Administer WebJob HOT 5
- Post to Microsoft Teams is using MessageCard (Legacy) format instead of AdaptiveCard HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from library.