Skip to content

Commit

Permalink
Refine documentation for test generation behaviors and usage instruct…
Browse files Browse the repository at this point in the history
…ions
  • Loading branch information
almog-lv committed Mar 15, 2024
1 parent a8d396f commit cbccdaf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions docs/tests/behaviors.md
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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.
6 changes: 3 additions & 3 deletions docs/tests/how-to-use.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit cbccdaf

Please sign in to comment.