From cbccdafb51608f19fecef6eac2cfbcc1f0774fcd Mon Sep 17 00:00:00 2001 From: Almog Lavi Date: Fri, 15 Mar 2024 13:34:03 +0200 Subject: [PATCH] Refine documentation for test generation behaviors and usage instructions --- docs/tests/behaviors.md | 8 ++++---- docs/tests/how-to-use.md | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/tests/behaviors.md b/docs/tests/behaviors.md index 78a3135..44c169f 100644 --- a/docs/tests/behaviors.md +++ b/docs/tests/behaviors.md @@ -1,14 +1,14 @@ # Understanding Behaviors in Test Generation ## Overview -In the journey of test generation, Codiumate employs a sophisticated approach to analyze your code thoroughly. It extends beyond mere syntax analysis, incorporating an understanding of dependencies and imports to grasp the full context of your code's functionality. This comprehensive analysis leads to the identification of various behaviors your code exhibits. +In the journey of test generation, Codiumate employs a sophisticated approach to thoroughly analyze your code. This analysis extends beyond mere syntax, incorporating an understanding of dependencies and imports. This comprehensive view helps grasp the full context of your code's functionality, leading to the identification of various behaviors your code exhibits. ## Behavior Categories Codiumate categorizes identified behaviors into three main types, each representing a different aspect of how your code operates: - **Happy Path**: Behaviors under this category represent the ideal and expected use cases of your code, where everything operates as intended without any errors or exceptions. -- **Edge Case**: These are behaviors that occur at the boundaries of your code's logic, handling unusual or extreme inputs or scenarios that might not be immediately obvious. -- **Other**: This catch-all category encompasses behaviors that do not neatly fit into the first two categories, including less common use cases or those that require special consideration. +- **Edge Case**: Behaviors that occur at the boundaries of your code's logic, handling unusual or extreme inputs or scenarios that might not be immediately obvious. +- **Other**: A catch-all category that encompasses behaviors not fitting neatly into the first two categories, including less common use cases or those requiring special consideration. ## Exploring Sub Behaviors Each identified behavior can be expanded to reveal its sub behaviors, which are more specific instances or variations of the main behavior. This allows for a granular understanding of how your code functions in different scenarios. To explore sub behaviors: @@ -21,7 +21,7 @@ Codiumate not only identifies behaviors but also automatically generates tests f - **Select More Behaviors**: Beyond the initial selection, you can choose additional behaviors or sub behaviors for which you want tests to be generated. - **Create Custom Behaviors**: If a specific behavior you're interested in is not listed, Codiumate allows you to define it manually: - 1. **Add Behavior**: Enter a natural language description of the desired behavior in the "Add behavior" field. + 1. **Add Behavior**: In the behavior analysis section, enter a natural language description of the desired behavior in the "Add behavior" field. 2. **Generate Test**: Click the "Add and Generate" button to create a test based on your custom behavior description. By leveraging the behavior analysis and test generation capabilities of Codiumate, you can ensure comprehensive test coverage, capturing the full spectrum of how your code operates—from the most common scenarios to the edge cases that could lead to unexpected behavior. diff --git a/docs/tests/how-to-use.md b/docs/tests/how-to-use.md index edd1e08..62d1ad1 100644 --- a/docs/tests/how-to-use.md +++ b/docs/tests/how-to-use.md @@ -7,13 +7,13 @@ Test Generation is a standout feature of Codiumate, designed to streamline and e There are multiple pathways to initiate test generation, catering to your workflow and preferences: ### From the Chat -- **`/test-suite` Command**: Execute the `/test-suite` command on selected code within the chat interface to trigger test generation. +- **`/test-suite` Command**: Execute the [`/test-suite`](../chat/commands/test-suite.md) command on selected code within the chat interface to trigger test generation. ### From the Editor 1. **Codiumate Test Lens**: Click the "Codiumate: test" lens button appearing above every function, class, or method. 2. **Context Menu**: Right-click on any selected code or component name and select "Codiumate - Test this component" from the context menu. -3. **Command Palette in VSCode**: Highlight the desired code, open the command palette, and execute "Codiumate: Generate tests." -4. **JetBrains IDE**: Click on the Codiumate icon located near every identifiable component. +3. **Command Palette (In VSCode)**: Highlight the desired code, open the command palette, and execute "Codiumate: Generate tests." +4. **Codiumate Button (In JetBrains)**: Click on the Codiumate icon located near every identifiable component. ## The Advanced Panel