question

lnelms avatar image
lnelms asked lnelms commented

How to pass reservation ID in a test case

I want to create a test case in iTest that will run as part of tear down for each reservation in Velocity. This test needs to pass the reservation ID as one of the parameters to a Twisted server. When I launch just a simple iTest script just for the purpose of seeing if the reservation ID is present when I specify the velocity topology, I do not see it. I was just checking if its on the stack somewhere but its not there. Please see the screenshot where I show my stack and params and you can see the tbml with the headers and body but no reservation ID. Is there a way to get this reservation ID?

iTestvelocityreservation id
itest-params.jpg (307.4 KiB)
10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

cwhitty avatar image
cwhitty answered lnelms commented

There are 3 handy velocity commands that you can run in iTest:

  • [velocity reservationId]
  • [velocity url]
  • [velocity token]

When a startup task, mid-reservation automation task, or teardown task executes, Velocity passes the reservation ID, the user authentication token, and Velocity's URL to the agent. These commands extract that information to be used in your task.


1 comment
10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

lnelms avatar image lnelms commented ·

This is perfect and exactly what I needed. Thank you

0 Likes 0 ·
akiraahs avatar image
akiraahs answered

You can check the details of a reservation using:

velocity findReservations [-name <reservation_name>] [-status <status>] [-owner <owner>] [-startTime <startTime>] [-endTime <endTime>]

This returns the reservation list for a reservation name of a particular status for a given time slot. You can also get a list of all reservations irrespective of any specifications by using the command alone.

You can see a list of the commands that allow getting/setting Velocity settings, resources, reservations etc in the User Guide (Page 507) of iTest 5.4.

http://docid.spirent.com/DOC10779

10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.