Skip to content

Latest commit

 

History

History
295 lines (254 loc) · 10 KB

File metadata and controls

295 lines (254 loc) · 10 KB

Changelog

All notable changes to TestIQ will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

In Progress

  • Documentation improvements
  • Additional test coverage

0.2.0 - 2026-01-13

🎯 Major Improvements

Code Quality Enhancements

  • Reduced Cognitive Complexity - Refactored _generate_recommendations() from complexity 18 to 6
    • Extracted helper methods for better maintainability
    • Improved code organization and readability
  • Constants Management - Extracted duplicate string literals to constants
    • TESTIQ_CONFIG_DIR, SAMPLE_AUTH_FILE, SAMPLE_USER_FILE in CLI
    • NO_TESTS_WARNING in analyzer
    • Follows best practices for maintainable code
  • Better Error Handling - Unused parameters properly marked with underscore prefix
  • Cleaner Code - Fixed f-strings without placeholders, simplified nested conditionals

Enhanced Type Support

  • Type Stubs Added - Better IDE autocomplete and type checking
    • types-click>=8.1.0 for click library
    • types-pyyaml>=6.0.0 for PyYAML library
  • pytest Dependency - Now included as core dependency (no separate install needed)

Testing Improvements

  • Fixed Float Comparisons - Using pytest.approx() for floating-point equality checks
  • Better Test Practices - Unused variables marked with underscore following conventions

🗑️ Removed

  • Backup Files - Cleaned up reporting.py.backup from source control
  • Unused Variables - Removed duplicate_percentage and files_covered from reporting.py
  • Sample Reports - Repository no longer contains dummy/sample report files
    • All sample data now generated by testiq demo command
    • Ensures consistency across all report formats (HTML, CSV, Markdown)

📝 Updated

  • Examples - All examples updated with latest features and best practices
    • Python examples demonstrate constant usage
    • CI/CD examples note pytest is included
    • Documentation highlights code quality improvements
  • Reports Directory - Clean structure with generated files ignored by Git

🐛 Fixed

  • Unused function parameters in pytest_plugin.py and cicd.py
  • Missing pytest import resolution
  • Nested if statement complexity in CLI
  • Complex nested ternary operator for grade colors

💡 Enhanced Features

Advanced Reporting

  • HTML Report Generator with beautiful CSS styling and responsive design
    • Executive summary dashboard
    • Colored duplicate group tables
    • Visual progress bars for metrics
    • Action item recommendations
  • CSV Export with 4 export methods:
    • to_csv() - All results
    • exact_duplicates_to_csv() - Exact matches
    • subset_duplicates_to_csv() - Subset relationships
    • similar_coverage_to_csv() - Similarity pairs
  • Multiple output formats: HTML, CSV, JSON, Markdown, Plain text

CI/CD Integration

  • Quality Gates with configurable thresholds
    • Max duplicates count
    • Max duplicate percentage
    • Fail on increase from baseline
    • Exit code support (0=pass, 1=error, 2=quality fail)
  • Baseline Management
    • Save analysis results as baselines
    • Compare against saved baselines
    • List, show, and delete baselines
    • CLI commands: testiq baseline list/show/delete
  • Trend Tracking
    • Historical analysis results
    • Improvement detection
    • Trend analysis (improving/worsening/stable)
    • Long-term quality monitoring

Plugin System

  • 7 Hook Types for extensibility:
    • BEFORE_ANALYSIS - Pre-analysis setup
    • AFTER_ANALYSIS - Post-analysis actions
    • ON_DUPLICATE_FOUND - Duplicate detection events
    • ON_SUBSET_FOUND - Subset detection events
    • ON_SIMILAR_FOUND - Similarity detection events
    • ON_ERROR - Error handling
    • ON_QUALITY_GATE_FAIL - Quality gate failures
  • Plugin API:
    • register_hook() - Add custom hooks
    • unregister_hook() - Remove hooks
    • trigger_hook() - Fire hook events
    • clear_hooks() - Reset all hooks
  • HookContext dataclass for rich event data

Quality Analysis

  • Quality Scoring System
    • A-F grade assignment
    • 0-100 point scale
    • Multi-dimensional metrics:
      • Duplicate percentage score (40%)
      • Coverage efficiency score (30%)
      • Test uniqueness score (30%)
    • TestQualityScore dataclass with comprehensive metrics
  • Recommendation Engine
    • Priority-based recommendations (HIGH/MEDIUM/LOW)
    • Action items for improvement
    • Specific suggestions for duplicate removal
    • Overall quality assessment
  • CLI Commands:
    • testiq quality-score - Get quality score
    • Output to JSON for integration

