Test Suite Generation Early Access
New features to the Speakeasy Platform - August 7, 2024
Get Access
If you are interested in participating in early access, please fill out this form (opens in a new tab), or, if you’re an existing customer, drop a note in your Speakeasy Slack connect channel.
If at first you don’t succeed test, test, test again.
We’re excited to announce the early access release of our new Test Generation feature. It empowers developer teams to ship SDKs with confidence that they work as intended for end users.
Test Generation
"use strict";Object.defineProperty(exports, "__esModule", { value: true });const index_js_1 = require("../index.js");const vitest_1 = require("vitest");(0, vitest_1.test)("Analysis Analyze Text", async () => {const beezy = new index_js_1.Beezy({security: {clientID: process.env("BEEZY_CLIENT_ID"),clientSecret: process.env("BEEZY_CLIENT_SECRET"),},});const result = await beezy.analysis.analyzeText({text: "What is the difference between OpenAPI and Swagger?",analysisTypes: ["keywords"],model: "ex-7b",});(0, vitest_1.expect)(result).toEqual({results: [{keywords: ["<value>"],},],});});
What’s Included
- Support for TypeScript, Python, and Go,
- Test creation based on the examples in your OpenAPI spec,
- The ability to specify custom requests and responses for your tests.
How It Works
- Specify the examples you want to use in your OpenAPI spec.
- Optionally specify custom examples via a
tests.yaml
. - Speakeasy generates tests for your SDKs based on the examples you provided.
The generated tests will be created in a new tests
directory in your SDK. For each language, we’ve selected a popular testing framework for the generated tests:
- TypeScript: Vitest (opens in a new tab)
- Python: Pytest (opens in a new tab)
- Go: Testify (opens in a new tab) along with Go’s built-in testing package
🐝 New Features and Bug Fixes 🐛
NOTE
Based on the most recent CLI version: Speakeasy v1.353.1 (opens in a new tab)
TypeScript
🐝 Feat: Readme’s render with environment variable usage
🐛 Fix: Updated .gitignore
rules for TS SDKs
Python
🐝 Feat: Readme’s render with environment variable usage
🐝 Feat: Added Python debug logger interface
🐛 Fix: Buffering of streaming responses and TypedDict unmarshalling in pythonv2
🐛 Fix: Handle consts
in non-json
Go
🐝 Feat: Readme’s render with environment variable usage
Terraform
🐛 Fix: Dependencies upgraded
🐛 Fix: Prevent creating attribute validators for invalid or RE2 engine incompatible OAS pattern
🐛 Fix: Support for flattened security env vars
Java
🐝 Feat: Support for discriminated oneOf
C#
🐝 Feat: Implemented support for x-speakeasy-enums