कंटेंट पर जाएँ
TakoAPI
स्किल्स पर वापस

fosmvvm-serverrequest-test-generator

foscomputerservices द्वारा

DevOps & Cloud
441clawskills.sh द्वारा बताए गए डाउनलोड
2स्टार
0व्यूज़
0 लाइकइस स्किल को लाइक करने के लिए साइन इन करें
—अभी तक कोई रेटिंग नहीं
आपकी रेटिंग

संक्षिप्त

Generate ServerRequest tests using VaporTesting.

विवरण

यह स्किल क्या करती है

Generates test files for ServerRequest types using VaporTesting infrastructure. Tests are built around typed request/response validation, covering Show, Create, Update, and Delete operations without manual URL construction or JSON encoding.

Using app.testing().test(request, locale:) instead of manual URL strings or URLSession keeps tests type-safe and path-derivation automatic.

इसे कब इस्तेमाल करें

  • Testing a ShowRequest returns the correct ViewModel for a given ID
  • Verifying CreateRequest rejects empty input with a 400 status
  • Running the same request across English and Spanish locales
  • Confirming a DeleteRequest removes an entity and subsequent Show returns 404
  • Testing UpdateRequest reflects changed field values in the response body

उदाहरण वर्कफ़्लो

इनपुट

User asks: generate tests for IdeaShowRequest covering success and not-found cases

एजेंट
  1. 1

    Reads ServerRequest type from conversation context to identify query params and ResponseBody type

  2. 2

    Plans test scenarios: success path with valid ID, not-found path with invalid ID

  3. 3

    Generates IdeaRequestTests.swift with @Suite and two @Test functions

  4. 4

    Adds withTestApp helper that registers IdeaController and calls withApp

  5. 5

    Writes typed assertions on response.status and response.body using app.testing().test()

आउटपुट

Tests/WebServerTests/Requests/IdeaRequestTests.swift with showRequest_success and showRequest_notFound test methods

इंस्टॉलेशन

clawhub install foscomputerservices/fosmvvm-serverrequest-test-generator

CLI कमांड चलाएँ, या प्रॉम्प्ट को Claude Code, Cursor, Codex या जो भी कोडिंग एजेंट आप इस्तेमाल करते हैं उसमें पेस्ट करें।

लिंक