fosmvvm-serverrequest-test-generator

Generate structured ServerRequest tests for Vapor servers using VaporTesting.

3|2|Updated Apr 9, 2023
One-click install
npx skills add https://github.com/foscomputerservices/FOSUtilities --skill fosmvvm-serverrequest-test-generator
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: fosmvvm-serverrequest-test-generator
Source: https://github.com/foscomputerservices/FOSUtilities/tree/main/.claude/skills/fosmvvm-serverrequest-test-generator
Command: npx skills add https://github.com/foscomputerservices/FOSUtilities --skill fosmvvm-serverrequest-test-generator

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill automates the creation of standardized ServerRequest tests, removing manual boilerplate and ensuring consistent test coverage across ShowRequest, ViewModelRequest, CreateRequest, UpdateRequest, and DeleteRequest against Vapor servers.

Core Features & Use Cases

  • Generates test suites that validate request handling, response bodies, and error paths using VaporTesting and the TestingApplicationTester.
  • Supports multi-locale testing and localization verification for responses that include localized content.
  • Provides templates and guidance for integrating tests into existing Swift Package Manager projects, including route registration and test helpers.

Quick Start

Use the fosmvvm-serverrequest-test-generator to scaffold a complete ServerRequest test suite for a given feature.

Frequently Asked Questions about fosmvvm-serverrequest-test-generator

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate VaporTesting tests for ServerRequest types in Swift?

To generate VaporTesting tests for ServerRequest types in Swift, use a test generator to scaffold structured test suites for ShowRequest, CreateRequest, UpdateRequest, and DeleteRequest against Vapor servers. This removes manual boilerplate and ensures consistent test coverage for request handling and error paths.

What is the best way to test multi-locale responses with VaporTesting's TestingApplicationTester?

Testing multi-locale responses with VaporTesting's TestingApplicationTester involves generating locale-aware assertions that verify localized content in your server responses. This allows you to validate request handling and response bodies across different locales automatically.

Can I integrate generated ServerRequest test files into existing Swift Package Manager projects?

Yes, you can integrate generated ServerRequest test files into existing Swift Package Manager projects. The generated tests provide templates and guidance for route registration and test helpers, ensuring they fit smoothly into your current SPM setup.

Does this approach to ServerRequest testing cover error handling and localization verification?

Yes, this approach to ServerRequest testing covers both error handling and localization verification. It targets typical scenarios such as successful responses and error paths, while enabling multi-locale verification through VaporTesting's TestingApplicationTester.

What are the limitations of automating Vapor server request test generation for CRUD operations?

A limitation of automating Vapor server request test generation for CRUD operations is that it targets typical scenarios like successful responses, error handling, and localization, meaning highly custom request flows may require manual modifications to the generated test templates.