Define, Share and Automate your tests / specifications
Table support
Tmar allows you to declare a table of data in your description in order to pass contextual values to your test
tmar.getListFromTable (‘countries’) ==
[[‘code’:‘FR’, ‘name’:’France’],
[‘code’:‘US’, ‘name’:‘United States’], [‘code’:’BR’,name:’Brazil’]]
tmar.getTable (‘countries’) ==
[‘code’:[‘FR’,’US’,’BR’],
’name’:[‘France’,‘United States’,’Brazil’]
tmar.getTableLine(‘countries’,0) ==
[‘code’:’FR’,’name’:’France’]
tmar.getTableColumn(‘countries’,’code’) ==
[‘FR’,’US’,’BR’]
tmar.getTableValue(‘countries’,0,’name’) ==
‘France’
tmar.getTableHeader(‘countries’) ==
[‘code’,’name’]
tmar.getTableSize(‘countries’) == 3


/table countries
[ code | name |
| FR | France |
| US | United States |
| BR | Brazil |
In your test code you can obtain table values from the Tmar object of the current iteration.
The following methods are available
/map countries
[ code | name |
| FR | France |
| US | United States |
| BR | Brazil |
Tmar allows you to declare a Map of data in your description in order to pass contextual values to your test
Map support

In your test code you can obtain table values from the Tmar object of the current iteration.
The following methods are available
tmar.getListFromMap(‘countries’) ==
[[‘code’:‘FR’, ‘name’:’France’],
[‘code’:‘US’, ‘name’:‘United States’], [‘code’:’BR’,name:’Brazil’]]
tmar.getMap(‘countries’) ==
[‘FR’:[‘code’:‘FR’, ‘name’:’France’],
‘US’:[‘code’:‘US’,‘name’:‘United States’],
’BR’:[‘code’:’BR’,name:’Brazil’]]
tmar.getMapsAsTable(‘countries’) ==
[‘code’:[‘FR’,’US’,’BR’],
’name’:[‘France’,‘United States’,’Brazil’]]
tmar.getMapLine(‘countries’,’FR’) ==
[‘code’:’FR’,’name’:’France’]
tmar.getMapColumn(‘countries’,’name’) ==
[‘FR’:’France,
’US’:’United States’,
’BR’:’Brazil’]
tmar.getMapColumnAsTable(‘countries’,’name’) ==
[’France,’United States’,’Brazil’]
tmar.getMapValue(‘countries’,’BR’,’name’) ==
‘Brazil’
tmar.getMapHeader(‘countries’) ==
[‘code’,’name’]
tmar.getMapSize(‘countries’) == 3
