Completed
Last Updated: 29 Oct 2013 15:01 by ADMIN
ADMIN
Velin Koychev
Created on: 08 Oct 2013 12:01
Type: Bug Report
0
The test cannot be open after edit
1) Use Run - To Here

2) Record new steps

3) Try to open again the test - the test does not open and nothing happens. In the log file there is the following exception:

Telerik.TestStudio.exe(9412:1),ProjectModel] TestFileHandler.LoadFromDisk() : EXCEPTION! (see below)
     Situation: Unable to load test 'C:\Users\koychev\Desktop\3.10.2013\uitesting - Copy\ATP\ATP - Add and approve CK - override apply, fees, and colcred.tstest'
     Outer Exception Type: Newtonsoft.Json.JsonSerializationException
     Message: Error setting value to 'Comparison' on 'ArtOfTest.WebAii.Design.IntrinsicTranslators.Silverlight.Descriptors.GeneralPropertyVerificationDescriptor'.
     HRESULT: 0x80131500 (Official ID (if app.) = COR_E_EXCEPTION, Error Bit = FAILED, Facility = FACILITY_URT, Code = 5376)
     Call Stack:
          at Newtonsoft.Json.Serialization.DynamicValueProvider.SetValue(Object target, Object value)
          at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target)
          at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader 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 target)
          at ArtOfTest.Common.Serialization.JsonKnownTypeConverter.ReadJson(JsonReader reader, Type objectType, Object existingValue, JsonSerializer serializer)
          at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.DeserializeConvertable(JsonConverter converter, JsonReader reader, Type objectType, Object existingValue)
          at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target)
          at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader 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 target)
          at ArtOfTest.Common.Serialization.JsonKnownTypeConverter.ReadJson(JsonReader reader, Type objectType, Object existingValue, JsonSerializer serializer)
          at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.DeserializeConvertable(JsonConverter converter, JsonReader reader, Type objectType, Object existingValue)
          at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateList(IList list, JsonReader reader, JsonArrayContract contract, JsonProperty containerProperty, String id)
          at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Populate(JsonReader reader, Object target)
          at Newtonsoft.Json.Serialization.JsonSerializerProxy.PopulateInternal(JsonReader reader, Object target)
          at ArtOfTest.Common.Serialization.JsonKnownTypeConverter.ReadJson(JsonReader reader, Type objectType, Object existingValue, JsonSerializer serializer)
          at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.DeserializeConvertable(JsonConverter converter, JsonReader reader, Type objectType, Object existingValue)
          at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target)
          at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader 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 target)
          at ArtOfTest.Common.Serialization.JsonKnownTypeConverter.ReadJson(JsonReader reader, Type objectType, Object existingValue, JsonSerializer serializer)
          at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.DeserializeConvertable(JsonConverter 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, Boolean autoLoadTypesFromAssemblies)
          at ArtOfTest.WebAii.Design.ProjectModel.TestFileHandler.LoadFromJSON(String rawFileText, Boolean autoLoadTypes)
          at ArtOfTest.WebAii.Design.ProjectModel.TestFileHandler.LoadFromDisk(String pathToFile, Boolean autoLoadTypes, FileOpenResult& result)

     Inner Exception Type: System.ArgumentException
     Message: Value does not fall within the expected range.
     HRESULT: 0x80070057 (Official ID (if app.) = E_INVALIDARG, Error Bit = FAILED, Facility = FACILITY_WIN32, Code = ERROR_INVALID_PARAMETER)
     Call Stack:
          at ArtOfTest.WebAii.Design.IntrinsicTranslators.Silverlight.Descriptors.PropertyVerificationDescriptor.set_Comparison(String value)
          at SetComparison(Object , Object )
          at Newtonsoft.Json.Serialization.DynamicValueProvider.SetValue(Object target, Object value)

The sample test project is attached in the internal description.
Attached Files:
2 comments
ADMIN
Shtilianov
Posted on: 21 Oct 2013 13:49
Hi we were able to find the underlying problem. A better fix will be available with the next release where this problem will not be reproducible and comparison types like "Same", "Starts with" and others will be available. In the meantime there are three valid workarounds you can try (during recording). You can add the verification steps from the quick task verification list or you can open the verification builder and choose the "textblock" instead of choosing a specific property (property .text in our case). Basically when you have to add verification step like "Verify TransactionDetail_Display_CollectorCredit.Text 'StartsWith' '%DEFAULTTEAM / '" or something else that has to verify the text content of a textfield in silverlight you have to add the step either from quick tasks, using the step builder directly from the elements explorer (you go the element in the elements explorer, press the "step suggestion" button which is the represented with a "ladder" icon) or you can open the verification builder and there choose the textblock verification as seen in the screenshot.
ADMIN
Shtilianov
Posted on: 17 Oct 2013 08:04
Problem is fixed and it will not happen again. The problem was that certain verification steps were recorded wrong by test studio using a comparison type that does not exist. In our case we have checkbox step that was recorded by test studio with comparison type "starts with" or "same" while the only valid comparison types here are "Equal" and "Not Equal".
Having in mind that this will not happen in the future the question remains on how to fix the tests that are broken at the moment.
You have to open ATP - Add and approve CK - override apply, fees, and colcred.tstest in any text editor (notepad, wordpad, etc.) search in the file for "GeneralPropertyVerificationDescriptor" in that exact test case you'll find two instances of GeneralPropertyVerificationDescriptor where the first one is "ArtOfTest.WebAii.Design.IntrinsicTranslators.Silverlight.Descriptors.GeneralPropertyVerificationDescriptor","__value":{"Comparison":"SAME","Value":"CTEAMS / spanish" and the second one is ""ArtOfTest.WebAii.Design.IntrinsicTranslators.Silverlight.Descriptors.GeneralPropertyVerificationDescriptor","__value":{"Comparison":"STARTSWITH","Value":"%DEFAULTTEAM"
So in order to fix the test you have to change the comparison type in both places to "Equal" so both statements to look like .GeneralPropertyVerificationDescriptor","__value":{"Comparison":"Equal","Value":"CTEAMS / spanish" and .GeneralPropertyVerificationDescriptor","__value":{"Comparison":"Equal","Value":"%DEFAULTTEAM"

You can also send us the broken tests if you still have problems and we'll fix them for you.