Symflower for Visual Studio CodeJava unit test generator | Automatically generates test templates & high-coverage JUnit test suites for Java, Spring, and Spring Boot applications. Extend Visual Studio Code with three new features:
Symflower automatically generates boilerplate test code and high-coverage test suites (beta feature) for Java, Spring and Spring Boot applications. The extension also provides inline, test-backed code diagnostics in real time. Visit us at https://symflower.com. To start using Symflower follow these steps:
Writing and maintaining test code and tests with SymflowerWhat is Symflower? | Install guide | Getting started | Symflower blog Table of contents
Feature overview1. Generate Test TemplateWrite new test cases faster. Stop spending time on boilerplate code for your tests and instead focus on your test scenarios. Use Symflower to instantly generate all your boilerplate: imports, annotations, object initializations, calls, assertions and more. Symflower provides dedicated testing for Spring and Spring Boot applications which includes testing for Spring Boot controllers, repositories, and services. 2. Generate Test Suite (BETA)Thoroughly test your code by generating a complete test suite that covers all unique paths of a function. Find edge cases, reproduce bugs faster, and decide which tests you want to add to your test suite. This feature is in a beta version with limitations when generating test suites for code with dependencies. Stay tuned for future updates and if you run into a problem, please send us your feedback via our community issue tracker or via email at hello@symflower.com. 3. Test-backed DiagnosticsDiscover and reproduce runtime exceptions. Symflower uses auto-generated tests to highlight potential unhandled exceptions in real time as you code. The underlying tests tell you immediately what types of values cause the exception. Quick startCopy.javaTo follow the feature tutorials below, start by copying the following code into a file named "Copy.java":
Tutorial: Generate Test TemplateUse the above sample code (Copy.java) and right-click anywhere in the function to open the context menu. Then click "Symflower: Generate Test Template for Function”. The following new test template will be added to your code base:
Now all that is left is properly naming the method and replacing the sample values according to your test scenario. Tutorial: Generate Test Suite (BETA)Use the above sample code (Copy.java) and right-click anywhere in the function to open the context menu, then click "Symflower: Generate Test Suite for Function”. Symflower will analyze the source code and generate a virtual file with the following test cases:
The above test cases include one test for each unique execution path of your code. To easily copy them from your virtual file to your actual test suite, use the Commands
Supported languages & technologiesSymflower is currently only available for Java (versions 1-17, partly version 18-21). Supported technologies:
Requirements
DocumentationFor more information you can browse the Symflower documentation and Symflower’s changelog. CommunityJoin the Symflower community on GitHub to submit issues and to discuss questions, problems, and solutions with other Symflower users. Find us at https://github.com/symflower/symflower. FeedbackPlease send us your questions, experience, or problems with Symflower. Your feedback helps us further improve this plugin. If you are missing a feature or found a problem that you think should be fixed, please open an issue on our community issue tracker or write us an email at hello@symflower.com. Subscribe to the Symflower newsletter to receive updates on new features, use cases and topics on software development. |