Yashasv-Prajapati / Docify

6 stars 4 forks source link

Generate Test Plan API Handler #154

Closed Harsh290803 closed 6 months ago

Harsh290803 commented 6 months ago

An API that generates a UML diagram specifically for the test folder within a user's project. Additionally, it provides a straightforward description of the testing framework or tools being utilized in the project.

linear[bot] commented 6 months ago
CS3-156 [API] Generate Test Plan API Handler

In this, create if not created -> client/app/api/test_plan/route.ts In this, we first need to run the generate UML script in the docker container in the user's project **test** folder. The test folder location will be known from the db. Take help from ndhuri24 for UML script, or you can simply check out the route.ts in UML-API handler. This will give us the basic diagram of the tests that the user has written for that particular project. Next, We need to find dependencies of this project, Check in db -> if the dependencies corresponding to this project are available or not, if NOT then we need to run the dependency_checker script in the docker container and then fetch the dependencies from db for that project using the project id. Take help from karanrajmehta06 for dependency checker docker container script or you can simply check out route.ts in api/dependency_checker. Next, once we have the project_dependencies and the project_type(also from db), we will use the free LLM endpoint to craft a prompt and ask it to generate a basic description about what is being used for testing in this. Take help from karanrajmehta06 in issue [CS3-155](https://linear.app/t05-cs305/issue/CS3-155/[api]-generate-readme-route-handler)