fosmvvm-viewmodel-test-generator
Generate ViewModel tests with codable round-trip, versioning stability, and multi-locale translation verification.
Why use this skill?
Automate FOSMVVM ViewModel testing with the fosmvvm-viewmodel-test-generator. Ensure Codable round-trips, versioning stability, and localization coverage.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/foscomputerservices/fosmvvm-viewmodel-test-generatorWhat This Skill Does
The fosmvvm-viewmodel-test-generator is a specialized automation skill designed to streamline the quality assurance process for FOSMVVM-based architectures. Its primary function is to programmatically generate robust Swift test suites that validate ViewModels against three rigorous standards: Codable round-trip integrity, versioning stability, and comprehensive multi-locale localization coverage. By utilizing the LocalizableTestCase protocol, the skill ensures that ViewModels remain consistent as they evolve, preventing regressions in serialized data formats and ensuring that all @LocalizedString properties are correctly resolved across every supported language. It automatically handles the boilerplate setup for testing environments, including localization store initialization and target-specific test file generation, allowing developers to focus on business logic rather than plumbing.
Installation
To integrate this skill into your development workflow, ensure you have the OpenClaw agent initialized in your project repository. Run the following command in your terminal or via the OpenClaw interface:
clawhub install openclaw/skills/skills/foscomputerservices/fosmvvm-viewmodel-test-generator
Once installed, the skill will be available to analyze your ViewModel files and generate corresponding test structures in the designated Tests/ directory of your project.
Use Cases
- Automated Regression Testing: Ensuring that changes to complex ViewModels do not break Codable compliance or break existing localization keys.
- Localization Audits: Rapidly verifying that all localized string resources are correctly mapped and present for every supported locale without manual overhead.
- New Feature Development: Quickly generating the necessary test scaffolding for new ViewModels during the development cycle, enforcing team coding standards from the outset.
- Refactoring Support: Maintaining confidence when modifying internal ViewModel structures, as the generated tests immediately catch serialization mismatches.
Example Prompts
- "Generate a new suite of FOSMVVM tests for the UserProfileViewModel located in the Profile module, ensuring full localization coverage for English and Spanish."
- "Update my existing DashboardViewModelTests to include the latest versioning stability checks and confirm all sub-localization properties are valid."
- "Create a test file for the SettingsViewModel that uses the extended pattern to verify custom currency formatting for the EUR locale."
Tips & Limitations
For the best results, ensure that your ViewModel properties are consistently marked with the required @LocalizedString and @LocalizedSubs attributes. The generator relies on these metadata tags to identify test targets. Note that this skill assumes the existence of a standard FOSMVVM project hierarchy. If your project uses a non-standard folder structure, you may need to specify the path to your resource bundles during the initial setup. Always review generated test files to ensure that mock dependencies used for injection match your current production requirements, as the skill provides a baseline template that may require minor manual adjustments for highly custom business logic implementations.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-foscomputerservices-fosmvvm-viewmodel-test-generator": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: file-write, file-read
Related Skills
fosmvvm-leaf-view-generator
Generate Leaf templates for FOSMVVM WebApps. Create full-page views and HTML-over-the-wire fragments that render ViewModels.
fosmvvm-react-view-generator
Generate React components that render FOSMVVM ViewModels. Scaffolds ViewModelView pattern with hooks, loading states, and TypeScript types.
fosmvvm-fields-generator
Generate FOSMVVM Fields protocols with validation rules, FormField definitions, and localized messages. Define form contracts once, validate everywhere.
fosmvvm-fluent-datamodel-generator
Generate Fluent DataModels for FOSMVVM server-side persistence. Scaffolds models, migrations, and tests for database-backed entities.
fosmvvm-swiftui-app-setup
Set up the @main App struct for FOSMVVM SwiftUI apps. Configures MVVMEnvironment, deployment URLs, and test infrastructure.