question

asavas avatar image
asavas asked asavas posted

Putting a query with key word with multiple words with spaces

Hi all,

 

I have a table where the "Key" is formed from multiple words. Like "OSPFv2 A to B".

 

I have the query set as TxFrameCount_by_StreamBlock(streamblock) where streamblock is "OSPFv2 A to B"

 

I have the parameter list for the streamblock names since I am only searching for certain streamblocks and not all of them.

 

The parameter list is like below:

 

Paramlist = "OSPFv2 A to B" "BGP A to B"

 

When I do:

 

foreach  ----> i [param Paramlist]

   analyze

      none

      assert [query StreamBlock_Result TxFrameCount_by_StreamBlock("$i")] == [query StreamBlock_Result SigFrameCount_by_StreamBlock("$i")]

          when true: Information:$currenttest:$i stream: TX Count=[query StreamBlock_Result "TxFrameCount_by_StreamBlock("$i")"], RX Count=[query StreamBlock_Result "SigFrameCount_by_StreamBlock("$i")"]

 

I get the following result:

 

DeclareExecutionIssue Information:Steady_State_After_Traffic:OSPFv2 A to B stream: TX Count=, RX Count=

 

So it sees "$i" correctly as "OSPFv2 A to B" but doesn't perform the query.

 

If I make the parameter with no spaces it should work but I need those spaces.

 

Any help is highly appreciated.

 

Thanks,

 

Alper

iTestresponse map
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

·
JeffJ avatar image
JeffJ answered JeffJ posted

This may just be a copy/paste error, but you list your true condition as:

 

true: Information:$currenttest:$i stream: TX Count=[query StreamBlock_Result "TxFrameCount_by_StreamBlock("$i")"], RX Count=[query StreamBlock_Result "SigFrameCount_by_StreamBlock("$i")"]

 

I noticed the double quotes around the queries.  This may be throwing off what you're trying to do.  Change your query to:

 

true: Information:$currenttest:$i stream: TX Count=[query StreamBlock_Result TxFrameCount_by_StreamBlock("$i")], RX Count=[query StreamBlock_Result SigFrameCount_by_StreamBlock("$i")]

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.