Skip to main content
Back to blog

Azure DevOps and GitHub Integration for QA Engineers

How to integrate Azure DevOps with GitHub for QA workflows. Covers linking GitHub repos to Azure Boards, running Azure Pipelines on GitHub code, syncing pull requests with work items, and cross-platform test result publishing.

InnovateBits4 min read
Share

Many teams use GitHub for source code and Azure DevOps for work item tracking and test management. The integration between the two platforms is first-class — commits link to work items, pipelines run on GitHub code, and pull requests sync with Azure Boards.


Connecting GitHub to Azure DevOps

Method 1: GitHub connection for Azure Boards

  1. Go to Project Settings → GitHub connections
  2. Click Connect your GitHub account
  3. Authorise the Azure Boards GitHub App
  4. Select your GitHub organisation and repositories

This enables:

  • Mentioning AB#123 in GitHub commits/PRs to link work items
  • Seeing Azure Boards work item status on GitHub PRs

Method 2: Azure Pipelines on GitHub repos

  1. Go to Pipelines → + New pipeline
  2. Select GitHub as the source
  3. Authorise Azure Pipelines GitHub App
  4. Select your repository
  5. Configure the YAML pipeline

Azure Pipelines can run on any GitHub repository, even from a different organisation than your Azure DevOps project.


Linking GitHub commits to Azure Boards

Once connected, use AB#[work-item-ID] in commit messages and PR titles:

git commit -m "Fix checkout discount validation AB#312"
git commit -m "Add wishlist 50-item limit test AB#318 AB#319"

The work item (#312) now shows the commit in its Development section. The commit link is permanent and clickable.

In GitHub PRs, add to the description:

This PR implements the wishlist feature.
Closes AB#312

When the PR is merged, AB#312 transitions to the next state automatically (if configured).


Running tests in Azure Pipelines from GitHub

# azure-pipelines.yml in GitHub repo
trigger:
  branches:
    include:
      - main
      - feature/*
 
pr:
  branches:
    include:
      - main
 
pool:
  vmImage: ubuntu-latest
 
steps:
  - task: NodeTool@0
    inputs:
      versionSpec: '20.x'
 
  - script: npm ci
 
  - script: npx playwright test
    env:
      BASE_URL: $(STAGING_URL)    # Set in Azure DevOps pipeline variables
 
  - task: PublishTestResults@2
    inputs:
      testResultsFormat: JUnit
      testResultsFiles: test-results/results.xml
      testRunTitle: Playwright — $(Build.BuildNumber)
    condition: always()

Azure DevOps variables (including secrets from variable groups) are available to pipelines running on GitHub repos.


PR status checks from Azure Pipelines

Configure branch protection in GitHub to require Azure Pipeline status checks:

  1. In GitHub: Repo Settings → Branches → Branch protection rules → main
  2. Enable: Require status checks to pass before merging
  3. Search for and add your Azure Pipeline's status check

PRs to main now can't be merged until the Azure Pipeline passes.


Syncing test results between platforms

For teams tracking test cases in Azure Test Plans but code in GitHub:

# Publish results AND link to Azure Test Plans test run
- task: PublishTestResults@2
  inputs:
    testResultsFormat: JUnit
    testResultsFiles: test-results/results.xml
    testRunTitle: 'Sprint 9 E2E — $(Build.BuildNumber)'
    testPlanId: '12345'   # Azure Test Plans plan ID
    testSuiteId: '67890'  # Azure Test Plans suite ID
  condition: always()

Results appear in both the pipeline's Tests tab and the Azure Test Plans run history.


Common errors and fixes

Error: AB#123 mention in GitHub commit doesn't link to Azure Boards Fix: The GitHub connection must be established first. Also, the user making the commit must be the same user in both GitHub and Azure DevOps (or the account mapping configured). Check Project Settings → GitHub connections → Configure.

Error: Azure Pipeline on GitHub repo can't access variable groups Fix: In Pipelines → Library → [Variable group] → Pipeline permissions, authorise the specific pipeline or all pipelines. GitHub-connected pipelines need explicit authorisation.

Error: PR status check shows "pending" and never updates Fix: The pipeline must have a pr: trigger section targeting the correct branch. Check that the pipeline is enabled and the GitHub connection is healthy in Project Settings → GitHub connections.

Error: PublishTestResults task shows 0 results when running on GitHub repo Fix: The test result XML file path must be relative to the checkout directory. Use $(System.DefaultWorkingDirectory)/test-results/results.xml for absolute paths.

Free newsletter

Stay ahead in AI-driven QA

Get practical tutorials on test automation, AI testing, and quality engineering — straight to your inbox. No spam, unsubscribe any time.

Discussion

Sign in with GitHub to comment · powered by Giscus