question

jvr1967 avatar image
jvr1967 asked Spirent_Admin edited

itestcli execution

I've just resolved an issue I had with itestcli. It appears that the issue was a result of itestcli returning before the test case completes.

I had two test cases that I was calling one after the other. The first test case records the output from some commands related to the operation of multicast on a Cisco router.

The 2nd test case is not really a test case - it's really an orchestration step as it removes some config from the router which results in multicast being disabled.

What is happening is that the first test case (record multicast stats) is invoked and it returns immediately i.e. the system call to invoke the itestcli returns and the next test case (remove multicast config) is invoked. The 2nd test case disables the multicast before the 1st one gets the chance to get all of the stats so some commands result in no output because the multicast is disabled.

I had assumed that the itestcli would not return until the testcase that it runs has completed.

Is there a parameter that I can add to force this behaviour ??

I have worked around this behaviour by introducing a delay but this is not ideal as a proper solution.

Any assistance appreciated.

iTestitestcli
10 |950

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

sreenath avatar image
sreenath answered sreenath posted

Could you please check whether execution time limit for the test case has been specified. If so, I believe the specified time limit is less when compared to actual time required to complete the execution.

 

Please increase the execution time limit for the first testcase to the sufficient value so that all the test case are executed.

 

If you are running the test case one after the other in iTestcli then you could either use -to or --timeout <value> option in itestcli.


execution.JPG (53.0 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.

dclaar avatar image
dclaar Suspended answered dclaar Suspended posted

I have not seen this behavior. In fact, our entire test structure would fail if this happened, because we call itestcli instead of exec.run in our master test script! Wondering if your system call is accidentally throwing it into the background?

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.