Gherkin feature files defining test scenarios
These Gherkin feature files define the TDD test scenarios for each major usage scenario, ready for automation with tools like Cucumber or Spek.
Feature: Onboarding and Consent
As a new user
I want to go through onboarding, language selection, and accept the privacy notice
So that I can use the app with full consent and my preferred language
Scenario: User accepts onboarding and consent
Given the app is launched for the first time
When I view the onboarding carousel
And I accept the EULA and privacy notice
Then I should proceed to the language selection screen
Scenario: User rejects onboarding and consent
Given the app is launched for the first time
When I decline the EULA and privacy notice
Then the app should exit
Scenario: User changes the language
Given I am on the language selection screen
When I select "Spanish"
Then the app should display all subsequent screens in Spanish
Feature: Model Selection and Initialization
As a new user
I want to choose and download a compatible ECAPA-TDNN model
So that the app is ready for offline analysis
Scenario: User selects and downloads model
Given I am on the model selection screen
When I choose the Small model and download it
Then the model is saved and initialized for inference
Scenario: Model integrity check on start
Given a model is already downloaded
When the app starts
Then the model checksum is verified before first use
Feature: Home Dashboard and Navigation
As a user
I want to see my current stress level and quickly access core features
So that I can navigate the app efficiently
Scenario: Home dashboard shows stress status and actions
Given I have completed onboarding and model setup
When I arrive at the home screen
Then I should see my latest stress result and a voice check button
And there are quick links to History and Settings
Feature: Voice Stress Check
As a user
I want to record my voice and get a stress result
So that I can monitor my wellbeing in real-time
Scenario: User records and submits a voice sample
Given I am on the home screen
When I tap the "Voice Check" button
And I record up to 30 seconds of audio
And I stop the recording
Then the app should process my recording and display a stress result and confidence
Scenario: User cancels recording
Given I am in the voice recording overlay
When I tap "Cancel"
Then the recording stops and I return to the home screen
Feature: Result Display and Recommendations
As a user
I want to see my stress score and relevant advice after each assessment
So that I can take appropriate action
Scenario: Stress result and advice are displayed
Given I have just completed a voice assessment
Then my stress score (1-10), confidence, and a suggestion are shown
And I can tag the context (e.g., "Meeting")
And I can save the result
Feature: History and Trend Visualization
As a user
I want to view a list and simple chart of recent stress assessments
So that I can see my mental health trends over time
Scenario: Viewing the history list
Given I am on the home screen
When I tap the History button
Then I see a list of my past stress scores with dates and context
Scenario: Viewing the trend chart
Given I am on the history screen
When I view the screen
Then I see a line chart of my last 7 days of stress scores
Feature: Settings and Privacy
As a user
I want to configure basic preferences and manage my data
So that I have control over appearance, models, and privacy
Scenario: Changing app language or theme
Given I am in the settings screen
When I change the language to "French" or toggle the theme
Then the change applies immediately to all screens
Scenario: Managing models
Given I am in the settings screen
When I view model information
Then I see the version, storage used, and option to re-download
Scenario: Exporting and deleting data
Given I am in the settings screen
When I export my data
Then I receive a portable archive of my assessments
When I delete my data
Then all stored assessments should be erased
Feature: Performance and Hardware
As a system administrator
I want the app to detect the correct delegate at startup
So that inference is optimal on all supported devices
Scenario: NPU preference is selected if available
Given the device supports NNAPI or Qualcomm QNN
When the app starts
Then model inference uses the NPU delegate
Scenario: Fallback to GPU or CPU as required
Given no NPU is available
When the app starts
Then model inference uses the GPU or CPU delegate
Scenario: Inference under 3 seconds
Given I record a valid audio sample
When processing occurs
Then the result is available within 3 seconds
Feature: Offline Support and Data Security
As a user
I want my data to remain on-device and for all features to work offline
So that my privacy is protected and the app is reliable
Scenario: App works offline after initial setup
Given a model is already downloaded
When I use any main feature with no network
Then all processing and storage remains fully functional
Scenario: Data export produces encrypted user archive
Given I request a data export in Settings
Then my data is packaged as an encrypted, portable file
02 September 2025