Automated integration test generation at the fingertips of devs
What every developer wants:
- No mindless setup work
- Easy integration with existing workflows
- Quick iterations to find issues
Skyramp makes it easy to:
- Track coverage
- Identify the missing integration tests you need
- Generate reliable test code
Skyramp includes three core functions:
Mocker: Easy-to-set-up Mock Server
- Supply static & dynamic mocks
- Control dependencies
Tester: Easy-to-set-up Test Client
- Trigger functional & load tests
- Test any part of the system
Deployer: Selective Deployment Tool
- Deploy & update services under test
- Iterate quickly & track coverage
Feedback Request: Help Us Improve!
Your insights are invaluable to us! As a small team dedicated to simplifying distributed application testing, we're eager to improve.
Please take a moment to visit this link and share your feedback on our Kubernetes Test Toolkit extension. Whether it's bugs you've encountered or solid suggestions, your input is incredibly important.
We'll review all entries with gratitude, prioritizing your feedback to continue refining our toolkit. ✨
Have questions, need support, or want to connect with other developers using Skyramp? Join our Discord community!
Join Discord
Getting Started
1. Set Up a Kubernetes Cluster
First, run the Set Up Cluster
command to configure a Kubernetes cluster to use with Mocker and Tester.
Note: Please be aware that provisioning a local cluster is supported only on MacOS or Linux. On Windows, you can only connect to an existing cluster.
2. Deploy New Worker Container
Next, install the Worker container in your cluster by running the Deploy New Worker Container
command.
Mocker
How Mocker works
Mocker consists of 3 parts:
- A container that is deployed inside your Kubernetes cluster or in Docker. It contains the core logic for implementing mocks and handles networking for the mocks.
- A mock configuration file that captures the signatures for the endpoints you want to mock and corresponding static mock responses. It is automatically generated from an OpenAPI or protobuf API spec. Mock values can be easily edited as needed.
- Optional Javascript runtime support to enable dynamic mocking for complex test cases.
1. Generate Mock
When you're ready to mock a service, run the Generate Mock
command to generate a mock configuration in the form of a .yaml
file in the mocks folder of your working directory. You will be prompted to select an API schema file to mock against, and input some necessary configuration details including the Kubernetes service name, port number, and proto service name (if applicable).
Tip: We recommend running the generate command in your source code repo so mocks are versioned and shareable across your team.
2. Edit Mock
Mocker generates default values for responses based on the API signature. You can edit the default values by editing the generated mock in the mocks folder.
Note: Read more about writing mock configurations in the Skyramp docs
3. Apply Mock
Now, you can push the mock configuration to Mocker by running the Apply Mocks
command:
That’s it! All calls to the mocked service/s are now routed to Mocker and it responds with the default values in the configuration.
Note: Mocker does not automatically update the mocks when the responses are updated in the mock configuration file. You can run the Apply Mocks
command again when your mock values change.
Note: When mocking a gRPC service the container needs to be redeployed if the proto definition of the mock changes.
Tester
How Tester works
Tester consists of 3 parts:
- The core logic for running tests that lives in the Skyramp worker (which can be deployed in a variety of ways, such as as a container in a Kubernetes cluster).
- A test description that captures the instructions for running the test (what is called, where the call is made to, how the response should look, etc.).
- Javascript support for specifying pre-execution steps, post-execution steps, or for creating inputs for load tests.
1. Generate Test
When you're ready to test a service, run the Generate Test
command to generate a test configuration in the form of a .yaml
file in the tests folder of your working directory. You will be prompted to select an API schema file to test against, and input some necessary configuration details including the test name, Kubernetes service name, port number, and proto service name (if applicable).
2. Edit Test
Tester generates default values for requests based on the API signature. You can edit the default values and add request steps by editing the generated test in the tests folder.
Note: Read more about Tester and writing test configurations in the Skyramp docs
3. Start Test
Now, you can start the test configurations by running the Start Test
command:
That’s it! Tester will execute the test and output on the test results in the results
output directory.
Requirements
Helm
The Worker container is installed in your cluster via Helm. In case you don’t have Helm installed, refer to Helm’s documentation to get started.
Telemetry
This extension collects telemetry data to help us build a better experience for using Kubernetes Test Toolkit and VS Code. We only collect the following data:
- Usage information and error's diagnostic information.