Archive for category PowerShell

Pester: Using TeamCity to run your tests

I’ve previously written blog posts about Pester. The first one was a general purpose overview. The second one was about working with modules and Pester. The whole, original, purpose for me using Pester was to get a bit of quality around a PS module I’ve written called TSR. So the last part of the whole […]

, , , ,

1 Comment

PowerShell: Write-Verbose and Write-Debug without annoying word wrap

Recently I ran into an issue with the PowerShell runner in TeamCity. I wanted to use the Write-Verbose and Write-Debug cmdlets to conditionally output some messages. However I discovered that the output in the build log was anything but what I originally had planned. The messages where “cut off” or word-wrapped so to say in […]

,

Leave a comment

Pester: How to unit test your PowerShell modules

I’ve written about Pester before on how & why you should really start testing your PowerShell code. However, obstacles may arise when you want to write unit tests for PowerShell modules. In this post I’m going to present a solution that enables you to overcome some of these obstacles. Let’s get started. Problem Let’s take the […]

,

1 Comment

Pester: Unit Testing for PowerShell

Pester is a BDD inspired testing framework for PowerShell just like Jasmine is on the JavaScript side and RSpec is on the Ruby side for example (I do believe that JavaScript is one of the best comparisons for PowerShell though, it being a scripting language and all). This blog post is meant as a quick […]

, , , ,

2 Comments

Using TeamCity for ASP.NET development: Backup

This is the fourth part of a blog post series on using TeamCity continuous integration server from JetBrains for asp.net development. Here are the links to all the parts of the series: Installing/Configuring TeamCity for use with IIS MSBuild requirements for web package publishing Deploying via Web Deploy Backup (pre-deploy) [this post] 4. Backup (pre-deploy) […]

, , , , ,

6 Comments

Conditionally display TeamCity build progress messages

TeamCity has a number of notifications/messages that you can make use of to interact with the build script. One of them is the Build Progress Message which is shown on the project dashboard to provide sort of a UI hint to the user while the build is running, like this example: According to the TeamCity […]

, ,

Leave a comment