Test Data Service - Query expressions

Specify a string for the query. Search queries must use a formal grammar as described here.

Comparison operators <, <=, >, >=, ==, and !=

Example:

car[Status==registered AND ((fuel!='petrol' AND mileage<=10000) OR (enginepower!='250' AND manufacturer=='Volkswagen'))]

car[mileage<=1000 AND (brand=='Volkswagen' OR fuel!='petrol')]

Logical operators

NOT (!), AND (&), OR (|)

Priority: NOT, AND, OR

 

Example:

car [NOT petrol==TRUE OR Volkswagen==TRUE AND Age<10]

car [! (petrol==TRUE & Age<10)]

Left associative

A AND B AND C == (A AND B) AND C

A OR B OR C == (A OR B) OR C

 

Values
  • string: 'my car' or TextWithoutSpecChars
  • number: 123 (example: 11.11, 22,22)
  • boolean: TRUE, FALSE
  • null: NULL
Important: For numerical and boolean comparison, you must upload the test data via API and make sure they are of the same type.
Text input
  • \ escapes ' character and \ as well

  • " needs to be escaped with another "

  • ' apostrophe marks are mandatory for strings with special characters or numbers that should be treated as text

  • Type and brackets are not mandatory

Example:

Name == 'Mc\'Donalds'

Name == 'Dwayne ""Rock"" Johnson'

Age>'10'

Brand == Suzuki is the same as car[Brand == Suzuki]

 

The following existing TestData Modules can be searched by using specific query strings in repository and type.

Query expressions for Module TDS Find & provide item

The Module serves to find a specific item in the TDS repository. Once you have retrieved the item, the item is locked. No other TestStep can retrieve the same item. For more details, see chapter "TestData - Find & provide item".

Query expressions

This example shows a query that searches for all cars with the Id>2010.

Query example: Module - TDS Find & provide item

Query expressions for the Module TestData - Expert module

The Module TestData - Expert module combines the functionality of other TestData Modules and provides you with additional functionality on top. For more details, see chapter "TestData - Expert module".

Query expressions

This example shows a query that searches for all cars with the Id>2015.

Query example: Module - Expert module