Week4

Week 4 Testing, CI/CD & Deployment Setup #

Project name: VoiceDiary

Code repository: link

VoiceDiary is an AI-powered voice journaling tool that analyzes tone, emotion, and key themes in spoken entries. It generates personalized emotional insights and well-being suggestions based on recorded reflections.

Team #


Team memberTelegram aliasInnopolis EmailResponcibilities
Dziyana Melnikava@meldilen24dz.melnikava@innopolis.universityPM, Frontend
Anastasia Kuchumova@n_rngka.kuchumova@innopolis.universityFrontend, UX/UI
Dzhamilia Fatkullina@jam11ad.fatkullina@innopolis.universityML
Elina Kuzmichyova@lin_anilee.kuzmichyova@innopolis.universityML
Olesia Novoselova@doiwannaknoww8o.novoselova@innopolis.universityBackend
Danil Davydyan@chocopd.davydyan@innopolis.universityBackend

Frontend #

Responsible: Dziyana Melnikava, Anastasia Kuchumova

Link to frontend contribution: CLICK TO SEE

  • Unit tests for critical frontend components are wtitten.
  • Component for Analysis Output enhanced according to new ML model.
  • Authentication is established.
  • Feedback component was created.
  • Main and User Profile pages are created.
  • Custom calendar is implemented.

Unit Testing Areas #

🎤 AudioRecorder Component Tests #

  • Initial UI Rendering:
    Ensures microphone icon (MicIcon) is visible on initial load, verifies that recording controls like “Pause” or “Stop” are not displayed unless recording starts.
  • Permission Denied Banner:
    When microphone permission is ‘denied’, the component shows a warning icon and an alert message: “Microphone access is blocked”.
  • Active Recording State:
    Shows recording controls (Pause, Stop icons) and the recording timer when recording starts.
  • Post-recording Loading State:
    Displays a loading message indicating voice recording is being analyzed.
  • Save/Delete UI After Recording:
    When audioBlob exists (indicating recording finished), the component shows Save and Delete buttons with corresponding labels.
  • Delete Confirmation Trigger:
    Clicking the delete icon triggers the handleDeleteClick function, initiating delete confirmation.
  • Stop Recording Action:
    Clicking the stop icon calls the stopRecording function, verifying the stop recording interaction.

FeedbackWidget Component Tests #

  • Initial Render:
    Renders the feedback question and instruction text.
  • Display of Rating Options:
    Verifies all rating buttons with emojis and labels are displayed.
  • Submitting a Rating:
    Checks that clicking a rating calls the onSubmit handler with the correct value.
  • Thank You Message After Submission:
    Confirms the thank-you message appears and the question disappears after rating submission.
  • Hover Effect on Ratings:
    Applies active CSS class when hovering over a rating button.
  • Hover Leave Effect:
    Removes active CSS class when mouse leaves a rating button.

📊 RecordingCard Component Tests #

  • Rendering Behavior with Null Result:
    Verifies that the component renders nothing when the result prop is null.
  • Full Rendering with Valid Result:
    Checks that all main sections (emotion, summary, insights, coping strategies, recommendations, footer) render correctly for a valid result object.
  • Emotion Pill Styling:
    Tests that the emotion label displays with the correct CSS class depending on the emotion type (positive, negative, aggressive, neutral).
  • Rendering Multiple Key Triggers:
    Confirms that multiple key triggers are rendered correctly when present in the data.

🌊 WaveAnimation Component Tests #

  • Audio Initialization on Recording Start:
    Verifies that when the component mounts with isRecording=true, it requests microphone access (navigator.mediaDevices.getUserMedia) and creates an AudioContext.
  • Graceful Handling of getUserMedia Errors:
    Simulates permission denial or error during microphone access request and confirms that the error is caught and logged via console.error without crashing.
  • Animation Frame Cleanup on Unmount:
    Confirms that ongoing animation frames requested via requestAnimationFrame are properly cancelled on component unmount to prevent memory leaks or unnecessary processing.

✅ Test Cases #

Example of testExample of TestExample of Test
Example of TestExample of Test

Backend #

Responsible: Olesia Novoselova, Danil Davydyan

Link to backend contribution: CLICK TO SEE

  • User authentication implemented using HTTP-only cookies with a 30-day expiration period.
  • Secure password handling added: user passwords are hashed at the service layer before storage.
  • Unit tests written for critical service and repository logic.
  • Integration tests developed for key API endpoints to verify end-to-end functionality.
  • CI/CD pipeline and Docker Compose setup completed for streamlined development and deployment.

Unit & Integration Testing Areas #

🔑 Authentication & Session Management Tests #

  • User Registration:
    Verifies that new users are registered with hashed passwords and stored securely in the database.
  • User Login:
    Ensures users can log in with valid credentials, and receive a secure HTTP-only session cookie.
  • Session Validation:
    Checks that endpoints requiring authentication reject requests with missing or invalid session tokens.

🗄️ Service & Repository Layer Tests #

  • User Service:
    Tests user creation, password hashing, session creation, and user retrieval by login or session token.
  • Record Service:
    Verifies saving, fetching, and retrieving records by user and record ID.
  • Repository Functions:
    Ensures correct SQL operations for users, sessions, and records, including error handling for not found and constraint violations.

🌐 API Integration Tests #

  • /users/register:
    Confirms successful registration and error handling for duplicate users.
  • /users/login:
    Validates login flow, session cookie issuance, and error responses for invalid credentials.
  • /me:
    Checks that authenticated users can retrieve their profile info, and unauthenticated requests are rejected.
  • /records/upload:
    Tests file upload endpoint for authentication and correct error handling.
  • /users/:userID/records & /records/:recordID:
    Verifies correct responses for valid, invalid, and non-existent users/records.

⚙️ CI/CD & Deployment #

  • CI/CD Pipeline:
    Automated testing and deployment pipeline configured for backend service.
  • Docker Compose:
    Multi-service orchestration for backend, database, and ML service for local development and

✅ Test Cases #

Test Cases output is available here: CLICK HERE


ML #

Responsible: Dzhamilia Fatkullina, Elina Kuzmichyova

Link to ML contribution: CLICK HERE


Individual commitments #


Team memberTelegram aliasContributionLink
Dziyana Melnikava (Lead)@meldilen24Write part of report, implemented new Analysis Output and Feedback components, established authenticationCommits
Anastasia Kuchumova@n_rngkCreated Main and User Profile pages, implemented custom calendar, wrote unit testsCommits
Dzhamilia Fatkullina@jam11aResearched psychological feedback models, researched locally hosted llms capable of extracting key insights, implemented insight extraction, tested promptsCommits
Elina Kuzmichyova@lin_anileResearched models for emotion recognition from text and approaches to multimodal emotion recognition (based on text and voice)Link
Olesia Novoselova@doiwannaknoww8Implemented user authentication using HTTP-only cookies with a 30-day expiration period, added secure password handling, wrote unit tests, developed integration tests for key API endpoints.Commits
Danil Davydyan@chocopSet up CI/CD Pipeline, set up Docker, integrate new ML model to backendCommits, Worlflow

Plan for Next Week #

ML #

  • Do emotion recognition model orchestration
  • Conduct research on additional feature models

Frontend #

  • Improve UI/Ux
  • Implement new features that will be introduced by ML team
  • Collaborate with backend team on connecting calendar to database

Backend #

  • Implement logic for loading users’ avatars
  • Modification of the go->python contract for more optimal use of ml models and easier deployment
  • Setting up the test environment

Confirmation of the code’s operability #

We confirm that the code in the main branch:

  • [✓] In working condition.