Atlas / tests /README.md
findEthics
Adding analytics capabilities
1d4dc07
|
Raw
History Blame Contribute Delete
1.72 kB

Atlas Analytics Test Suite

This folder contains test scripts for validating the Atlas analytics system functionality.

Test Files

Core Tests

  • test_mongo_connection.py - Test MongoDB connection (both sync and async)
  • test_analytics.py - Basic analytics functions test
  • debug_analytics.py - Comprehensive analytics debugging tool

Integration Tests

  • test_chat_analytics.py - Test end-to-end chat analytics collection
  • validate_mongodb_data.py - Validate data collection and dashboard accuracy

Deployment Tests

  • deployment_check.py - Complete deployment readiness check

Usage

Quick MongoDB Test

cd tests
python test_mongo_connection.py

Debug Analytics Issues

cd tests
python debug_analytics.py

Validate Data Collection

cd tests
python validate_mongodb_data.py

Test Chat Analytics (requires server running)

cd tests
python test_chat_analytics.py

Deployment Readiness Check

cd tests
python deployment_check.py

Prerequisites

  • Atlas server environment activated
  • .env file configured with MongoDB, Google, and Brave API keys
  • MongoDB Atlas connection working

Test Scenarios

1. Fresh Installation

python deployment_check.py

2. Analytics Not Working

python debug_analytics.py

3. Data Collection Issues

python validate_mongodb_data.py

4. End-to-End Testing

# Start server first
./start.sh

# Then test
python test_chat_analytics.py

Expected Results

All tests should pass with ✅ indicators when the system is working correctly. Any ❌ indicators suggest issues that need to be resolved.