Skip to content

Latest commit

Β 

History

History

regression

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

OpenDevin - Regression Test Framework

OpenDevin project is an open-source software engineering AI that can solve various software engineering tasks. This repository contains the regression test framework for OpenDevin project.

Running the Tests

To run the tests for OpenDevin project, you can use the provided test runner script. Follow these steps:

  1. Ensure you have Python 3.6 or higher installed on your system.
  2. Install the required dependencies by running the following command in your terminal:
    pip install -r requirements.txt
    
  3. Navigate to the root directory of the project.
  4. Run the test suite using the test runner script with the required arguments:
    python evaluation/regression/run_tests.py --OPENAI_API_KEY=sk-xxxxxxxxxxxxxxxxxxxxxx --model=gpt-3.5-turbo-1106
    
    Replace sk-xxxxxxxxxxxxxxxxxxxxxx with your actual OpenAI API key. The default model is gpt-3.5-turbo-1106, but you can specify a different model if needed.

The test runner will discover and execute all the test cases in the cases/ directory, and display the results of the test suite, including the status of each individual test case and the overall summary.

Test Case Structure

The test cases for OpenDevin project are organized in the cases/ directory. Each test case has the following structure:

cases/
β”œβ”€β”€ hello-world/
β”‚   β”œβ”€β”€ task.txt
β”‚   β”œβ”€β”€ outputs/
β”‚   β”‚   β”œβ”€β”€ monologue_agent/
β”‚   β”‚   β”‚   └── workspace/
β”‚   β”‚   β”‚       β”œβ”€β”€ hello_world.sh
β”‚   β”‚   └── codeact_agent/
β”‚   β”‚       └── workspace/
β”‚   β”‚           β”œβ”€β”€ hello_world.sh
β”‚   └── test_hello_world.py
β”œβ”€β”€ create_web_app/
β”‚   β”œβ”€β”€ task.txt
β”‚   β”œβ”€β”€ outputs/
β”‚   β”‚   β”œβ”€β”€ monologue_agent/
β”‚   β”‚   β”‚   └── workspace/
β”‚   β”‚   β”‚       β”œβ”€β”€ app.py
β”‚   β”‚   β”‚       β”œβ”€β”€ requirements.txt
β”‚   β”‚   β”‚       β”œβ”€β”€ static/
β”‚   β”‚   β”‚       └── templates/
β”‚   β”‚   └── codeact_agent/
β”‚   β”‚       └── workspace/
β”‚   β”‚           β”œβ”€β”€ app.py
β”‚   β”‚           β”œβ”€β”€ requirements.txt
β”‚   β”‚           β”œβ”€β”€ static/
β”‚   β”‚           └── templates/
β”‚   └── test_create_web_app.py
└── ...
  • task.txt: This file contains the task description provided by the user.
  • outputs/: This directory contains the output generated by OpenDevin for each agent.
  • outputs/*/workspace/: This directory contains the actual output files generated by OpenDevin.
  • test_*.py: These are the test scripts that validate the output of OpenDevin.

Adding New Test Cases

To add a new test case to the regression test framework, follow the same steps as described in the previous sections.

Customizing the Test Cases

The test cases can be customized by modifying the fixtures defined in the conftest.py file. The available fixtures are:

  • test_cases_dir: The directory containing the test cases.
  • task_file: The path to the task.txt file for the current test case.
  • workspace_dir: The path to the workspace/ directory for the current test case.
  • model: The model selected start the generation.
  • run_test_case: A fixture that runs OpenDevin and generates the workspace for the current test case.

You can modify these fixtures to change the behavior of the test cases or add new ones as needed.

If you have any questions or need further assistance, feel free to reach out to the project maintainers.