FOSMVVM ViewModel Test Generator for Openclaw

A specialized generator for creating Swift ViewModel tests that validate data integrity, versioning, and multi-locale localization.

foscomputerservices
v2.0.6
Feb 22, 2026
0
1.3k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install fosmvvm-viewmodel-test-generator

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install fosmvvm-viewmodel-test-generator using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is FOSMVVM ViewModel Test Generator?

The FOSMVVM ViewModel Test Generator is a developer-centric tool within the Openclaw Skills library that automates the creation of robust test suites for FOSMVVM-based applications. It focuses on three critical pillars of ViewModel reliability: ensuring Codable round-trip integrity, maintaining structural versioning stability, and verifying that all @LocalizedString properties are correctly translated across various locales. This skill helps developers maintain high-quality codebases by replacing manual test boilerplate with standardized, architecture-aligned testing patterns.

By utilizing the LocalizableTestCase protocol, the skill integrates seamlessly with modern Swift testing frameworks. It allows developers to quickly verify that their ViewModels can encode and decode without data loss and that every user-facing string is accounted for in the project's localization files, making it an essential part of the Openclaw Skills suite for iOS and macOS development.

FOSMVVM ViewModel Test Generator Use Cases

  • Generating test files for new ViewModels to ensure 100% localization coverage.
  • Retrofitting existing ViewModels with versioning and encoding stability tests.
  • Validating complex string substitutions and localized sub-properties.
  • Ensuring nested child ViewModels are correctly handled during serialization.
  • Scaling localization testing across multiple project locales automatically.

How FOSMVVM ViewModel Test Generator Works

  1. The skill identifies the target ViewModel from the active conversation context within the Openclaw Skills environment.
  2. It extracts localization requirements by scanning the ViewModel for @LocalizedString attributes.
  3. It maps out the hierarchy of nested ViewModels that require data validation and YAML support.
  4. A Swift test suite is generated that conforms to the LocalizableTestCase protocol, including necessary imports and store initialization.
  5. Supporting YAML files are created or updated to provide the necessary translation data for the automated test runs.

FOSMVVM ViewModel Test Generator Setup

To integrate this into your workflow, ensure your project is configured with the FOSMVVM architecture and has access to FOSFoundation and FOSTesting. Run the following command in your agent interface:

/fosmvvm-viewmodel-test-generator

No manual file path input is required as the skill leverages the existing context of your Openclaw Skills session to identify the ViewModels discussed in your conversation.

FOSMVVM ViewModel Test Generator Data Schema & Taxonomy

The skill follows a strict file organization schema to maintain project cleanliness and compatibility with Openclaw Skills standards:

File Type Naming Convention Directory Path
Test Suite {Name}ViewModelTests.swift Tests/{Target}Tests/Localization/
YAML Data {Name}ViewModel.yml Tests/{Target}Tests/TestYAML/

It utilizes the LocalizableTestCase infrastructure, which requires a LocalizationStore initialization and access to the resource bundle via the project's resource accessor defined in your SPM target.

FOSMVVM ViewModel Test Generator Advanced Features

  • Multi-locale verification including default support for English and Spanish, with easy extension to custom locales.
  • Full Codable round-trip testing using specialized localized JSON encoders.
  • Automated versioning stability checks to prevent unintended data structure changes in serialized ViewModels.
  • Support for testing private ViewModel structs and internal testing scenarios.
  • Deep hierarchy validation that ensures parent-child ViewModel relationships are correctly localized and encoded.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*