-
Notifications
You must be signed in to change notification settings - Fork 0
Testing Strategy
← Architecture Overview · §10 of 15
SolaceCore employs a structured approach to testing its components on the JVM, with dedicated test files located within the lib/src/jvmTest/kotlin/ai/solace/core/ directory, mirroring the package structure of the main codebase. The primary testing framework appears to be JUnit Jupiter, used in conjunction with Kotlin Test utilities and kotlinx-coroutines-test for asynchronous code.
-
Actor Module (
actor/):-
ActorTest.kt: Focuses on unit testing the baseActorclass, covering its lifecycle, state management, port operations, and error handling. -
supervisor/SupervisorActorTest.kt: Contains tests for theSupervisorActor, verifying its capabilities in managing actor registration, unregistration, hot-swapping, and collective lifecycle control. - Functionality of
ActorMessage,ActorState,ActorBuilder, andActorMetricsis likely tested implicitly throughActorTest.ktandSupervisorActorTest.kt.
-
-
Kernel Module (
kernel/):- The test directory
kernel/channels/ports/was found to be empty. This suggests that the core port functionalities defined incommonMainmight be tested indirectly through higher-level components that utilize them (e.g.,ActorTest.kt), or dedicated tests might be planned for the future.
- The test directory
-
Lifecycle Module (
lifecycle/):- The test directory for
lifecyclewas found to be empty. TheDisposableandLifecycleinterfaces are fundamental contracts, and their correct implementation is likely verified within the tests of classes that implement them (e.g.,Actor,StorageManager,WorkflowManager).
- The test directory for
-
Scripting Module (
scripting/):- Demonstrates comprehensive test coverage for its JVM-specific implementations:
-
JvmScriptEngineTest.kt: Tests the (currently simulated) JVM script engine. -
FileScriptStorageTest.kt: Tests file-based script persistence. -
FileScriptVersionManagerTest.kt: Tests file-based script versioning. -
SimpleScriptValidatorTest.kt: Tests the basic script validator. -
ScriptManagerTest.kt: Tests the orchestratingScriptManager.
-
- Demonstrates comprehensive test coverage for its JVM-specific implementations:
-
Storage Module (
storage/):- Exhibits extensive testing across its various facets:
-
Core Implementations: Dedicated tests for both in-memory and file-based versions of
Storage,ActorStateStorage,ConfigurationStorage,TransactionalStorage, and their respectiveStorageManagerclasses (e.g.,InMemoryStorageTest.kt,FileStorageTest.kt,TransactionalFileStorageTest.kt). -
Concurrency: Specific concurrency tests for both
FileStorageManagerandInMemoryStorageManager(e.g.,FileStorageManagerConcurrencyTest.kt). -
Decorators & Strategies: Each decorator and its strategies have dedicated tests:
-
cache/:CachedStorageTest.kt,LRUCachePolicyTest.kt,TTLCachePolicyTest.kt. -
compression/:CompressedStorageTest.kt,GZIPCompressionStrategyTest.kt. -
encryption/:EncryptedStorageTest.kt,AESEncryptionStrategyTest.kt.
-
-
Recovery:
recovery/ActorRecoveryManagerTest.kttests the actor state snapshot and recovery mechanisms. -
Serialization:
-
StorageSerializerRegistryTest.kt(for the commonMain registry). -
serialization/DelegatingSerializableActorStateStorageTest.kt(for the JVM-specific actor state serialization).
-
-
Core Implementations: Dedicated tests for both in-memory and file-based versions of
- Exhibits extensive testing across its various facets:
-
Workflow Module (
workflow/):-
WorkflowManagerTest.kt: Contains unit tests for theWorkflowManager, focusing on its lifecycle, actor and connection management. -
WorkflowExample.kt: Likely serves as an integration test or a runnable example showcasing the setup and execution of a complete actor workflow.
-
- The project follows a convention of placing test classes in packages that mirror the source code they are testing.
- There is a clear emphasis on testing concrete implementations, especially within the storage and scripting modules.
- Special considerations like concurrency for storage managers are explicitly tested.
- Fundamental interfaces like
LifecycleandPortappear to be tested via their implementing classes rather than through direct, isolated tests for the interfaces themselves.
This testing structure suggests a commitment to ensuring the reliability and correctness of SolaceCore's components, particularly for the critical storage and scripting functionalities on the JVM.
← §9 JVM-Specific Utilities (io.github.solaceharmony.core.util) · Architecture Overview · §11 Architectural Vision →
SolaceCore SSOT wiki · published from wiki/ by .github/workflows/publish-wiki.yml · edit the source in the repo, not the wiki.
Orientation
- Architectural Deep Dive
- Architecture Overview
- Design vs Implementation
- Framework Actor System
- Framework Architectural Vision
- Framework Concurrency and Communication
- Framework Data Storage and Management
- Framework Deployment and Containerization
- Framework Development Roadmap
- Framework Hot-Pluggable System
- Framework Implementation Status
- Framework Observability and Monitoring
- Framework Port System
- Framework System Architecture
- Framework Workflow Management
- Project Status
- Project Status Report
- Quick Status
- Solace Core Framework Architecture
- SolaceCore Architecture Overview
- Vision & Solace AI
Runtime
- Actor Builder
- Actor Communication Sequence Diagram
- Actor Core Definitions
- Actor Graph View
- Actor Metrics
- Actor Module Architecture
- Actor Queue Hibernation and Correlation
- Actor Roadmap
- Actor State Recovery Subsystem
- Actor State Serialization Subsystem
- Actor Supervision Module
- Actor System Architecture
- Actor System Class Diagram
- Actor Usage Examples
- Compose App Features
- JVM Scripting Implementations
- Kernel & Ports
- Kernel Channel System
- Kernel Future Enhancements
- Kernel Module Architecture
- Kernel Port Implementations and Exceptions
- Kernel Port Usage Example
- Kernel Testing Strategy
- Lifecycle Class Diagram
- Lifecycle Management Architecture
- Pipeline DSL
- Real-Time UI Implementation
- Scripting Module Architecture
- Scripting Module Design
- Scripting Supporting Components
- Shared Memory
- Storage & Persistence
- Storage Abstractions Architecture
- Storage Caching Subsystem
- Storage Checklist
- Storage Compression Subsystem
- Storage Core Interfaces
- Storage Encryption Subsystem
- Storage File-Based Architecture
- Storage File-Based Implementations
- Storage In-Memory Architecture
- Storage In-Memory Implementations
- Storage JVM Serialization Utilities
- Storage Module Architecture
- Storage Serialization Compression Encryption
- Storage Specialized Interfaces Architecture
- Storage Status and Future Plans
- Storage Testing
- Storage Thread Safety Guide
- Storage Thread Safety and Deadlock Prevention
- Storage Transactions
- Storage Usage Examples
- Supervisor and Hot Swap
- SupervisorActor
- System Architecture Diagram
- Workflow Management Architecture
- Workflow Management Design Concept
- Workflow Orchestration
Solace AI
- Confusion Corrector
- Inference Cube
- Inference Cube Technical Architecture
- Long-Term Memory
- MCP and Tool Format
- Memory & Reflection
- Memory Compression
- Memory Feature Overview
- Memory Retrieval
- Mood & Emotional Model
- Mood Module Implementation
- Mouth Tool Technical Spec
- Multimodal Nudging
- Perception Actors
- Provider Specs
- Reflection Memory
- Solace AI Overview
- Supervisor AI
- Supervisor Emotional Model Integration
- Time Actor
- Voice & Mouth Tool
- Working Memory
- Zoom Level Technical Spec
- Zoom Levels
Reference
- Advanced Workflow Example
- Basic Actor Usage
- Build System and Dependencies
- Development Tooling and Practices
- Documentation Catalog
- Documentation Index
- Feature Index
- Glossary
- How the Wiki Publishes
- JVM Utilities
- Kotlin Implementation Details
- Kotlin-Aligned Architecture Overview
- Kotlin-Aligned Contributing
- Kotlin-Aligned Core Architectural Principles
- Kotlin-Aligned Daily Development Workflow
- Kotlin-Aligned Development Examples
- Kotlin-Aligned Development Workflow
- Kotlin-Aligned Documentation
- Kotlin-Aligned Implementation Status
- Kotlin-Aligned Key Concepts
- Kotlin-Aligned Known Issues
- Kotlin-Aligned Quick Start
- Kotlin-Aligned Running the System
- Kotlin-Aligned System Architecture
- LangChain Actor Code Changes
- LangChain Actor Usage Improvements
- LangChain ActorInterface Code Changes
- LangChain Best Practices
- LangChain Bugs
- LangChain Chain Implementation
- LangChain Code Changes
- LangChain Code Changes Rollout and Impact
- LangChain Configuration Management Improvements
- LangChain Configuration Recommendations
- LangChain Core Architecture Recommendations
- LangChain Directory Structure Changes
- LangChain Documentation Improvements
- LangChain Dynamic Wiring Rollout Notes
- LangChain Fix Proposal
- LangChain Implementation Priorities
- LangChain Lifecycle Management Improvements
- LangChain Memory Integration Recommendations
- LangChain Metrics and Observability Recommendations
- LangChain Migration Strategy
- LangChain New Files Needed
- LangChain New Packages to Add
- LangChain Package-by-Package Improvements
- LangChain Patterns
- LangChain Port Code Changes
- LangChain Port System Recommendations
- LangChain Port Usability Improvements
- LangChain Prompt Management Recommendations
- LangChain Recommendations
- LangChain Recommendations Rollout Plan
- LangChain Required Interface Changes
- LangChain Testing Changes
- LangChain Testing Improvements
- LangChain Testing Recommendations
- LangChain Tool Integration Recommendations
- LangChain Type-Safe Dynamic Wiring
- LangChain Type-Safe Dynamic Wiring System
- LangChain Usage Design Improvements
- Master Checklist
- Roadmap
- Roadmap Issues
- Roadmap Phase 1 Stability and Testing
- Roadmap Phase 2 Production Infrastructure
- Roadmap Phase 3 Documentation and Developer Experience
- Roadmap Phase 4 Graph Database Integration
- Roadmap Phase 5 Security Framework
- Roadmap Phase 6 Distributed System
- Roadmap Phase 7 Advanced Features
- Roadmap Phase 8 Ecosystem Development
- Roadmap Timeline and Success Metrics
- Setup Instructions
- Sketch Architecture
- Status Documentation
- Task 1 Core Tests
- Task 2 Connection Wiring
- Task 3 Concurrency Issues
- Task 4 Dynamic Registration
- Task 5 Integration Tests
- Task 6 Deadlock Detection
- Task Documentation
- Test Coverage Checklist
- Testing Strategy