From c052be183836264a3e04783547c8c6163a7e9608 Mon Sep 17 00:00:00 2001 From: Saurav Panda Date: Sun, 14 Jul 2024 22:03:30 -0700 Subject: [PATCH] feat: added unit test to cli --- cli/kaizen_cli/cli.py | 9 +++++++++ cli/pyproject.toml | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/cli/kaizen_cli/cli.py b/cli/kaizen_cli/cli.py index 83a84f98..01216aa7 100644 --- a/cli/kaizen_cli/cli.py +++ b/cli/kaizen_cli/cli.py @@ -2,6 +2,7 @@ import os import json from kaizen.generator.ui import UITestGenerator +from kaizen.generator.unit_test import UnitTestGenerator CONFIG_FILE = os.path.expanduser("~/.myapp_config.json") @@ -84,6 +85,14 @@ def ui_tests(url): UITestGenerator().generate_ui_tests(url) +@cli.command() +@click.argument("file_path", required=True) +@click.argument("output_folder", default=None) +def unit_test(file_path, output_folder): + """Run unit test generation""" + UnitTestGenerator().generate_tests(file_path, output_path=output_folder) + + @cli.group() def reviewer(): """reviewer command group""" diff --git a/cli/pyproject.toml b/cli/pyproject.toml index 18012403..6bbeb706 100644 --- a/cli/pyproject.toml +++ b/cli/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "kaizen-cli" -version = "0.1.3" +version = "0.1.4" description = "" authors = ["Saurav Panda "] readme = "README.md"