question

mandonov avatar image
mandonov asked Spirent_Admin edited

access to "raw" Avalanche API commands in Avalanche session profile - eval command?

 

Hi, 
The Spirent TestCenter session profile allows API commands to be executed directly in the session, like this:
command   |          stc::config $StreamBlock(1) -FixedFrameLength $packet_size

 

Hi, 


The Spirent TestCenter session profile allows API commands to be executed directly in the session, like this:

command--------------------stc::config $StreamBlock(1) -FixedFrameLength $packet_size

 

I need the same kind of access to the Avalanche API, while using the Avalanche session profile. 

I tried the eval command, but got an error that it is not supported for the Avalanche session.

 

Is there a way to accomplish this? That would be extremely useful and powerful.

 

Thanks,

Milen

iTestAvalanchetraffic generationsession profile
10 |950

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

1 Answer

·
KumarS avatar image
KumarS answered KumarS posted

Avalanche session simply takes an Avalanche configuration file which describes the test and runs it. There is no way to do anything else while the test is running. The test itself is run by simply creating a tcl shell and telling it to run the test.

 

This application can definitely be improved in the fashion you suggest. Have you played with the "parameter" configuration for Avalanche? Does this stuff you are trying to change not covered by one of the parameters?

9 comments
10 |950

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

mandonov avatar image mandonov commented ·

I need access to some test status information during execution that cannot be accomplished with the setParameter command, unfortunately. 

Actually I need to execute the GetTestStage API function in order to trigger an external process when Avalanche has reached a certain stage.

 

If I had access to the namespace in which the test is executed, I could call the GetTestStage function in a parallel thread. But I suppose I don't have such access in the Avalanche session (unlike the Spirent TestCenter session)?..

0 Likes 0 ·
AmeyaB avatar image AmeyaB ♦ mandonov commented ·

Have you tried using the Tcl Shell Session Type? In your Test Case you could interleave commands from the Spirent Avalanche Session Type and the Tcl Shell Session Type. This might be a good workaround.

0 Likes 0 ·
KumarS avatar image KumarS AmeyaB ♦ commented ·

This will not work because Avalanche application when testing creates a brand new Tcl shell. If you open a new Tcl shell session, it will be completely different process than the tcl shell which is running Avalanche tests. So your only option is to request a feature enhancement for the existing iTest Avalanche integration.

0 Likes 0 ·
dxia avatar image dxia KumarS commented ·

This could be done by TCL session and breaking the generated avalanche script to 2 parts, just before the final "WaitForClusteredTestCompletion". After the first half script is done, the test should be running, the we can do what ever in the iTest session. After we are done with all the naughty things in iTest, goes back to the second half of the original script and wait for the test to complete ...

 

but, kind of lose the point to use iTest, why not just do everything in TCL shell?

 

 

0 Likes 0 ·
mandonov avatar image mandonov dxia commented ·

The iTest Avalanche session and a Tcl process (executing Avalanche API commands) cannot communicate. So this is not an option.

 

There are advantages to using the Avalanche session that have to do with ease of use, but for the more advanced users access to the API is a must in many situations.

0 Likes 0 ·
dxia avatar image dxia mandonov commented ·

Hi, Lenny, I mean to use TCL session, not Avalanche session ...

0 Likes 0 ·
KumarS avatar image KumarS dxia commented ·

This definitely falls in the category of a "good feature request". I have filed one with the Fanfare Product Management team - KAZ-19529.

0 Likes 0 ·
mandonov avatar image mandonov KumarS commented ·

Thanks!

 

But I have been given KAZ-18466 for this issue as well  - are they redundant, or complementary in some way (or is KAZ-18466 invalid)?

0 Likes 0 ·
KumarS avatar image KumarS mandonov commented ·

I did not know if someone had given you a KAZ number. In that case, mine is duplicate and I will close it.

0 Likes 0 ·

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.