Code (Repository-to-Test Case)

When to Use Code Repository Analysis: Use this feature when you want to generate test cases by analysing code from connected repositories. Walnut AI scans the repository, understands the application logic, and helps generate structured test cases.

Steps to Generate:

  • Select Code Repository: Click Code under Generate Test Cases.

  • Connect Repository: If no repositories are connected, click Add Repo to navigate to the Connect Repository page and link your Git provider. If the project does not have an Code Repository tools connected, you will be automatically redirected to setup the Code Repository platform integration with WalnutAI so that you can connect with your code repository.

  • Choose Repository: Select one or more connected repositories and click Add Selected Repositories.

  • Discover Modules: Walnut AI scans the repository and identifies logical modules based on the repository structure and code patterns.

  • Select Modules: Choose the relevant modules you want to analyze and click Continue to Chat.

  • Generate Test Cases: Use the Walnut AI Chatbot to generate test cases by providing prompts such as generate functional test cases, create API test cases, or add negative scenarios.

  • Review & Refine: You can modify generated steps, add validations, improve scenarios, or refine the test cases using the chatbot.

  • Save: Click Save to retain the generated test cases. If not saved, the generated test cases will not be retained.

Download & Repository Management: Generated test cases can be downloaded for reference, and repositories can be managed from the Connect Repository page. Analyse connected code repositories to generate structured, execution-ready test cases.

Result: Saved Test Cases will appear in the Test Case Module reflected accordingly.

Last updated