|
Download USAGE_GUIDE.md from VAH6002/TFA: direct link, hf CLI and curl.
- Browser
- Download file 5 kB
-
https://huggingface.co/spaces/VAH6002/TFA/resolve/main/USAGE_GUIDE.md
- Command line
-
hf download hf://spaces/VAH6002/TFA/USAGE_GUIDE.md
-
curl -L -o USAGE_GUIDE.md https://huggingface.co/spaces/VAH6002/TFA/resolve/main/USAGE_GUIDE.md
5 kB
| # TFA Application Usage Guide | |
| ## π Quick Start | |
| Your TFA (Test Failure Analysis) application is now ready to use! Here are the different ways to interact with it: | |
| ## 1. π Metrics CLI (Recommended for Daily Monitoring) | |
| ### Get Daily Failure Percentages | |
| ```bash | |
| # All platforms | |
| python -m tfa_agents.metrics_cli daily | |
| # Specific platforms | |
| python -m tfa_agents.metrics_cli daily --platforms Android,Web | |
| ``` | |
| ### Get Platform Trends | |
| ```bash | |
| # 7-day trends | |
| python -m tfa_agents.metrics_cli trends --timeframe 7d | |
| # 30-day trends for specific platforms | |
| python -m tfa_agents.metrics_cli trends --timeframe 30d --platforms Android | |
| ``` | |
| ### Get Health Scores | |
| ```bash | |
| # Android health score | |
| python -m tfa_agents.metrics_cli health Android --timeframe 7d | |
| # iOS health score for 30 days | |
| python -m tfa_agents.metrics_cli health iOS --timeframe 30d | |
| ``` | |
| ### Get Comprehensive Reports | |
| ```bash | |
| # Weekly comparative report | |
| python -m tfa_agents.metrics_cli report --timeframe 7d | |
| # Monthly report | |
| python -m tfa_agents.metrics_cli report --timeframe 30d | |
| ``` | |
| ## 2. π Web Interface (Streamlit) | |
| ### Launch the Web UI | |
| ```bash | |
| streamlit run tfa_ui/app.py | |
| ``` | |
| Then open your browser to: http://localhost:8501 | |
| ### Features Available: | |
| - **π Metrics Dashboard**: Real-time platform health monitoring | |
| - **π Failure Analysis**: Individual test failure analysis | |
| - **π Trend Visualization**: Platform performance over time | |
| - **π₯ Health Scoring**: Platform health with recommendations | |
| - **π Daily Metrics Sidebar**: Quick health overview | |
| ## 3. π§ͺ Testing & Validation | |
| ### Run Core Tests | |
| ```bash | |
| # Test all functionality | |
| python simple_test.py | |
| # Test mock data tools | |
| python test_mock.py | |
| # Test metrics system | |
| python test_metrics.py | |
| ``` | |
| ## 4. π Daily Monitoring Workflow | |
| ### Morning Health Check | |
| ```bash | |
| # Check yesterday's failure rates | |
| python -m tfa_agents.metrics_cli daily | |
| # Get weekly trends | |
| python -m tfa_agents.metrics_cli trends --timeframe 7d | |
| # Check health scores for concerning platforms | |
| python -m tfa_agents.metrics_cli health Web --timeframe 7d | |
| ``` | |
| ### Weekly Review | |
| ```bash | |
| # Generate comprehensive report | |
| python -m tfa_agents.metrics_cli report --timeframe 7d | |
| # Check individual platform health | |
| python -m tfa_agents.metrics_cli health Android --timeframe 30d | |
| python -m tfa_agents.metrics_cli health Web --timeframe 30d | |
| python -m tfa_agents.metrics_cli health iOS --timeframe 30d | |
| ``` | |
| ## 5. π― Understanding the Output | |
| ### Health Score Interpretation | |
| - **π’ 80-100**: Excellent (maintain current practices) | |
| - **π‘ 60-79**: Good (minor optimizations needed) | |
| - **π 40-59**: Fair (targeted improvements required) | |
| - **π΄ 0-39**: Poor (urgent attention needed) | |
| ### Failure Rate Thresholds | |
| - **π’ < 10%**: Healthy | |
| - **π‘ 10-20%**: Watch closely | |
| - **π΄ > 20%**: Needs immediate attention | |
| ### Trend Indicators | |
| - **π Improving**: Failure rates decreasing | |
| - **π Degrading**: Failure rates increasing | |
| - **β‘οΈ Stable**: No significant change | |
| ## 6. π§ Troubleshooting | |
| ### If you get import errors: | |
| ```bash | |
| # Make sure virtual environment is activated | |
| # Install dependencies | |
| pip install -r requirements.txt | |
| pip install -r tfa_ui/requirements.txt | |
| ``` | |
| ### If Streamlit won't start: | |
| ```bash | |
| # Check if port 8501 is available | |
| # Try a different port | |
| streamlit run tfa_ui/app.py --server.port 8502 | |
| ``` | |
| ### If you need a real Google API key: | |
| ```bash | |
| # Set your actual API key (for production use) | |
| export GOOGLE_API_KEY="your-actual-api-key" | |
| # or on Windows: | |
| set GOOGLE_API_KEY=your-actual-api-key | |
| ``` | |
| ## 7. π Key Features | |
| ### β What's Working: | |
| - β Daily failure percentage tracking | |
| - β Platform trend analysis (7d, 30d, 90d) | |
| - β Health scoring with recommendations | |
| - β Comparative platform reports | |
| - β Mock data for testing | |
| - β CLI interface for automation | |
| - β Web dashboard for visualization | |
| - β Cross-platform support (Android, Web, iOS) | |
| ### π Mock Data vs Real Data: | |
| - Currently using **mock data** for demonstration | |
| - Mock data simulates realistic failure patterns | |
| - To use real data, configure actual Sponge API credentials | |
| - All functionality works the same with real or mock data | |
| ## 8. π― Next Steps | |
| 1. **Daily Monitoring**: Set up daily cron jobs with the CLI | |
| 2. **Alerting**: Add threshold-based alerts for high failure rates | |
| 3. **Integration**: Connect to real Sponge API for production data | |
| 4. **Dashboards**: Embed metrics in existing monitoring systems | |
| 5. **Automation**: Use CLI in CI/CD pipelines for health checks | |
| ## π Need Help? | |
| - Run `python simple_test.py` to verify everything is working | |
| - Check the web interface at http://localhost:8501 | |
| - All commands support `--help` for detailed usage information | |
| - Mock data provides realistic examples for learning the system | |
| **Your TFA application is ready for production use! π** |