Skip to content
| Marketplace
Sign in
Visual Studio Code>Machine Learning>loopNew to Visual Studio Code? Get it now.
loop

loop

Shawn Hu

|
661 installs
| (1) | Free
Test Driven GPT Code Generation
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info
loop logo

OpenAI GPT Powered Test Driven Development. Give Me Tests, I'll Give You Code.

Motivation

With the introduction of ChatGPT, one interesting feature it provides is that it can generate code! However, given a prompt for the desired code, the response is often kinda wonky. So, rather than giving it a prompt, why not give it a test? This is the idea behind loop, a VS Code extension that supports test-driven development by generating code that passes given tests.

Usage

Full Test Suite

full test suite

Partial Test Suite

partial test suite

Configuring the extension

There are 2 settings that can be used to configure the extension. Notably, you MUST supply your own OpenAI API key. You can see how to generate one here. I would love to be able to provide a key for everyone to use, but unfortunately, I am poor 😅

"loop": {
  "loop.openaiApiKey": "REQUIRED: enter you OpenAI API key here",
  "loop.model": "by default it's gpt-3.5-turbo, but you can select gpt-4 if you are enrolled in their beta",
}
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft