ktageja / DataSense-PRJ666-team-5

MIT License
0 stars 0 forks source link

Use Case 16: Export Sensor Data as CSV #19

Open ktageja opened 1 month ago

ktageja commented 1 month ago

Export Sensor Data as CSV

User Story

As a user, I want to export my sensor data as a CSV file so that I can analyze it using external tools like Excel or Google Sheets.

Description

This use case involves allowing users to export their sensor data (temperature, humidity, and moisture) as a CSV file. The user can download a CSV file containing the real-time or historical data for further analysis or reporting. The data must be properly formatted for ease of use in spreadsheet applications.

Acceptance Criteria

Testing

Normal Flow of Events

The user logs into their account and navigates to the dashboard. The user selects a date range (for historical data) or chooses to export real-time data. The user clicks the "Export as CSV" button. The system generates a CSV file with the selected sensor data. The user downloads the CSV file to their device, and the data is correctly formatted.

Alternate/Exceptional Flows:

S-1: No data available for export

The user selects a date range where no data is available. The system displays a message: "No data available for export" and disables the export button.

S-2: CSV export fails due to server issues

The system fails to generate a CSV file due to a server issue. The system displays an error message: "Failed to export data. Please try again later."