question

gthibierge avatar image
gthibierge asked gthibierge answered

iTest - STC-GUI - streamblocks from XML STC - modifying the load

I use 24 different streamblocks in an iTest script. **I prepared a STC file, saved as XML, with 24 streamblocks**. Different protocols, frame length, TCP ports, etc. so it's easier to prepare this in STC file and verify that it works. Then I load this XML file in iTest STC-GUI session profile. Everything works fine. **Now I want my itest script to iterate and modify the load of each streamblock, based on calculations made in the script. But I want the other values of each streamblock to remain untouched, as they are in STC XML file.** I'd like to use iTest STC-GUI built-in commands and I would prefer not to go in STC API (STC-GUI is simple and I prefer to keep things simple !). I prepared a loop (for all the streamblocks) and have a step "configureStreamBlock". I use variables for Port, Id and Load (in step properties) and expected that all other parameters of each streamblock remained untouched. **I don't see how to set up things so that only the load value get modified and all others values come from the streamblock values in STC XML file.** I tried changing "inheritate" little arrows on the right of text box in step properties, but couldn't find a way to achieve what I want. There must be a way to inheritate values and just adjust what I want. No ?
iTeststc-guistreamblock
10 |950

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

gthibierge avatar image
gthibierge answered
Thx. That's what I was suspecting after reading a few posts. I found an example of a TCL STC API command that does the work fine. eval (STC-GUI session #) stc::config $streamHandle -Load $SBDebitStream eval (STC-GUI session #) stc::apply and if you want to check : eval (STC-GUI session #) stc::get $streamHandle -Load You just need to find streamHandle. And that's the way TestCenter>eval stc::get port1 -children-StreamBlock Result=streamblock1 streamblock2 streamblock3 streamblock4 streamblock5 streamblock6 streamblock7 streamblock8 streamblock9 streamblock10 streamblock11 streamblock12 TestCenter>eval stc::get port1 -children-StreamBlock Result=streamblock1 streamblock2 streamblock3 streamblock4 streamblock5 streamblock6 streamblock7 streamblock8 streamblock9 streamblock10 streamblock11 streamblock12
10 |950

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

vijaykumar avatar image
vijaykumar answered
Unfortunately, in current iTest versions if we add "configureStreamBlock" step manually in a testcase the step properties will not inherit from the configuration file. Each streamblock values in STC XML file can be modified by using command "configureStreamBlock" through iTest STC GUI interactive session. Here command "configureStreamBlock" will inherit the other properties/values from configuration file it self.
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.