Skip to content

More tips about using Azure Test Plans with GitHub

Reading Time: 3 minutes

In this post I want to provide a couple more tips about using Azure Test Plans with GitHub deployments. Since I have been asked a couple of times about this since the SQLBits conference.

In reality, I did a post a while ago about using Azure Test Plans with GitHub deployments. Plus, I covered it briefly in another post that showed how to use Azure Test Plans for Data Platform deployments.

However, somebody reached out to me after SQLBits and told me they could not find much information about using Azure Test Plans with GitHub deployments online. With this in mind I thought I would provide some more tips.

By the end of this post, you will know some more tips about how to use Azure Test Plans with GitHub deployments. Plus, where you can find a GitHub repository that you can use as a template for CI/CD deployments for Azure Synapse Analytics serverless SQL Pools.

Setup a GitHub connection

To make the most out of using Azure Test Plans for GitHub deployments I strongly recommend that you setup a connection to your GitHub repository in Azure DevOps. You set this up in the Boards section within Project settings in Azure DevOps.

Setting up GitHub connection in Azure DevOps to use Azure Test Plans with GitHub
Setup GitHub connections

After doing this you can then add relevant links to your work items in Azure Boards. Including any bugs that you raise in Azure Test Plans.

For example, say I connect my Azure DevOps project to a GitHub repository that deployed to an Azure Synapse serverless SQL Pool. Like the GitHub-SynapseServerlessSQLPool that I have made public.

From there I can create a test plan in Azure Test Plans to check that the workflow I have created for use with GitHub Actions works as expected like in the below example.

Example of a created test plan in Azure Test Plans showing a GitHub deployment
Created test plan

If there was an issue, I could mark the workflow as failed and then click on Create issue since this Azure DevOps project is based on an Agile process. If it was based on a Scrum process it would tell me to create a bug instead.

Creating a new issue in Azure Test Plans
New issue window

In the ‘New issue’ window that appears I can than click on Add link to add a link to a commit that was done in my GitHub repository.

Adding a link from an issue created in Azure test Plans to a GitHub commit
Adding link to GitHub commit

Doing this allows you to easily keep track of which GitHub commit caused the test plan to fail.

Screenshots from GitHub

One thing that can help when testing deployments from GitHub is screenshots of completed workflows. Like I one shown above. Doing so increases the change that the completed workflow is checked properly.

Select correct test suite in Azure Test Plans

When setting up your test plans for GitHub deployments make sure you setup the correct test suite. There are three types of test suites that you can use. I cover them in detail in a post I wrote called ‘Azure Test Plans jargon for Data Platform professionals‘.

Final words about more tips if using Azure Test Plans with GitHub

I hope these additional tips about using Azure Test Plans with GitHub deployments helps some of you. Especially those of you who have found it hard to find more information about this online.

Of course, if you have any comments or queries about this post feel free to reach out to me.

Published inAzure DevOpsGitHub Actions

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *