LF-2647 Test plan

https://lite-farm.atlassian.net/browse/LF-2647

Handle Ensemble webhook messages

Role: N/A

API: N/A

Dates: N/A

Switching farms:N/A

Input constraints: N/A

Data transformation: N/A

Cascading effects: N/A

Synchronous/ Asynchronous: Asynchronous

External service: Ensemble Scientific webhook

Test Suite

 

Test Step #

Description

Test Data

Expected Result

Actual Result

Pass/Fail

1

Using an API testing tool make a POST request to the webhook url {{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

 

 

 

 

 

4