Pester: Loading PowerShell Modules for Testing

When you're testing PowerShell modules, importing, referencing, and removing modules can be a little bit tricky. These are some things that I've found to make tests more reliable. Use $PSScriptRoot Environment Variable Modules should be imported using the $PSSCRIPTROOT environment variable. This environment variable allows the module path to be relative so that the test … Continue reading Pester: Loading PowerShell Modules for Testing

PowerShell Scripts Need Tests Too!

Most of you probably know that I’m a big fan of automated testing and especially testing during the development process. It significantly improves the design of the code by encouraging loose coupling and high cohesion. It also provides great documentation and increases the confidence of anyone who needs to change the code in the future … Continue reading PowerShell Scripts Need Tests Too!

Debugging Powershell Modules in VS Code

TLDR; Use a .ps1 script or Pester test to force the load of the local module file and execute the function. Visual Studio Code Powershell Debugging Microsoft has a created a great Powershell extension for VS Code that makes it easy to work with Powershell files. Once the plugin is installed you get intellisense, syntax … Continue reading Debugging Powershell Modules in VS Code

cypress-ntlm-auth 401 Unauthorized Response

TLDR; Be sure to only run cy.ntlmReset() after all requests in a test are completed. Recently we started to experience intermittent 401 unauthorized errors when our Cypress tests were executing on our build server. These errors were intermittent because they were timing dependent. We've been using a library with Cypress that allows it to authenticate … Continue reading cypress-ntlm-auth 401 Unauthorized Response

Cypress.io baseUrl

TLDR; To help make your tests more reliable and prevent unexpected issues, organize Cypress tests around a single FQDN and don't switch between different target URLs during a test execution. Cypress Journey Recently I've been spending some time improving an existing test suite and writing tests in Cypress.io. Cypress is an excellent framework for developing … Continue reading Cypress.io baseUrl

SQL Server Spatial Types and nUnit

I was recently working on a .NET 4.6 based project that was using EF 6 and nUnit for unit testing. While setting up some integration tests against a local SQL database I was receiving this error: Spatial types and functions are not available for this provider because the assembly 'Microsoft.SqlServer.Types' version 10 or higher could … Continue reading SQL Server Spatial Types and nUnit

Effective Angular Testing

Angular provides a lot of great tools for testing your application. Unfortunately, this wide array of tools and different methods for testing can be confusing when you first start working with the framework. Having an understanding of how Angular's different testing tools and methods correspond to the traditional levels of automated testing will help you … Continue reading Effective Angular Testing

Developer === Tester

That's right. I said it. If you are a software developer, then you are also a software tester. If you care about the quality of the software you are developing then you should be spending a significant amount of your development effort ensuring and verifying that quality. The only way to do that is to … Continue reading Developer === Tester

soapUI:org.apache.http.client.ClientProtocolException

When I downloaded the soapUI Pro official build (4.5.1), the first thing I tried to do was test some of our services on the test environment.  All of our WCF services are protected by NTLM authentication.  Unfortunately I immediately hit a wall.  Every attempt to call a services threw the following un-handled exception: Error getting … Continue reading soapUI:org.apache.http.client.ClientProtocolException

Evaluating soapUI for Web Service Verification

Our team has been building WCF based web services for the last few years to support data integration between disparate systems in the enterprise.  Web services are a natural fit for this type of integration because they offer flexibility for cross-platform exchanges and are easily configurable to traverse firewalls inside of the corporate network.  We’ve … Continue reading Evaluating soapUI for Web Service Verification