How to import test runs from excel into Azure Dev Ops Project

Deborah Rowe 0 Reputation points
2025-10-08T12:47:00.95+00:00

Interested if it is possible to import test run data from an excel sheet into a Azure Dev Ops project?

We are migrating from another system and need to retain previous test run data.

Azure DevOps
0 comments No comments

2 answers

Sort by: Most helpful
  1. Pashikanti Kumar 1,725 Reputation points Microsoft External Staff Moderator
    2025-10-16T19:17:37.86+00:00

    Hi Deborah Rowe,

    Thank you for posting your question in the Microsoft Q&A forum

    Importing test runs (executions/results) from Excel into Azure DevOps Test Plans is not a direct out-of-the-box feature while you can bulk import test cases from Excel/CSV, test runs data like execution history and outcomes requires a custom process.

     

    Test Case Import:

    • You can natively import test cases from Excel or CSV using Azure DevOps Office Integration or via the built-in CSV import in Test Plans.

    Official Documentation

    __Bulk import or export of test cases - Azure Test Plans__​

    __Import work items from CSV__​

    Test Run Data (Results) Import:

    • There is no official UI method for importing historic test run data directly.
    • You must use a custom script leveraging the Azure DevOps REST API to create test runs and results programmatically.
    • Recommended process: Parse Excel using Python (or PowerShell) for test run data. Map fields to Azure DevOps Test Plan/Test Run/Test Result API endpoints. Use a Personal Access Token (PAT) for authentication.

    Key Points

    There are migration scripts on GitHub and community forums for similar needs.

    I hope the provided answer is helpful,

    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.

    Thanks

    Was this answer helpful?

    0 comments No comments

  2. Jose Benjamin Solis Nolasco 11,301 Reputation points Volunteer Moderator
    2025-10-08T13:30:42.1+00:00

    Hello @Deborah Rowe I hope you are doing well,

    Take a look : https://www.youtube.com/watch?v=FWWqJrsFjWU this video will help you a lot

    The Azure DevOps REST API is the most powerful and flexible method for migrating complex data like test runs.

    • Process: You would need to write a custom script (e.g., in Python or PowerShell) to read your data from the Excel sheet, map the fields, and then call the relevant Azure DevOps API endpoints to create the historical records.
    • Key Steps:
      1. Migrate Test Cases First: Ensure all the corresponding Test Case work items are created in Azure DevOps first (using CSV import, Excel integration, or the Test Case API). You will need their new Azure DevOps IDs.
      2. Authenticate: Obtain a Personal Access Token (PAT) for authentication.
      3. Map Data: Create a mapping between your Excel data (Test Case ID, Tester, Run Date, Outcome) and the data model required by the Test Run and Test Result APIs.
      4. Create Test Runs: Use the Test Run and Test Result REST APIs to programmatically create the historical test runs and results, linking them to the newly created Test Case IDs.

    😊 If my answer helped you resolve your issue, please consider marking it as the correct answer. This helps others in the community find solutions more easily. Thanks!

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.