Enterprise Features

  • Structured Logging
    • Multiple levels: DEBUG, INFO, WARNING, ERROR, CRITICAL
    • File rotation (configurable size and backup count)
    • JSON format support
    • Console and file output
    • Logger obtained via get_logger()
  • Configuration System
    • YAML format support (testiq.yaml)
    • TOML format support (testiq.toml)
    • Configurable sections:
      • Analysis settings (threshold)
      • Performance options (parallel, workers, caching)
      • Security limits (file size, test count)
      • Logging configuration
  • Security Enhancements
    • File size limits (default 100MB)
    • Maximum test count limits (100,000)
    • Path traversal protection
    • Input validation for all file operations
  • Performance Optimizations
    • Parallel processing support (configurable workers)
    • Caching for duplicate analysis
    • Memory-efficient algorithms
    • Optimized set operations
  • Custom Exceptions
    • TestIQError - Base exception
    • InvalidCoverageDataError - Data validation
    • ConfigurationError - Config issues
    • AnalysisError - Analysis failures
    • SecurityError - Security violations
    • Better error messages and debugging

📚 Enhanced

  • CLI - Added commands for all new features
    • --format html|csv for advanced reports
    • --quality-gate for CI/CD integration
    • --save-baseline / --baseline for comparisons
    • --max-duplicates / --max-duplicate-percentage thresholds
  • API - Extended CoverageDuplicateFinder with:
    • enable_parallel parameter
    • max_workers parameter
    • enable_caching parameter
    • Performance configuration options
  • Testing - Added comprehensive test suites:
    • tests/test_reporting.py (9 tests, 95% coverage)
    • tests/test_cicd.py (20 tests, 95% coverage)
    • tests/test_plugins.py (17 tests, 91% coverage)
    • tests/test_analysis.py (17 tests, 86% coverage)
    • Total: 66 tests (49 passing, 17 in progress)

🔧 Changed

  • Improved terminal output with Rich formatting
  • Better error messages and validation
  • Enhanced documentation throughout codebase

📖 Documentation

  • Added enterprise features to README
  • Created SECURITY.md for security policy
  • Created this CHANGELOG.md
  • Added configuration examples
  • Added GitHub Actions integration example

0.1.0 - 2024-01-10

🚀 Initial Release

Core Features

  • Exact Duplicate Detection
    • Finds tests with identical coverage
    • 100% confidence for safe removal
    • Groups duplicates together
  • Subset Detection
    • Identifies tests completely covered by others
    • One-way containment analysis
    • Recommendations for removal
  • Similarity Analysis
    • Configurable threshold (default 0.8)
    • Jaccard similarity coefficient
    • Finds overlapping test coverage
  • Coverage Data Support
    • JSON format input
    • Per-test coverage tracking
    • File-line mapping

CLI

  • testiq analyze command
    • --threshold for similarity detection
    • --output for report file
    • --format for output type (text/markdown/json)
  • testiq demo command for sample data
  • Beautiful terminal output with Rich
  • Progress indicators
  • Colored tables

Python API

  • CoverageDuplicateFinder class
    • add_test_coverage() method
    • find_exact_duplicates() method
    • find_subset_duplicates() method
    • find_similar_coverage() method
    • generate_report() method
  • Simple, intuitive API design

Testing

  • Comprehensive test suite
  • 54 tests with 81% coverage
  • Test fixtures and helpers
  • tests/test_analyzer.py - Core analysis tests
  • tests/test_cli.py - CLI integration tests
  • tests/test_loader.py - Data loading tests
  • tests/test_integration.py - End-to-end tests

Documentation

  • README with quickstart
  • Installation guide
  • Usage examples
  • API documentation
  • FAQ

Project Setup

  • pyproject.toml with modern Python packaging
  • Click for CLI framework
  • Rich for terminal output
  • pytest for testing
  • Black for code formatting
  • MIT License

🏗️ Architecture

  • Modular design with separate concerns
  • Extensible for future features
  • Clean separation of CLI and library code
  • Comprehensive error handling

Release Notes

Version 0.2.0 Highlights

This is a major release that transforms TestIQ from a simple analysis tool into an enterprise-grade solution. The focus was on:

  1. Advanced Reporting - Beautiful HTML and CSV reports for stakeholders
  2. CI/CD Integration - Quality gates, baselines, and trend tracking for automation
  3. Extensibility - Plugin system for custom workflows
  4. Quality Analysis - Scoring and recommendations for continuous improvement
  5. Enterprise Features - Logging, configuration, security, and performance

Migration Notes:

  • All v0.1.0 APIs remain compatible
  • New features are opt-in via CLI flags or API parameters
  • Configuration files are optional (sensible defaults)
  • Plugins are optional (core functionality unchanged)

Breaking Changes:

  • None! Fully backward compatible with 0.1.0

Version 0.1.0 Highlights

Initial release with core duplicate detection functionality:

  • Exact duplicate detection
  • Subset analysis
  • Similarity detection
  • CLI and Python API
  • Beautiful terminal output