Generate a test
We understand that writing tests from scratch can be time-consuming and challenging. That's why Tesmon leverages AI technology to automatically generate tests for you.
VS code extension
Tesmon has developed a VS Code extension to make it simple for developers to generate tests using our AI technology. With this plugin, developers can generate tests and execute them directly within the VS Code editor. This feature significantly reduces the time and effort required to generate and run tests, making testing more efficient and accessible to developers.
We understand that not all developers use VS Code, so we're working on developing plugins for other popular code editors as well. Stay tuned for more updates on this front!
Steps to generate a test
- Open your test file in the Visual Studio Code editor.
- Locate the section where you want to define your test case.
- Write a YML comment to describe your test case, including the necessary details. For example:
# Test case to produce a kafka message to localhost on topic order_events with payload orderId
- Open the VS Code command window by pressing
Ctrl + Shift + P(Windows/Linux) or
Cmd + Shift + P(Mac).
- Type "Tesmon" and select the "Tesmon: Generate Test" command from the command palette.
- Tesmon will automatically parse the YML comment in the file and generate the corresponding test case.