-
Notifications
You must be signed in to change notification settings - Fork 16
Test & Data
Mockingbird focuses on helping teams to test easily, so to accomplish this, a mock can be described as simple 'data' and grouped together in a testset, representing a full test scenario.
It's possible to select a data mock individually without selecting a testset.
If a data mock is selected/unselected after enabling a testset, this test will be unselected automatically.
- Go to
Settingsscreen - Tap on
Open Data Folder - Open the
testfolder - Create new testset JSON file (ex. /test/test01.json) following convention below
- Go to
Testscreen - Tap on
Options > refresh screenor restart mockingbird - Done!
If it's the first time, tap on
IMPORTbutton atTestscreen, add new testset and tapREFRESH.
{
"title": "testset name",
"description": "a description for this testset",
"tests": [
"data01",
"data02"
]
}'data01' is the name of JSON data file with mock information (you don't need to add .json extension).

- Go to
Testscreen - Tap on any testset available to enable it
- Done!
- Go to
Settingsscreen - Tap on
Open Data Folder - Open the
datafolder - Create new data JSON file (ex. /data/data01.json) following convention below
- Go to
Datascreen - Tap on
Options > refresh screenor restart mockingbird - Done!
If it's the first time, tap on
IMPORTbutton atDatascreen, add new testset and tapREFRESH.
{
"title": "data mock title",
"group": "a group name",
"description": "a description for this data mock",
"type": "GET",
"code": 200,
"url": "/api/v1/record",
"payload": "{json}"
}The 'type' and 'url' are used for pattern matching, and 'code' and 'payload' are returned to the device.
The 'payload' should be a stringified JSON.

- Go to
Datascreen - Tap on any data available to enable it
- Done!
While using mockingbird you can change data content on the fly, without need to open json, edit file and refresh screen, so you can play with data faster.

To change data on the fly you just need to:
- Select the specific data mock
- Change whatever you need on the editor
- Done!
You don't need to save or refresh anything using the real-time data editor.