Skip to content

Catastrophic error deserializing item #1: System.ArgumentException: An item with the same key has already been added in Test runs triggered from VsTest Test run task in the release pipeline #192

@mythilimuthyala

Description

@mythilimuthyala

Problem:
After execution of xUnit tests in Azure release pipeline triggered from Devops Test plan, test runner reports error:
##[error]RunMessage : [xUnit.net 00:00:01.00] Tests.Integration: Catastrophic error deserializing item #1: System.ArgumentException: An item with the same key has already been added. Key: ff59767d14fb96ac4d731140b9960ea8e31f1c8e

Environment:
.Net version: netcoreapp2.2
xunit version: 2.4.1
xunit.runner.visualstudio version: 2.4.1

Steps to reproduce:

  1. Create test method with attributes [Theory] [MemberData(nameof(ArgumentsGenerator))]
    where ArgumentsGenerator is some method which generates arguments.

  2. Serialized MemberData arguments using IXunitSerializable so that all the tests show up for each theory instead of one in the Test Explorer

  3. Associated tests with test case from Devops Test Plan
    image

  4. Created a release pipeline with VsTest run task and a stage

  5. From Testplan, chose run with options, and chose appropriate build, pipeline and the stage and triggered the test run

image

  1. Only 1 test is being executed and all the remaining tests throws an exception "Catastrophic error deserializing item Support Visual Studio 2014 (CTP) #1: System.ArgumentException: An item with the same key has already been added"
    image

The issue is similar to this - https://developercommunity.visualstudio.com/content/problem/426873/azure-devops-test-hub-auto-run-catastrophic-error.html and was resolved as XUnit issue.

Any advises here please?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Won't FixThe issue is not planned to be fixed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions