From 8d36e2e2f79f0e87f0c4ae17c122aaeedd808299 Mon Sep 17 00:00:00 2001 From: mrT23 Date: Mon, 29 Jan 2024 20:17:39 +0200 Subject: [PATCH] feat: Add new configuration options in pr_test section and update TEST.md documentation --- docs/TEST.md | 5 ++++- pr_agent/settings/configuration.toml | 9 ++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/docs/TEST.md b/docs/TEST.md index f25ae60d..4f88c359 100644 --- a/docs/TEST.md +++ b/docs/TEST.md @@ -24,4 +24,7 @@ Language that are currently supported by the tool: Python, Java, C++, JavaScript - `num_tests`: number of tests to generate. Default is 3. - `testing_framework`: the testing framework to use. If not set, for Python it will use `pytest`, for Java it will use `JUnit`, for C++ it will use `Catch2`, and for JavaScript and TypeScript it will use `jest`. - `avoid_mocks`: if set to true, the tool will try to avoid using mocks in the generated tests. Note that even if this option is set to true, the tool might still use mocks if it cannot generate a test without them. Default is true. -- `extra_instructions`: Optional extra instructions to the tool. For example: "use the following mock injection scheme: ...". \ No newline at end of file +- `extra_instructions`: Optional extra instructions to the tool. For example: "use the following mock injection scheme: ...". +- `file`: in case there are several components with the same name, you can specify the relevant file. +- `class_name`: in case there are several methods with the same name in the same file, you can specify the relevant class name. +- `enable_help_text`: if set to true, the tool will add a help text to the PR comment. Default is true. \ No newline at end of file diff --git a/pr_agent/settings/configuration.toml b/pr_agent/settings/configuration.toml index bb5a95f7..3a9b8d39 100644 --- a/pr_agent/settings/configuration.toml +++ b/pr_agent/settings/configuration.toml @@ -91,10 +91,13 @@ extra_instructions = "" [pr_analyze] # /analyze # [pr_test] # /test # -testing_framework = "" # specify the testing framework you want to use -num_tests=3 # number of tests to generate. max 5. -avoid_mocks=true # if true, the generated tests will prefer to use real objects instead of mocks extra_instructions = "" +testing_framework = "" # specify the testing framework you want to use +num_tests=3 # number of tests to generate. max 5. +avoid_mocks=true # if true, the generated tests will prefer to use real objects instead of mocks +file = "" # in case there are several components with the same name, you can specify the relevant file +class_name = "" # in case there are several methods with the same name in the same file, you can specify the relevant class name +enable_help_text=true [pr_config] # /config #