Back to blog
Other

Test Suite Generation Early Access

Nolan Sullivan

Nolan Sullivan

August 7, 2024 ยท 3 min read

Test Suite Generation Early Access

Get Access

If you are interested in participating in early access, please fill out this form, 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

  1. Specify the examples you want to use in your OpenAPI spec.
  2. Optionally specify custom examples via a tests.yaml.
  3. 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:


๐Ÿ New Features and Bug Fixes ๐Ÿ›

Note

Based on the most recent CLI version: Speakeasy v1.353.1

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

Last updated on

AI everywhere.

Control here.