A professional-grade Python automation tool that streamlines the generation of comprehensive unit test scripts and detailed reports for VectorCAST environments. This tool significantly reduces manual effort in quality assurance workflows and ensures consistent test artifact organization.
The VectorCAST Unit Test Report Generator is designed for software engineers, QA professionals, and DevOps teams who work with VectorCAST testing environments. It automates the tedious process of creating individual test scripts, generating comprehensive reports, and organizing test artifacts in a professional manner.
✅ Automated Test Script Generation: Creates individual test scripts for every function in your module
📊 Comprehensive Reporting: Generates three types of detailed reports:
- Management Reports: Test case organization and status overview
- Execution Reports: Detailed test execution results and outcomes
- Full Reports: Complete testing analysis with metrics and coverage
🗂️ Intelligent Organization: Automatically creates structured directories for optimal artifact management
🔄 Compound Test Support: Optional generation of compound test cases for complex testing scenarios
🎨 Interactive CLI: User-friendly command-line interface with visual feedback and progress indicators
🛡️ Robust Error Handling: Comprehensive error checking with meaningful feedback and recovery suggestions
⚡ High Performance: Optimized for processing large codebases with hundreds of functions
- Time Savings: Reduces manual test script creation time by 90%
- Consistency: Ensures standardized test artifact generation across teams
- Quality Assurance: Comprehensive reporting enables better decision-making
- Scalability: Handles projects of any size efficiently
- Compliance: Supports regulatory compliance with detailed audit trails
- Operating System: Windows (primary), Linux/macOS (compatibility mode)
- Python: Version 3.7 or higher
- VectorCAST: Properly installed and configured
- Memory: Minimum 512MB RAM (2GB recommended for large projects)
- Disk Space: 100MB free space for typical projects
Ensure the following are properly configured:
-
VectorCAST Installation:
- Default path:
C:\VCAST\clicast.exe
- Verify installation with:
clicast.exe --version
- Default path:
-
Environment Variables (optional):
VCAST_DIR
: Custom VectorCAST installation directoryPATH
: Include VectorCAST binary directory
-
Project Structure:
YourProject/ ├── YourModule.env # VectorCAST environment file ├── Unit_Test_Generator.py # This script └── [other project files]
# Clone the repository
git clone https://github.com/yourusername/vectorcast-unit-test-generator.git
cd vectorcast-unit-test-generator
# Run directly (no additional dependencies required)
python Unit_Test_Report_generator.py
# Download the script to your VectorCAST project directory
curl -O https://raw.githubusercontent.com/yourusername/vectorcast-unit-test-generator/main/Unit_Test_Report_generator.py
# Make it executable (Unix systems)
chmod +x Unit_Test_Report_generator.py
# Create a dedicated tools directory
mkdir vectorcast-tools
cd vectorcast-tools
# Clone and setup
git clone https://github.com/yourusername/vectorcast-unit-test-generator.git
cd vectorcast-unit-test-generator
# Create virtual environment (recommended)
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install in development mode
pip install -e .
-
Navigate to your VectorCAST project directory:
cd /path/to/your/vectorcast/project
-
Execute the generator:
python Unit_Test_Report_generator.py
-
Follow the interactive prompts:
📝 Enter the Module Name: MyModule 🔄 Do you want separate test scripts for Compound Test Cases? (Y/N): Y
# If VectorCAST is installed in a non-standard location
from Unit_Test_Report_generator import UnitTestReportGenerator
generator = UnitTestReportGenerator(vcast_path="/custom/path/to/clicast.exe")
generator.run()
# Process multiple modules
for module in ModuleA ModuleB ModuleC; do
echo "Processing $module"
cd "$module"
python ../Unit_Test_Report_generator.py
cd ..
done
After successful execution, your project will have:
YourProject/
├── Unit_Tst/ # Individual function test scripts
│ ├── function1.tst
│ ├── function2.tst
│ ├── function3.tst
│ └── __COMPOUND__.tst # (if compound tests enabled)
├── Results/ # Comprehensive reports
│ ├── YOURMODULE.tst # Master test script
│ ├── YourModule_Full_Report.html
│ ├── YourModule_Testcase_Management_Report.html
│ └── YourModule_Execution_Results_Report.html
└── [your original files]
Report Type | Description | Use Case |
---|---|---|
Full Report | Complete analysis with coverage metrics | Comprehensive project review |
Management Report | Test case status and organization | Project management and planning |
Execution Report | Detailed test results and outcomes | Debugging and issue resolution |
Compound test cases are beneficial when:
- Testing complex interactions between functions
- Validating integration scenarios
- Performing system-level testing
- Meeting regulatory compliance requirements
Enable compound tests when your testing strategy requires comprehensive integration coverage.
Project Size | Functions | Processing Time | Memory Usage |
---|---|---|---|
Small | < 50 | 30-60 seconds | < 100MB |
Medium | 50-200 | 2-5 minutes | 100-300MB |
Large | 200-500 | 5-15 minutes | 300-500MB |
Enterprise | 500+ | 15+ minutes | 500MB+ |
Benchmarks based on standard hardware (Intel i5, 8GB RAM, SSD)
Symptoms: Error message about missing clicast.exe
Solutions:
- Verify VectorCAST installation: Check if
C:\VCAST\clicast.exe
exists - Update the path in the script if VectorCAST is installed elsewhere
- Add VectorCAST to your system PATH
Symptoms: Script fails to locate .env
file
Solutions:
- Ensure you're running the script from the correct directory
- Verify the environment file exists and has the correct naming convention
- Check file permissions and accessibility
Symptoms: VectorCAST commands return error codes Solutions:
- Verify VectorCAST environment is properly configured
- Check that the environment file is valid and not corrupted
- Ensure sufficient disk space and permissions
- Review VectorCAST logs for detailed error information
Symptoms: Cannot create directories or move files Solutions:
- Run with administrator privileges (Windows) or sudo (Linux/macOS)
- Check directory write permissions
- Ensure antivirus software isn't blocking file operations
Enable verbose output for troubleshooting:
# Add at the beginning of the script
import logging
logging.basicConfig(level=logging.DEBUG)
- 📧 Email support: [email protected]
We welcome contributions from the community! Here's how you can help:
- 🐛 Bug Reports: Help us identify and fix issues
- 💡 Feature Requests: Suggest new functionality
- 📝 Documentation: Improve guides and examples
- 🧪 Testing: Help test new features and edge cases
- 💻 Code Contributions: Submit pull requests with improvements
# Fork and clone the repository
git clone https://github.com/yourusername/vectorcast-unit-test-generator.git
cd vectorcast-unit-test-generator
# Create feature branch
git checkout -b feature/amazing-new-feature
# Install development dependencies
pip install -r requirements-dev.txt
# Run tests
python -m pytest tests/
# Check code quality
flake8 .
black --check .
- Code Style: Follow PEP 8 and use Black for formatting
- Documentation: Update docstrings and README for new features
- Testing: Include unit tests for new functionality
- Commit Messages: Use conventional commit format
- Pull Requests: Provide clear descriptions and link related issues
Contributors are recognized in our CONTRIBUTORS.md file and project documentation.
- Command Injection: All user inputs are validated and sanitized
- File Operations: Restricted to project directory scope
- Permissions: Follows principle of least privilege
- Audit Trail: Comprehensive logging for compliance requirements
This tool supports various compliance standards:
- ISO 26262: Automotive functional safety
- DO-178C: Aviation software certification
- IEC 61508: Functional safety standards
- FDA 21 CFR Part 820: Medical device quality system
- GUI interface for non-technical users
- Integration with popular CI/CD platforms
- Enhanced reporting with interactive dashboards
- Support for parallel test execution
- Cloud-based report storage and sharing
- Advanced analytics and trend analysis
- Integration with test management tools
- Multi-language support
- Machine learning-based test optimization
- Real-time collaboration features
- Enterprise-grade scalability improvements
This project is licensed under the MIT License - see the LICENSE file for details.
- ✅ Commercial use allowed
- ✅ Modification allowed
- ✅ Distribution allowed
- ✅ Private use allowed
- ❌ No liability or warranty
- VectorCAST Team: For providing excellent testing tools and comprehensive CLI
- Python Community: For outstanding libraries and development practices
- Contributors: All developers who have contributed to this project
- Beta Testers: Quality assurance professionals who helped refine the tool
- Open Source Community: For inspiration and best practices
- LinkedIn: Suduli
- GitHub: Project Repository
Built with ❤️ for the software engineering community. Empowering quality assurance professionals worldwide.
⭐ If this project has been helpful, please consider starring it on GitHub to show your support!