Sapient AI VS Code Extension GuideThis guide will help you understand how to use the Sapient AI VS Code extension to generate and run unit tests automatically. Table of ContentsLoginOnce the extension is installed, click on Proceed for user authentication. Sign InUpon clicking 'Proceed', it will open a web tab where you can choose your preferred login method.
CodeLens FeatureClick on the 'Generate Tests' CodeLens above a method or class, or use the option via right-click to automatically generate and run unit tests. Setup Your ProjectComplete your setup by adding the task to your build file. If the popup for 'Setup Complete' appears, you can safely proceed to the next step.
Building Project and Generating TestsAfter the build is successful, the Sapient panel will show you the step-by-step generation of the tests.
Proceeding with Test GenerationAfter analyzing and building the project file, the extension will show 'Generating Tests' and will start building the test file.
Running Tests and Viewing ResultsYou can access the test file by clicking 'Building Test File'. After the test run is complete, you will be able to see detailed results such as pass/fail status for each method tested. The results will be color-coded for clarity.
Additional InformationYou can always refer to the Sapient AI panel for more detailed steps and logs as you proceed with the test generation and execution process. For further assistance, feel free to explore the official documentation or reach out to support. |