Setting up Monotonic Serial Number generation
Hello,
I am trying to set up serial numbers. I found the setting in Project -->Settings--> Monotonic Setting and filled out the fields but when I generate a new report from a test the serial number field still shows "(unknown)". Are there any more steps I need to take?
Also, I was uncertain what effect the "length" field has in the Monotonic Settings. Can you explain that further?
Thanks,
Malcolm
-
Official comment
serial_number is a mandatory field for the response payload for this command, and assigned to the built-in %SERIAL_NUMBER% key.
- steps:
- command: serial request
- command: operator "%SERIAL_NUMBER%"Additional keys can be specified for extraction from an optional "extra" object in the response payload.
{
"serial_number": "SN0013",
"extra": {
"my_group_id": "MFG"
}
}With this YAML fragment:
- steps:
- command: serial request GROUP:my_group_id
- command: operator "%GROUP% %SERIAL_NUMBER%"Comment actions -
Malcolm Knapp could you please post what code you used to get the monotonic serial number? I'm trying to pull it from my project with the following but I'm having trouble dereferencing the KEY I use to get the serial_number.
steps:- command: serial request NUM:serial_number- command: operator %NUM%Num just shows up as "%NUM%" -
Thanks for the update. I don't see a list in the documentation for "built in keys" is there a link for those? The only docs on serial number I could find was from the webhook https://docs.pltcloud.com/TestPlanReference/command/serial/
Please sign in to leave a comment.
Comments
5 comments