Test the capacity to insert elements in the database according to a specific schema. The configuration is read on the standard input, and the name of the content to populate is given as argument. Two rows are inserted per run, with a value generated for each field from its type and the row number (see [Common.provider_for]): text and integer fields get a value derived from the field name, monovalued references point to the row of id 1, and multivalued references get two values for the first row and one for the second. A content without any field gets an empty row: $ tests --insert "entity" < { > "content": [ > { > "id": "entity" > } > ] > } > EOF entity:1 {} entity:2 {} Text and integer fields are filled with a generated value: $ tests --insert "entity" < { > "content": [ > { > "id": "entity", > "section": [ > { > "field": [ > { "name": "name", "label": {}, "type": "text" }, > { "name": "year", "label": {}, "type": "integer" } > ] > } > ] > } > ] > } > EOF entity:1 {"name":"name-1","year":1} entity:2 {"name":"name-2","year":2} References are declared in the field type. A monovalued reference stores the id of the target row in the content table, and each value of a multivalued reference gets its own line, read back from the dedicated table: $ tests --insert "entity" < { > "list": [ > { > "id": "country_list", > "field": [ > { "name": "code", "label": {}, "type": "text" } > ] > } > ], > "content": [ > { > "id": "entity", > "section": [ > { > "field": [ > { "name": "name", "label": {}, "type": "text" }, > { "name": "year", "label": {}, "type": "integer" }, > { > "name": "country", > "label": {}, > "type": { "content": "country_list" } > }, > { > "name": "aliases", > "label": {}, > "type": { "content": "country_list", "multivaluated": true } > } > ] > } > ] > } > ] > } > EOF entity:1 {"name":"name-1","year":1,"country":1} entity:1 {"aliases":1} entity:1 {"aliases":2} entity:2 {"name":"name-2","year":2,"country":1} entity:2 {"aliases":2}