To simplify integration to other 3rd party systems, we introduce WATS Standard JSON Format (WSJF).
You can GET WSJF files directly from the server using the REST API.
You can POST WSJF files directly to the server using the REST API. For more information, see https://virinco.zendesk.com/hc/en-us/articles/360014879119
When you install the WATS Client, a folder named “WatsStandardJsonFormat” is created at C:\ProgramData\Virinco\WATS. If a file using the WSJF Format is saved to the directory, the WATS Client will automatically read and import the file into WATS.
WSJF supports two report types: Test report (UUT), and Repair report (UUR).
See example files at the bottom of this article.
Documentation
The following is a description of what properties are used in this format.
report
The root object is the report object.
Properties |
Data type |
Required |
id |
Guid |
Yes |
location |
String (100) |
Yes |
machineName |
String (100) |
Yes |
pn |
String (100) |
Yes |
purpose |
String (100) |
Yes |
result |
Character (P, F, E, T) |
Yes |
rev |
String (100) |
Yes |
sn |
String (100) |
Yes |
start |
DateTime |
Yes |
startUTC |
DateTime |
Yes |
type |
Character (T, R) |
Yes |
processName |
String |
No |
processCode |
Number |
Yes |
processCodeFormat |
String |
No |
root |
step object, only if type is T |
If type is T, yes |
uut |
uut object, only if type is T |
If type is T, yes |
uur |
uur object, only if type is R |
If type is R, yes |
miscInfos |
Array of miscInfo |
No |
subUnits |
Array of subUnit |
If type is R, yes |
assets |
Array of assets |
No |
assetStats |
Array of assetStats |
Output Only |
binaryData |
Array of binaryData, only if type is R |
No |
origin |
String |
Output only |
productName |
String |
Output only |
Validation Rules
- processCode and processName are required to be valid values.
miscInfo
Properties |
Data type |
Required |
description |
String |
Yes |
numeric |
Number |
If no text, yes |
numericFormat |
String |
No |
text |
String (100) |
If no numeric, yes |
typedef |
String (30) |
No |
Validation Rules
- If type is R, description is required to be a valid value.
subUnit
Properties |
Data type |
Required |
partType |
String (50) |
Yes |
sn |
String (100) |
Yes |
pn |
String (100) |
Yes |
rev |
String (100) |
No |
idx |
Number, only if type is R |
If type is R, yes |
parentIdx |
Number, only if type is R |
No |
position |
Number, only if type is R |
No |
replacedIdx |
Number, only if type is R |
No |
failures |
Array of failure, only if type is R |
If type is R, yes |
Validation rules
- When type is R, one subUnit is required to have idx = 0, it is required to have pn, sn, and rev equal to report, and it cannot have parentIdx.
- idx is required to be unique.
- parentIdx cannot be the same as idx.
- parentIdx must refer to an idx.
- replacedIdx cannot be the same as idx or parentIdx.
- replacedIdx must refer to an idx.
asset
Properties |
Data type |
Required |
assetSN |
String (100) |
Yes |
usageCount |
Number |
Yes |
usageCountFormat |
String |
No |
assetStats
Properties |
Data type |
Required |
assetSN |
String (100) |
Output only |
runningCount |
Number |
Output only |
runningCountExceeded |
Number |
Output only |
totalCount |
Number |
Output only |
totalCountExceeded |
Number |
Output only |
daysSinceCalibration |
Number |
Output only |
calibrationDaysOverdue |
Number |
Output only |
daysSinceMaintenance |
Number |
Output only |
maintenanceDaysOverdue |
Number |
Output only |
message |
String |
Output only |
uut
Properties |
Data type |
Required |
batchFailCount |
Number |
No |
batchFailCountFormat |
String |
No |
batchLoopIndex |
Number |
No |
batchLoopIndexFormat |
String |
No |
batchSN |
String (100) |
No |
comment |
String (5000) |
No |
errorCode |
Number |
No |
errorCodeFormat |
String |
No |
errorMessage |
String |
No |
execTime |
Number |
No |
execTimeFormat |
String |
No |
fixtureId |
String (100) |
No |
stepIdCausedUUTFailure |
Number |
Output only |
testSocketIndex |
Number |
No |
testSocketIndexFormat |
String |
No |
user |
String (100) |
Yes |
step
Properties |
Data type |
Required |
group |
Character (S, M, C) |
Yes |
name |
String (100) |
Yes |
status |
Character (P, F, E, T, S) |
Yes |
stepType |
String |
Yes |
id |
Number |
If on one step, required for all |
interactiveExeNum |
Number |
No |
interactiveExeNumFormat |
String |
No |
reportText |
String |
No |
start |
DateTime |
No |
causedSeqFailure |
Bool |
No |
causedUUTFailure |
Bool |
No |
errorCode |
Number |
No |
errorCodeFormat |
String |
No |
errorMessage |
String |
No |
totTime |
Number |
No |
totTimeFormat |
String |
No |
tsGuid |
String (30) |
No |
seqCall |
seqCall object |
No |
numericMeas |
Array of numericMeas |
No |
stringMeas |
Array of stringMeas |
No |
booleanMeas |
Array of booleanMeas |
No |
chart |
chart object |
No |
attachment |
attachment object |
No |
loop |
loopInfo object |
No |
steps |
step object |
No |
callExe |
callExe object |
No |
messagePopup |
messagePopup object |
No |
Validation Rules
- The first step's status is required to match report status and have a seqCall.
- id is required to be unique.
- At least one of seqCall, numericMeas, stringMeas, booleanMeas, chart, attachment or additionalResults is required.
- Can only have one of seqCall, numericMeas, stringMeas, or booleanMeas.
- step can only have value if seqCall also has value, and at least one step is required if seqCall has value.
- Can only have one of chart or attachment.
- If one numericMeas, stringMeas, or booleanMeas; status and numericMeas, stringMeas, or booleanMeas status is required to match.
- If multiple numericMeas, stringMeas, or booleanMeas; status cannot be F unless at least one of the numericMeas, stringMeas, or booleanMeas have status F.
- If multiple numericMeas, stringMeas, or booleanMeas, status cannot be P unless none of the numericMeas, stringMeas, or booleanMeas have status F.
- numericMeas, stringMeas, or booleanMeas name is required be unique within a step.
- step name within a step is required to be unique.
- If status is S (Skipped), numericMeas, stringMeas, booleanMeas, callExe, messagePopup, chart, attachment, additionalResults and steps will be ignored. This provides better analysis of skipped steps.
- stepType is the icon displayed in WATS. Possible values: SequenceCall, NumericLimitTest, ET_NLT, ET_MNLT, StringValueTest, ET_SVT, ET_MSVT, PassFailTest, ET_PFT, ET_MPFT, Action, ET_A, Label, CallExecutable, MessagePopup.
seqCall
Properties |
Data type |
Required |
path |
String (500) |
Yes |
name |
String (200) |
Yes |
version |
String (30) |
Yes |
numericMeas
numericMeas is a measurement, where the measurement is a number.
Properties |
Data type |
Required |
compOp |
Enum (LOG, EQ, NE, LT, LE, GT, GE, LTGT, LTGE, LEGT, LEGE, GTLT, GTLE, GELT, GELE) |
Yes |
highLimit |
Number |
If compOp is dual limit, yes |
highLimitFormat |
String |
No |
lowLimit |
Number |
If compOp is single or dual limit, yes |
lowLimitFormat |
String |
No |
name |
String (100) |
If multiple numericMeas, yes |
value |
Number |
Yes |
valueFormat |
String |
No |
status |
Character (P, F, S) |
Yes |
unit |
String (20) |
Yes |
Validation Rules
- LOG is a none limit compOp; when used, lowLimit and highLimit are not supported.
- EQ, NE, LT, LE, GT, and GE are single limit compOp; when used, lowLimit is required and highLimit is not supported.
- LTGT, LTGE, LEGT, LEGE, GTLT, GTLE, GELT, GELE are dual limit compOp; when used, lowLimit and highLimit are required. lowLimit and highLimit are misnamed, think of them as limit1 and limit2 respectively.
stringMeas
stringMeas is a measurement, where the measurement is text.
Properties |
Data type |
Required |
compOp |
Enum (LOG, EQ, NE, CASESENSIT, IGNORECASE) |
Yes |
limit |
String (100) |
If compOp is single limit, yes |
value |
String (100) |
Yes |
name |
String (100) |
If multiple stringMeas, yes |
status |
Character (P, F, S) |
Yes |
Validation Rules
- LOG is a none limit compOp; when used,limit is not supported.
- EQ, NE, CASESENSIT, and IGNORECASE are single limit compOp; when used, limit is required.
booleanMeas
booleanMeas is a measurement, where the measurement is true or false.
Properties |
Data type |
Required |
name |
String (100) |
If multiple booleanMeas, yes |
status |
Character (P, F, S) |
Yes |
chart
Properties |
Data type |
Required |
chartType |
Enum (Line, LineLogXY, LineLogX, LineLogY) |
Yes |
label |
String (100) |
Yes |
xLabel |
String (50) |
Yes |
xUnit |
String (20) |
Yes |
yLabel |
String (50) |
Yes |
yUnit |
String (20) |
Yes |
series |
Array of series |
Yes |
Validation Rules
- Cannot have more than 10 series.
- Cannot have more than 10000 data points total.
series
Properties |
Data type |
Required |
dataType |
Enum (XYG) |
Yes |
name |
String (100) |
Yes |
xdata |
String |
No |
ydata |
String |
Yes |
Validation Rules
- The text in xdata and ydata is a semicolon separated list of numbers.
attachment
Properties |
Data type |
Required |
contentType |
MIME type (string) (100) |
Yes |
name |
String (100) |
Yes |
data |
Base64 encoded string |
Yes |
loopInfo
Properties |
Data type |
Required |
idx |
Number |
If step is an index in a loop, yes |
endingIndex |
Number |
If step is a summary step, yes |
num |
Number |
If step is a summary step, yes |
passed |
Number |
If step is a summary step, yes |
failed |
Number |
If step is a summary step, yes |
Validation Rules
- Steps that are part of the same loop is required to have the same name.
- One step in a loop is required to be a summary step.
- endingIndex in summary step is required to be the same as the index in the last index step.
- passed in a summary step is required to match the number of index steps with status passed.
- failed in a summary step is required to match the number of index steps with status failed.
- num is required to match the number of index steps.
- index in an index step is required to be unique within a loop.
- A seqCall. numericMeas, stringMeas, booleanMeas, or step within an index step is required to have a matching seqCall. numericMeas, stringMeas, booleanMeas, or step, respectively, in the summary step.
- A seqCall. numericMeas, stringMeas, booleanMeas, or step within a summary step is required to have a matching seqCall. numericMeas, stringMeas, booleanMeas, or step, respectively, in each index dtep.
- The last index step is required to have matching statuses and measurement values as well.
callExe
Properties |
Data type |
Required |
exitCode |
Number |
Yes |
exitCodeFormat |
String |
No |
messagePopup
Properties |
Data type |
Required |
button |
Number |
Yes |
buttonFormat |
String |
No |
response |
String (200) |
Yes |
uur
Properties |
Data type |
Required |
active |
Bool |
Yes |
confirmDate |
DateTime |
Yes |
execTime |
Number |
Yes |
execTimeFormat |
String |
No |
finalizeDate |
DateTime |
Yes |
parent |
GUID |
No |
refUUT |
GUID |
Yes |
user |
String (100) |
Yes |
comment |
String (5000) |
No |
processName |
String |
No |
processCode |
Number |
Yes |
processCodeFormat |
String |
No |
failures
Properties |
Data type |
Required |
artNumber |
String (100) |
No |
artVendor |
String (500) |
No |
artRevision |
String (100) |
No |
artDescription |
String (500) |
No |
category |
String |
Yes |
code |
String |
Yes |
compRef |
String (50) |
Yes |
functionBlock |
String (100) |
No |
comment |
String |
No |
refStepId |
Number |
No |
attachments |
Array of binaryData |
No |
Validation Rules
- category and code are required to be valid values.
binaryData
Properties |
Data type |
Required |
contentType |
MIME type (string) (100) |
Yes |
name |
String |
Yes |
data |
Base64 encoded string |
Yes |
Examples
Comments
10 comments
Does the step status also include "D" for done? Character (P, F, E, T, S, D) ?
Is there a difference between step types like (NumericLimitTest, ET_NLT), (StringValueTest, ET_SVT) or (PassFailTest, ET_PFT) or are they two names for the same thing?
Is there a list of all step types? the list doesn't include "AdditionalResults", "Statement" or "GenericStep"
for string evaluation, is there a difference between EQ and CASESENSIT? aren't these the same?
We want to stop using Done and instead use Passed, so no.
stepType decides which icon the step will have in WATS, and isn't used for anything else. The values listed are the ones WATS recognizes. With other values WATS will guess which icon it should be. There is no difference between these icons: NumericLimitTest and ET_NLT, StringValueTest and ET_SVT, PassFailTest and ET_PFT.
You can have NumericLimitTest stepType on a step with string value measurements, but the step will have the wrong icon. If the step does not have measurements, Action is probably a good choice.
EQ and CASESENSIT are the same for string value measurements. Do note that the POST WJSF rest API does not compare your value against your limit to check you have the right status. Use the one that makes sense when you are reading the report later.
Thanks. really appreciate the response.
What does the ET in ET_NLT stand for? evaluation test?
ET_NLT was what we named our custom version of the numeric limit test step in TestStand. ET is an abbreviation for the customer that we originally made the TestStand integration for, which eventually became the WATS Client TestStand add-on.
So it essentially stands for nothing.
Hi,
On page 4 of the documentation, in the report header description, sub-units are named "subunits" instead of "subUnits". Since the converter seems to be case-sensitive, all reported sub-units are silently discarded on upload if one copies the string from the doc.
Hi Zawadi,
Thanks for bringing this to our attention. The WSJF converter is indeed case-sensitive and will ignore subunits and include subUnits.
The PDF linked in this article says subUnits, but the article says subunits. I will correct that so they both say subUnits.
What is the best/easiest way to verify a WSJF file? I'm developing a new client that would send data directly to the API and don't want to interfere with the production system/data.
Hi Tamas,
you can use a dedicated test operation, such as "SW Debug" to separate your tests from production. You can also change the part-numbers when testing to achieve this, or if you are on an Enterprise account we offer a separate sandbox server for testing.
Please sign in to leave a comment.