Skip to main content

Azure Test Plans


1 - Overview

Azure Test Plans provides tools for managing manual and automated tests.


2 - Test hierarchy

2.1 Structure

Test Plan (Release 1.0)
├── Test Suite: Login
│ ├── Test Case: Login with valid credentials
│ ├── Test Case: Login with invalid password
│ └── Test Case: Password reset
├── Test Suite: Dashboard
│ ├── Test Case: Display widgets
│ └── Test Case: Export data
└── Test Suite: Regression
└── (Inherited test cases)

2.2 Test Suite types

TypeDescription
StaticTests added manually
Requirement-basedLinked to User Stories
Query-basedBased on a query

3 - Test Cases

3.1 Create a Test Case

# Via CLI
az boards work-item create \
--type "Test Case" \
--title "Verify login with valid credentials" \
--description "Test that users can login with correct email/password"

3.2 Structure of a Test Case

FieldDescription
TitleTest name
StepsSteps to execute
Expected ResultsExpected results
PriorityPriority (1-4)
StateDesign, Ready, Closed
Assigned ToAssigned tester

3.3 Example steps

StepActionExpected Result
1Navigate to login pageLogin form is displayed
2Enter valid emailEmail is accepted
3Enter valid passwordPassword is masked
4Click Login buttonUser is redirected to dashboard

4 - Test Plans

4.1 Create a Test Plan

  1. Go to Test Plans
  2. Click "New Test Plan"
  3. Set the name and iteration

4.2 Configuration

ParameterDescription
Area PathProject area
IterationTarget sprint
Build/ReleaseAssociated pipeline
ConfigurationTest configurations

5 - Test execution

5.1 Test Runner

Azure DevOps provides a web Test Runner to:

  • Run manual tests
  • Capture screenshots
  • Record videos
  • Create bugs directly

5.2 Test states

StateDescription
PassedTest succeeded
FailedTest failed
BlockedTest blocked (external issue)
Not ApplicableTest not applicable
PausedTest paused

5.3 Create a bug from a test

When a test fails:

  1. Click "Create bug"
  2. The bug automatically includes:
    • Test steps
    • Screenshots
    • System info
    • Link to the test case

6 - Automated tests

6.1 Associate automated tests

# azure-pipelines.yml
steps:
- task: VSTest@2
inputs:
testSelector: 'testAssemblies'
testAssemblyVer2: |
**\*test*.dll
!**\*TestAdapter.dll
searchFolder: '$(System.DefaultWorkingDirectory)'
testPlan: 12345
testSuite: 67890
testConfiguration: 111

6.2 Publish the results

steps:
- script: npm test -- --reporter=junit
displayName: 'Run tests'
continueOnError: true

- task: PublishTestResults@2
inputs:
testResultsFormat: 'JUnit'
testResultsFiles: '**/TEST-*.xml'
testRunTitle: 'Unit Tests'
failTaskOnFailedTests: true

6.3 Code coverage

steps:
- script: npm test -- --coverage
displayName: 'Run tests with coverage'

- task: PublishCodeCoverageResults@1
inputs:
codeCoverageTool: 'Cobertura'
summaryFileLocation: '$(System.DefaultWorkingDirectory)/coverage/cobertura-coverage.xml'
reportDirectory: '$(System.DefaultWorkingDirectory)/coverage'

7 - Test configurations

7.1 Create configurations

Test on different configurations:

ConfigurationBrowserOS
Chrome-WindowsChromeWindows 10
Firefox-WindowsFirefoxWindows 10
Safari-macOSSafarimacOS
Chrome-MobileChromeAndroid

7.2 Assign configurations

Each test case can be assigned to multiple configurations to test the combinations.


8 - Reports and metrics

8.1 Progress Report

  • Passed vs failed tests
  • Progress per suite
  • Trends

8.2 Test Results Trend

# Widget dashboard
- Test pass rate over time
- Test duration trends
- Flaky test detection

8.3 Traceability

Link tests to requirements to:

  • See the coverage of requirements
  • Identify untested requirements
  • Trace bugs back to requirements

9 - Exploratory Testing

9.1 Test & Feedback extension

Install the browser extension to:

  • Perform exploratory tests
  • Capture bugs
  • Take annotated screenshots
  • Record the screen

9.2 Workflow

  1. Install the extension
  2. Connect to Azure DevOps
  3. Start an exploratory session
  4. Capture the issues found
  5. Create the work items

Summary

In this chapter, we learned:

  • The hierarchy of tests (Plans, Suites, Cases)
  • Creating Test Cases
  • The execution of manual tests
  • The integration of automated tests
  • Test configurations
  • Reports and traceability
  • Exploratory tests

Next step

In the next chapter, we will look at Security and Permissions.

→ Next chapter: Security and Permissions


← Back to the table of contents