Automatically populate .resoscript test fields and values
Closed this issue · 1 comments
- Pull metadata
- Locate first field of each different data type in metadata + ListingKey
- For each field located in #2 query with a filter like 'xxx ne null' to verify that at least one listing contains data
- For Enum-Multi's it may be necessary to paginate or spin through records until a viable match is located. I can't think of a better method to locate a listing with multiple values? Or in case of no viable match the test should be disregarded?
- If 0 results, go back to step #2 and locate the next field in the metadata for that data type
- Record value for the field (to populate our test values later)
At this point we should have a list such as this:
- ListingKey.field: ListingKey.value
- Int64.field: Int64.value (can be Int16 or Int32 instead)
- String.field: String.value
- String2.field: String2.value
- Date.field: Date.value
- DateTime.field: DateTime.value (DateTimeOffset is the official type?)
- EnumSingle.field: EnumSingle.value
- EnumMulti.field: EnumMulti.value1, EnumMulti.value2
- Latitude.field: Latitude.value, (Lat and Lon must come from same listing)
- Longitude.field: Longitude.value (Lat and Lon must come from same listing)
- OriginatingSystemName.field: OriginatingSystemName.value
Populate the following parameters. Note that I've only included the parameters that require a change. If a parameter is omitted from my last that signifies that I don't believe it needs a change from its current default state.
-
UniqueIDValue: ListingKey.value
-
FilterNumericField: Int64.field
-
FilterNumericValueLow: Int64.value - 1
-
FilterNumericValueHigh: Int64.value + 1
-
FilterNotField: Int64.field
-
FilterHasField: EnumSingle.field
-
FilterHasValue: EnumSingle.value
-
SingleValueLookupField: EnumSingle.field
-
SingleValueLookupValue: EnumSingle.value
-
MultipleValueLookupField: EnumMulti.field
-
MultipleValueLookupValue1: EnumMulti.value1
-
MultipleValueLookupValue2: EnumMulti.value2
-
GeospatialValue: Latitude.value Longitude.value
-
ContainsField: String.field
-
ContainsValue: substring of String.value
-
EndsWithField: String.field
-
EndsWithValue: trailing substring of String.value
-
StartsWithField: String.field
-
StartsWithValue: leading substring of String.value
-
ToLowerField: String.field
-
ToLowerValue: lowercase String.value
-
ToUpperField: String.field
-
ToUpperValue: uppercase String.value
-
DateField: Date.field
-
DateValue: Date.value
-
YearValue: year value of Date.value
-
MonthValue: month value of Date.value
-
DayValue: day value of Date.value
-
TimestampField: DateTime.field
-
DateTimeValue: DateTime.value
-
TimeValue: time value of DateTime.value
-
HourValue: hour value of DateTime.value
-
MinuteValue: minute value of DateTime.value
-
SecondValue: second value of DateTime.value
-
FractionalValue: fractional second value of DateTime.value
-
ValueField: Int64.field
-
CastField: Int64.field
-
CastFieldValue: Int64.value
-
ConcatFieldOne: String.field
-
ConcatFieldOneValue: String.value
-
ConcatFieldTwo: String2.field
-
ConcatFieldTwoValue: String2.value
-
ConcatFieldBothValue: String.value: String2.value
-
OriginatingSystemNameValue: OriginatingSystemName.value
-
SelectList: ListingKey.field, Int64.field, String.field, String2.field, Date.field, DateTime.field, EnumSingle.field, EnumMulti.field, Latitude.field, Longitude.field, OriginatingSystemName.field, PropertyType (PropertyType seems to be a requirement that's not used in any of the Parameters?)
Item has been placed on hold for now.