Git Product home page Git Product logo

Comments (10)

JCapriotti avatar JCapriotti commented on September 20, 2024

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.

joshbtn avatar joshbtn commented on September 20, 2024

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.

JCapriotti avatar JCapriotti commented on September 20, 2024

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.

hnrkndrssn avatar hnrkndrssn commented on September 20, 2024

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.

hnrkndrssn avatar hnrkndrssn commented on September 20, 2024

Reopening this so that I have a way to track it. (silly of me to close the issue at all really)

from library.

dragon788 avatar dragon788 commented on September 20, 2024

@lavinski has some great comments on testing Octopus Step Templates. http://www.lavinski.me/making-great-octopus-powershell-step-templates/

from library.

matt-richardson avatar matt-richardson commented on September 20, 2024

Here's another approach http://mjrichardson.com/blog/continuous-integration-with-octopus-deploy-step-templates/ that I have used with success previously.

from library.

dragon788 avatar dragon788 commented on September 20, 2024

@matt-richardson That's awesome! I think I'd run across ASOS at some point, but the style and testability is fantastic.

from library.

matt-richardson avatar matt-richardson commented on September 20, 2024

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.

DevOpsDerek avatar DevOpsDerek commented on September 20, 2024

Closing as no comment in 4 years.

from library.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.