Skip to content

code-philia/intention-test-extension

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Intention Test VS Code Extension

How to Run

Note

Intention Test VS Code extension has not implemented one-click running for now. A local Python backend should be started before running the extension.

Prerequisites

Intention Test requires the following development languages:

And the following tools for source code analyzation:

  • Oracle JDK 1.8 (with JAVA_HOME environment variable set to its path, and other JDK distributions are not tested)
  • Apache Maven (make sure mvn or mvn.cmd could be found in the PATH environment variable)
  • CodeQL CLI

And an OpenAI API key to access GPT-4o.

Start up the Python backend

We suggest using Python 3.10 which has been tested on. First install the requirements:

cd backend

# For CPU / Apple Silicon
pip install -r requirements.txt

# For NVIDIA GPU (CUDA 12.4)
pip install -r requirements-cuda.txt

Modify the backend/config.ini:

[openai]
apikey = your-open-ai-key
url = https://api.openai.com/v1

[tools]
codeql = your-path-to-code-ql-executable

Then start the backend HTTP server:

# Start on default 8080 port
python server.py

# Start on another port
python server.py --port 12345

Run the extension in debug mode

First build the React frontend:

cd web
npm install
npm run build
cd ..

Then install the extension dependencies:

cd extension
npm install

Then in VS Code, start the extension by the Run Extension debug option.

If you have specified another port when starting the backend server, change the port in settings of the new Extension Development Host window via Intention Test: Port before generating test cases.

Use the demo project to try our tool

Now the tool only supports running on the demo project backend/data/spark inside this repository.

Acknowledgements

About

Demostrative extension of Instruction Test work.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors