Completed
Last Updated: 17 Mar 2014 16:27 by ADMIN
ADMIN
Iliyan Panchev
Created on: 14 Mar 2014 12:51
Type: Bug Report
0
Json serialization exception when trying to run a test from the artoftest.runner in cmd
Try to run a test from the internally attached project with artoftest.runner in command prompt.
The run fails with a json serialization exception.

A json exception stops the run:
Could not create an instance of type ArtOfTest.Common.SourceControl.IRepositoryInfo. Type is an inte
rface or abstract class and cannot be instantiated. Path 'SourceControlRepository.__type', line 1, p
osition 3941.
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateNewObject(JsonReader reader,
JsonObjectContract objectContract, JsonProperty containerMember, JsonProperty containerProperty, Str
ing id, Boolean& createdFromNonDefaultConstructor)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Typ
e objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, J
sonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader read
er, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerCont
ract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty prope
rty, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containe
rProperty, JsonReader reader, Object target)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, Js
onReader reader, JsonObjectContract contract, JsonProperty member, String id)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Populate(JsonReader reader, Object
target)
   at Newtonsoft.Json.Serialization.JsonSerializerProxy.PopulateInternal(JsonReader reader, Object t
arget)
   at ArtOfTest.Common.Serialization.JsonKnownTypeConverter.ReadJson(JsonReader reader, Type objectT
ype, Object existingValue, JsonSerializer serializer)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.DeserializeConvertable(JsonConverte
r converter, JsonReader reader, Type objectType, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type
 objectType, Boolean checkAdditionalContent)
   at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
   at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings
settings)
   at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings
)
   at ArtOfTest.Common.Design.SerializerService.DeserializeFromJSON[T](String serializedObject, Bool
ean autoLoadTypesFromAssemblies)
   at ArtOfTest.WebAii.Design.ProjectModel.Project.LoadSettings()
   at ArtOfTest.WebAii.Design.Execution.CommandLineRunner.SendTestToExecutionEngine(String testFullP
ath, Test test)
   at ArtOfTest.WebAii.Design.Execution.CommandLineRunner.ExecuteTest(String testFullPath)
   at ArtOfTest.Runner.Program.CommandLineExecution(String[] args)
Main(String[] args)
2 comments
ADMIN
Iliyan Panchev
Posted on: 17 Mar 2014 16:27
The fix will be part of the upcoming minor and major Test Studio releases.
ADMIN
Iliyan Panchev
Posted on: 14 Mar 2014 14:03
Actually the problem is that the project is not upgraded, but the Test Studio and the artoftest.runner build is newer. If you open the project in VS and open a test, then it will ask you to upgrade. Choose Yes and close it. Then the problem in the artoftest.runner should be gone.