Search tips

apple banana
Find rows that contain at least one of the two words.

+apple +juice
Find rows that contain both words.

+apple macintosh
Find rows that contain the word 'apple', but rank rows higher if they also contain 'macintosh'.

+apple -macintosh
Find rows that contain the word 'apple' but not 'macintosh'.

+apple ~macintosh
Find rows that contain the word 'apple', but if the row also contains the word 'macintosh', rate it lower than if row does not. This is "softer" than a search for '+apple -macintosh', for which the presence of 'macintosh' causes the row not to be returned at all.

+apple +(>turnover >strudel)
Find rows that contain the words 'apple' and 'turnover', or 'apple' and 'strudel' (in any order), but rank 'apple turnover' higher than 'apple strudel'.

Find rows that contain words such as 'apple', 'apples', 'applesauce', or 'applet'.

"some words"
Find rows that contain the exact phrase 'some words' (for example, rows that contain 'some words of wisdom' but not "some noise words").

By continuing to use this site you agree to the use of cookies. For more information and to find out how to change this click here. Accept Cookies
Please enable cookies in your browser for this website.
Advanced search

Creating Variables within Test Cases

Last updated: 2019-11-14

Is there a way to create a variable within a testcase to determine the number of times that a particular stub was called?

Yes, you can add a variable to the VectorCAST User Globals by selecting Environment | User Code | Edit.  


Any variables added in this location will be displayed in the parameter tree and are also accessible within Configure Stubs User Code. Take a look at the following image for more details.

  • These variables will only be displayed in the parameter tree after the environment has been rebuilt.

    To count the number of times a stub has been called you can add the User Global, initialize it to zero in the parameter tree, then add Configure Stubs User Code to increment the variable (Environment | Configure Stubs | Edit).

  • You will need to Save and Link after making modifications to Configure Stubs User Code.
  • If you have set your unit under test as a Stub-By-Function (SBF) unit, you will get an error indicating that the variable is undeclared. To get around this error, you will need to declare the variable as an extern in Unit Prefix User Code (Environment | User Code | Edit).

Article Options
Views: 191