LF-2454 Test plan

Create new endpoint to POST sensor readings https://lite-farm.atlassian.net/browse/LF-2454

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 an API make a POST request to {{base_url}}/sensor/reading/partner/1/farm/{{farm_id}}

Endpoint with sample data for an active sensor at the farm_id in the request in the same format as test data

{
"MBZ69B": {
"label": "Simulated device",
"device_type": "ESA-10015 - Soil Water Potential Sensor",
"configurable": false,
"firmware_version": null,
"hardware_version": "D",
"data": [
{
"parameter_category": "Soil Water Potential",
"unit": "kPa",
"label": null,
"parameter_number": 0,
"timestamps": [
"2022-11-24 07:07:07.715370+00:00"],
"values": [
109.8519954399],
"validated": [
false], "raw_values": [
109.8519954399]}

200 Response status

 

 

2

Check database and ensure that sensor reading data is being persisted correctly

 

 

Readings received in the post request exist

 

 

3