Test Workflow Guide
← Back to User GuideVectorPredictor Test Workflow Guide
This guide provides a detailed, step-by-step workflow for testing the VectorPredictor system using the example data provided.
๐ฏ Test Objectives
By following this workflow, you will: - Understand the complete user journey - Test all major system features - Verify data processing and validation - Test the age prediction functionality - Learn how to interpret results
๐ Prerequisites
Before starting, ensure: - [ ] Django server is running on port 8001 - [ ] You have access to the example_spectra folder - [ ] All dependencies are installed (TensorFlow, XGBoost, etc.) - [ ] Database is properly migrated
๐ Step-by-Step Test Workflow
Phase 1: Initial Setup
Step 1.1: Access the Website
- Open your web browser
- Navigate to:
http://127.0.0.1:8001/ - Verify the homepage loads correctly
- Check that all navigation links are visible
Expected Result: Homepage displays with navigation menu including Home, Mosquito, Location, Metadata, Spectra, Bioassay, About.
Step 1.2: Create User Account
- Click "Sign Up" or navigate to
http://127.0.0.1:8001/signup/ - Fill in the registration form:
- Username:
testuser - Email:
test@example.com - Password:
TestPassword123! - Confirm Password:
TestPassword123! - Click "Create Account"
- Log in with your new credentials
Expected Result: Account created successfully, redirected to main page.
Phase 2: Basic Data Setup
Step 2.1: Add Mosquito Species
- Navigate to "Mosquito" in the main menu
- Click "Add Species" or similar button
- Add the following species:
Anopheles gambiae s.lAnopheles funestusCulex quinquefasciatus- Save each species
Expected Result: Species added to database, visible in species list.
Step 2.2: Add Body Parts
- Navigate to "Body Parts" or similar section
- Add the following body parts:
head/thoraxabdomenwhole body- Save each body part
Expected Result: Body parts added to database, visible in body parts list.
Step 2.3: Create Collection Location
- Navigate to "Location" in the main menu
- Click "Add Location" or "Create Location"
- Fill in location details:
- Name:
Test Collection Site - Latitude:
-1.2921(example: Nairobi, Kenya) - Longitude:
36.8219 - Description:
Test location for sample collection - Save the location
Expected Result: Location created and visible in location list.
Phase 3: Metadata Creation
Step 3.1: Create Metadata Record
- Navigate to "Metadata" โ "Create Metadata"
- Fill in the metadata form with the following data:
Basic Information:
- Metadata Name: Test Sample 1
- Species: Select Anopheles gambiae s.l
- Body Part: Select head/thorax
- Location: Select Test Collection Site
- Collection Date: Use today's date
- Sex: Female
- Origin: Laboratory
Environmental Conditions:
- Storage Temperature: -20 (ยฐC)
- Collection Temperature: 25 (ยฐC)
- Humidity: 60 (%)
Biological Information:
- Physiological Status: Sugar fed or unfed
Spectral Measurement Parameters:
- Spectrometer: Bruker Alpha
- Min Wavenumber: 400
- Max Wavenumber: 4000
- Scans per Spectrum: 16
- Spectral Resolution: 4 cmโปยน
- Click "Save Metadata"
Expected Result: Metadata record created successfully, validation messages appear if any issues.
Step 3.2: Verify Metadata
- Go to "Metadata" โ "Metadata List"
- Verify your metadata record appears
- Click on the record to view details
- Check that all information is displayed correctly
Expected Result: Metadata record visible in list with all details preserved.
Phase 4: Spectral Data Upload
Step 4.1: Upload CSV Sample
- Navigate to "Spectra" โ "Upload Spectra"
- Select the metadata record you just created
- Click "Choose Files" and select
sample_csv.csv - Click "Upload"
- Wait for processing to complete
Expected Result: File uploaded successfully, appears in spectra list.
Step 4.2: Upload TXT Sample
- Repeat the upload process with other samples (
sample_txt.txt,sample_dat.dat,sample_dpt.dpt,sample_mzz.mzz) - Use the same metadata record or create a new one
Expected Result: TXT file uploaded successfully.
Step 4.3: Test Different File Formats
- Try uploading files with different separators (comma, tab, space)
- Test with files that have different column names
- Verify the system handles various CSV/TXT formats correctly
Expected Result: System correctly identifies and processes different file formats.
Phase 5: Spectral Data Analysis
Step 5.1: View Uploaded Spectra
- Navigate to "Spectra" to see your uploaded files
- Click on one of the uploaded spectra
- Examine the spectral plot and data
Expected Result: Spectral plot displays correctly with wavenumber vs intensity.
Step 5.2: Check Quality Filters
- In the spectrum view, look for quality filter results:
- Low Intensity Filter
- Abnormal Background Filter
- Atmospheric Interference Filter
- Note which filters pass or fail
Expected Result: Quality indicators displayed with pass/fail status.
Step 5.3: View Spectral Data
- Scroll down to see the raw spectral data
- Verify the data matches your uploaded file
- Check that wavenumbers are in correct range
Expected Result: Raw data displayed in table format.
Phase 6: Age Prediction Testing
Step 6.1: Access Prediction Interface
- Navigate to "Predictions" or look for age prediction options
- Select a spectrum from your uploaded data
- Choose a predictive model (if multiple available)
Expected Result: Prediction interface loads with spectrum selection.
Step 6.2: Run Age Prediction
- Select the spectrum you want to analyse
- Click "Run Prediction" or similar button
- Wait for the model to process
Expected Result: Prediction results displayed with estimated age.
Step 6.3: Interpret Results
- Review the predicted age (in days)
- Check confidence scores or error margins
- Note any warnings or quality indicators
Expected Result: Clear prediction results with confidence metrics.
Phase 7: Advanced Testing
Step 7.1: Test Error Handling
- Try uploading an invalid file format
- Upload a file with missing data
- Test with empty metadata fields
Expected Result: Appropriate error messages displayed.
Step 7.2: Test Data Validation
- Create metadata with invalid values
- Try uploading files with wrong column names
- Test with files outside the expected wavenumber range
Expected Result: Validation errors prevent invalid data entry.
Step 7.3: Test Performance
- Upload larger spectral files with multiple spectra
- Test with files containing many spectra (batch processing)
- Monitor system response times
Expected Result: System handles larger datasets without issues.
๐ Expected Results Summary
Successful Test Indicators
- โ All pages load without errors
- โ User registration and login work
- โ Data entry forms accept valid input
- โ File uploads complete successfully
- โ Spectral plots display correctly
- โ Quality filters provide meaningful results
- โ Age predictions generate results
- โ Error handling works appropriately
Quality Check Results
- Low Intensity Filter: Should pass for good quality data
- Background Filter: Should pass for clean spectra
- Atmospheric Filter: Should pass for dry samples
Prediction Results
- Age estimates should be reasonable (0-30 days for lab samples)
- Confidence scores should be provided
- Results should be reproducible
๐ง Troubleshooting Common Issues
If Pages Don't Load
- Check Django server is running
- Verify port 8001 is accessible
- Check browser console for errors
If Uploads Fail
- Verify file format is supported
- Check file size is reasonable
- Ensure no special characters in filenames
If Predictions Fail
- Check TensorFlow/XGBoost are installed
- Verify ML models are in correct location
- Check server logs for error messages
If Data Quality Checks Fail
- Review spectral data quality
- Check for obvious artifacts
- Verify file format compliance
๐ Test Documentation
Record Your Results
Create a test report with: - Date and time of testing - Browser and operating system used - Steps completed successfully - Any errors encountered - Performance observations - Suggestions for improvement
Sample Test Report Template
Test Date: [Date]
Tester: [Name]
Environment: [OS/Browser]
โ
Completed Steps:
- [ ] User registration
- [ ] Basic data setup
- [ ] Metadata creation
- [ ] File uploads
- [ ] Spectral analysis
- [ ] Age predictions
โ Issues Found:
- [Description of any problems]
๐ Performance Notes:
- [Response times, file sizes, etc.]
๐ก Suggestions:
- [Ideas for improvement]
๐ Completion Checklist
Before considering the test complete, verify: - [ ] All major features tested - [ ] Error handling verified - [ ] Performance acceptable - [ ] Results documented - [ ] Issues reported (if any) - [ ] System ready for real use
Congratulations! You have successfully tested the VectorPredictor system. This workflow demonstrates the complete user journey from data entry to age prediction, providing confidence that the system works as intended.