/quick-test

/quick-test generates unit tests.

Use it to quickly create a basic set of tests covering key behaviors of your code.

Using /quick-test

  1. Open a file: Open a file in your project.

  2. Activate Sectum AI: Click the Sectum AI logo in the Extensions bar.

  3. Focus: Select the part of the code you want to generate a quick test for. It could be a few lines of code, a method, an entire file, your local changes and more.

  4. Call the Command: Type /quick-test in the chatbox.

  5. (Optional) Add optional instructions: You can give Sectum AI any specific guidelines.

  6. Result! Sectum AI will generate a test tailored for your code.

  7. (Optional) Continue your chat: To give Sectum AI more instructions, just type a command or ask a question to keep chatting.

Example

Given this code snippet:

Copy

Copy

function sayHello(name) {
    return "Hello World! I'm " + name;
}

const user = "Username";
const hello = sayHello(user);

console.log(hello);

Command

Copy

Copy

/quick-test [optional instructions]

Response

Sectum AI will analyze your code, identifying key behaviors to create focused and effective test cases. Click on any behavior to understand its testing significance.

Happy Path:The function should return a greeting message that includes the provided name.

Last updated