TestYogi is an automated testing application that integrates with Selenium WebDriver and OpenAI's GPT models to interpret natural language instructions for automated web testing scenarios. It allows users to define test scenarios in plain English, which are then executed against specified web applications, making automated testing a breeze.
At its core, the application utilizes OpenAI's GPT models for Natural Language Processing, enabling it to understand and interpret test scenarios described in plain English. This feature is coupled with the robustness of Selenium WebDriver, which takes these interpreted commands and executes them. As a result, users can perform a variety of actions such as clicking buttons, entering text, selecting items from dropdowns, and explicitly waiting for elements—all articulated in simple language. The application is designed with extensibility in mind, promising future enhancements to support a broader spectrum of testing functionalities.
Here's the link for the demo
https://www.youtube.com/watch?v=IBmZ90OjFtM
This guide will walk you through setting up and running the application. It covers both the backend, built with Flask and leveraging OpenAI's GPT models, and the frontend, created with React.
OpenAI api keyPython 3 or higher
Node.js and npm (Node Package Manager)
-
Clone the repo
-
Navigate to the project directory
-
Install the required Python packages:
pip install -r requirements.txt
-
API Key Configuration*
To securely manage your OpenAI API key, create a .env file in the root directory and add your API key:OPENAI_API_KEY=your_api_key_here
-
Run the flask app:
python app.py
-
Navigate to root directory of React app and install npm dependencies:
npm install
-
Start the React App:
npm start
Directly embedding API keys in source code is strongly discouraged as it poses significant security risks. The use of environment variables, as outlined above, is a best practice for managing sensitive information and is crucial in maintaining the security integrity of your application. Always ensure your .env file is included in your .gitignore to prevent accidental exposure.