Create new endpoint to POST sensor readings - LF-2454Getting issue details... STATUS - LF-2454Getting issue details... STATUS
Role: N/A
API: N/A
Dates: N/A
Switching farms: N/A
Input constraints: N/A
Data transformation: N/A
Cascading effects:
Synchronous/ Asynchronous: N/A
External service: ESCI
Test Suite
Test Step # | Description | Test Data | Expected Result | Actual Result | Pass/Fail |
1 | Using Postman make a POST request to {{base_url}}/sensors/add_reading/1/:farm_id Endpoint with sample data for an active sensor at the farm_id in the request in the same format as test data | Example json that webhook will post to the url [ { "node_esid": "123", "sensor_esid": "124", "parameter_number": 1, "unit": "ºC", "time": [ "02-09-2022, 22:53:52", "02-09-2022, 22:54:07" ], "value": [ 1, 2 ], "validated": [ false, false ] }, { "node_esid": "123", "sensor_esid": "124", "parameter_number": 2, "unit": "kPa", "time": [ "02-09-2022, 22:54:23" ], "value": [ 3 ], "validated": [ false ] } ] | 200 Response status | ||
2 | Check database and ensure that sensor reading data is being persisted correctly | Readings received in the post request exist | |||
3 |