LogoLogo
Tabnine websiteContact Sales
  • 👋Welcome
    • Overview
      • Architecture
        • Deployment options
      • Security
      • Privacy
      • Protection
        • Provenance and Attribution
      • Personalization
        • Tabnine’s Personalization in Depth
        • Connection: Global Codebase Awareness
      • AI Models
        • Tabnine's private and protected Universal models
        • Tabnine's fine-tuned AI models
      • Integrations
        • Atlassian Jira
      • System Requirements
      • Supported Languages
      • Supported IDEs
      • Tabnine Subscription Plans
        • Dev Preview
        • Dev
        • Pro
        • Enterprise (SaaS)
        • Enterprise (private installation)
    • Support & Feedback
  • 🚀Getting started
    • Install
      • Client setup (SaaS)
        • VS Code
          • Install Tabnine in VS Code
          • Activate Tabnine in VS Code
        • JetBrains IDEs
          • Install Tabnine in a JetBrains IDE
          • Activate Tabnine in a JetBrains IDE
        • Visual Studio
          • Install Tabnine in Visual Studio 2022
          • Activate Tabnine in Visual Studio 2022
        • Eclipse
          • Install Tabnine in Eclipse
          • Activate Tabnine in Eclipse
        • Sign in
          • Using an email
          • Using an authentication token
      • Client setup (private installation)
        • Join your team (private installation)
        • VS Code (private installation)
        • JetBrains IDEs (private installation)
        • Visual Studio (private installation)
        • Eclipse (private installation)
    • Quickstart Guide
      • Menus and Icons
    • Getting the Most from Tabnine Code Completions
      • Pause (snooze)
    • Getting the Most from Inline Actions
    • Getting the Most from Tabnine Chat
      • Launching Tabnine Chat
      • Interacting with Tabnine Chat
      • Reviewing suggestions
      • Writing prompts
      • Chat Context
        • Understanding Context
        • Jira Connection
        • Context Scoping
      • Conversing with Tabnine Chat
      • Switching between chat AI models
      • Image Prompts
      • Tabnine's Prompting Guide
        • Getting Started
        • Basic Prompting
          • Be specific and clear
          • Define the context
          • Start a fresh conversation as appropriate
          • Include necessary details
          • Ask for examples
          • Be concise but complete
  • 💪Software Development with Tabnine
    • Overview
    • Plan
    • Create
    • Test
      • Intro to the Test Agent
      • Test Agent Workflow
      • Custom Commands
      • Generate Test Files with @Mentions
    • Review
    • Fix
    • Document
    • Explain
    • Maintain
  • 🏭Administering Tabnine
    • Start a team
    • Manage a team
    • SaaS
      • Tabnine Pro team admin
        • Purchase Tabnine Pro
        • Adding and inviting users to Tabnine Pro
        • Assigning an admin role to a team member
        • Removing a team member
        • Tabnine Pro: Manage subscription and billing
        • Tabnine Pro - Change your payment method
        • Tabnine Pro - Change plan from monthly to annual
        • Unsubscribe from Tabnine Pro plan
      • Joining a Tabnine Pro team
      • Enterprise (SaaS) team admin
        • Set up a Tabnine Enterprise (SaaS) account
        • Invite team members
        • Manage your team
        • AI models for Chat (Enterprise SaaS)
      • Enterprise (SaaS) team member
        • Join your Tabnine team by invitation email (team member)
        • Join Tabnine team by link (member)
    • Private installation
      • Server setup guide
        • Kubernetes (MicroK8s) Installation guide
        • Deployment guide
          • Tabnine update guide
        • Air-gapped deployment guide
      • Admin guide
        • Monitoring Tabnine
        • Prometheus Operator install
        • Audit logs
      • Managing your team
        • Tabnine teams
        • Roles in an enterprise
        • Inviting users to your team
        • Deactivating and reactivating users
        • Deleting PII data of a deactivated user
        • Reset user's password
        • Usage reports
          • Reports Glossary
          • CSV-based reports (V2)
            • Configuring scheduled CSV reports
            • CSV-based reports V1 (Depracted since version 5.7.0
          • Usage API
        • Settings
          • General
          • Single Sign-On (SSO)
          • Personalization (f.k.a. Workspace)
            • Connecting to Remote Repositories
          • Email
          • License
          • Models
          • Access Tokens
        • IdP Sync
      • Release Notes
  • 📣Product Updates
    • What's new?
      • What's new? (August 2024)
      • What's new? (July 2024)
      • What's new? (June 2024)
      • What's new? (May 2024)
      • What's new? (April 2024)
      • What's new? (March 2024)
      • What's new? (February 2024)
      • What's new? (January 2024)
Powered by GitBook
On this page
  • Generating Test Suggestions
  • Insert Test Code into Test File
  • Modifying Test Cases
  • Adding Custom Test Cases

Was this helpful?

  1. Software Development with Tabnine
  2. Test

Test Agent Workflow

How does the Test Agent work?

Last updated 3 months ago

Was this helpful?

Generating Test Suggestions

To generate test suggestions, head to the snippet of code or function in the code that you want to test.

Above the relevant snippet, you will see the code lens menu from Tabnine (This will look different depending on the IDE). In Visual Studio Code, everything in the menu, aside from the word “Tabnine” itself (in JetBrains IDEs, the Tabnine logo itself), is clickable:

Tabnine | Edit | Test | Explain | Document | Ask

To open the Tabnine test agent, do one of the following three things:

  1. Click Test above the code snippet. The test widget will open to the left side of the screen (in Visual Studio).

  2. Go to the Test panel next to the Chat panel

  3. Write /test in the Chat window

As mentioned in our Chat documentation, Tabnine makes use of the full context of your requests. That includes existing testing files and open project files.

You will see a window open asking if you do or do not already have a test file. You will have the option to either locate it or select a location for generating a new one:

Updating the Test Plan State / Regenerating Test Suggestions

Once you've loaded the tests you want, update the Test Plan window by hitting the cycling ⟳ symbol in the upper righthand corner of the Test plan window:

Return to the Test Plan Window

At any time, you can return to the Test plan window by clicking the beaker icon between the chat icon and the Settings cog:

Insert Test Code into Test File

You will see multiple options for inserting the suggested testing code into the test file. The three options are:

  1. Apply

  2. Insert

  3. Copy

Apply

Hitting "Apply" is the simplest of the options. For the test code, Tabnine will automatically place it at the end as the last segment of code in the file.

Insert

Insert is somewhat more like human-in-the-loop (HITL), where you deliberately select the placement of the test code by pre-clicking the location. You will see the text cursor floating / blinking there. In this situation, you have to be sure the correct location is marked.

Copy

Copying the code is the most manual process. Some might prefer this when wanting to be extra precise that the code is not errantly put in the wrong place.

Here, copy the code, THEN navigate to where you want it, and only then finally paste it.

Modifying Test Cases

In the text bar below the selected test, write in how you want to modify the test. After a few seconds, the regenerated test will be available.

If you had already applied or inserted the previous version of that test into the code, Tabnine will pinpoint what to replace.

Simply press Apply, then the new test language will appear highlighted over the previous testing language. Press Alt+A on the keyboard or ✓ Accept the change (Alt+A) above the highlighted section to implement the new test:

Adding Custom Test Cases

Below the full list of suggested tests, you can request the generation of another test.

In our example, our word game should also come up with results that uses letters more than once, so we ask Tabnine to create such a test:

💪