Skip to content
Jonathan George By Jonathan George Software Engineer IV
Integration Testing Azure Functions with Reqnroll and C#, Part 5 - Using Corvus.Testing.ReqnRoll in a build pipeline

TL;DR - This series of posts shows how you can integration test Azure Functions projects using the open-source Corvus.Testing.AzureFunctions.ReqnRoll library and walks through the different ways you can use it in your Reqnroll projects to start and stop function app instances for your scenarios and features.

In the previous posts in this series, we introduced the Corvus.Testing.AzureFunctions.ReqnRoll project and showed how you can use the bindings and classes it provides to start functions apps as part of your scenarios and features. We're going to finish with some pointers on how to ensure these functions can run as part of your build pipelines.

Depending on how your build system works, it's relatively easy to ensure that tests using these methods are able to run as part of the build pipeline.

If, like us, you're using Azure DevOps with hosted agents, you'll need to add a step to your pipeline to install the Azure Functions Core Tools. For YAML build definitions, it looks like this:

- task: Npm@1
  displayName: 'Install Azure Functions V4 Core Tools'
  inputs:
    command: custom
    verbose: false
    customCommand: 'install -g azure-functions-core-tools@4 --unsafe-perm true'
The Introduction to Rx.NET (v6.1) 3rd Edition (2025) Book, by Ian Griffiths & Lee Campbell, is now available to download for FREE.

Once that step has run, the test will be able to execute as it does locally. The Corvus.Testing.AzureFunctions.ReqnRoll library targets .NET 8, which is cross-platform, so this should work on both Windows and Linux build agents.

GitHub Actions is similarly straightforward. Simply add a step to install the Azure Functions Core Tools towards the start of your pipeline.

This approach should also work for other CI servers and their hosted build agents. If you're using a private agent you have the option of installing the tools globally, meaning your build scripts can just assume they are present - this very much depends on how you prefer to manage build agents.

Programming C# 12 Book, by Ian Griffiths, published by O'Reilly Media, is now available to buy.

Summary

For Reqnroll users, the techniques I've shown in these posts will help ensure your integration tests are more complete by ensuring that functions under test are hosted in a way that closely matches the Azure environment they will ultimately run in.

I've tried to keep the posts simple by only covering testing HTTP triggered functions, but these techniques can equally be used to test functions that use other trigger types too. In our projects we've used it to test functions with blob, queue and Event Hubs endpoints, as well as functions using Durable extensions. This will generally require other infrastructure for your integration testing - for example, Azurite and/or Testcontainers to make storage available to trigger blob and queue endpoints - but the principles remain the same.

As mentioned above, the Corvus.Testing projects (Corvus.Testing.ReqnRoll and Corvus.Testing.AzureFunctions.ReqnRoll) are open source and contributions are accepted. If you encounter problems with them, please feel free to raise an Issue - and if you're able, submit a pull request. And if you have any questions or feedback, just ask!

Jonathan George

Software Engineer IV

Jonathan George

Jon is an experienced project lead and architect who has spent nearly 20 years delivering industry-leading solutions for clients across multiple industries including oil and gas, retail, financial services and healthcare. At endjin, he helps clients take advantage of the huge opportunities presented by cloud technologies to better understand and grow their businesses.