You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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
Create test method with attributes [Theory] [MemberData(nameof(ArgumentsGenerator))]
where ArgumentsGenerator is some method which generates arguments.
Serialized MemberData arguments using IXunitSerializable so that all the tests show up for each theory instead of one in the Test Explorer
Associated tests with test case from Devops Test Plan
Created a release pipeline with VsTest run task and a stage
From Testplan, chose run with options, and chose appropriate build, pipeline and the stage and triggered the test run
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"