https://github.com/netzulo/mcp-gentest
Just a MVP to test a lit about potencial of MCPs
https://github.com/netzulo/mcp-gentest
Last synced: 10 months ago
JSON representation
Just a MVP to test a lit about potencial of MCPs
- Host: GitHub
- URL: https://github.com/netzulo/mcp-gentest
- Owner: netzulo
- Created: 2025-08-03T12:58:09.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-08-03T17:05:52.000Z (11 months ago)
- Last Synced: 2025-08-03T18:24:46.409Z (11 months ago)
- Language: TypeScript
- Size: 13.7 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ๐งช MCP GenTest
[](https://github.com/your-username/mcp-gentest/actions/workflows/ci.yml)
[](LICENSE)

MCP GenTest is an LLM-powered tool that automatically generates Cucumber `.feature` files and `.steps.ts` test definitions from your React component code.
Ideal for QA teams who want to bridge UI components and automated functional tests with minimal manual effort.
---
## โจ Features
- Scans your React project and extracts UI component logic
- Generates Cucumber `.feature` scenarios (success, edge, validation)
- Produces TypeScript step definitions using Selenium WebDriver
- Optional CLI test runner with full TypeScript support
---
## ๐ Installation
```bash
git clone https://github.com/your-username/mcp-gentest.git
cd mcp-gentest
yarn install
cp .env.example .env
# Add your OpenAI API key to the .env file
```
---
## ๐ง Usage
### 1. Analyze project and generate features
```bash
yarn features --project ./path/to/react-project
```
Optional flags:
- `--include src/`: scan only files inside that folder
- `--limit 5`: analyze only the first 5 relevant files
- `--overwrite`: replace existing `.feature` files
### 2. Generate step definitions
```bash
yarn steps
```
This will create `.steps.ts` files inside `cucumber/step_definitions`.
### 3. Run tests
```bash
yarn test:run
```
Runs `cucumber-js` against the generated files using the transpiled JS output in `dist/`.
---
## ๐ Project Structure
```
cucumber/
features/
Button.feature
Header.feature
step_definitions/
Button.steps.ts
Header.steps.ts
```
---
## ๐ Available Scripts
```json
{
"analyze": "tsc && node dist/analyzer/index.js",
"features": "tsc && node dist/prompt/index.js",
"steps": "tsc && node dist/steps/index.js",
"test:run": "yarn build && cucumber-js dist/cucumber/features --require dist/cucumber/step_definitions/**/*.js",
"build": "tsc"
}
```
---
## ๐ Environment Variables
Create a `.env` file with your OpenAI API key:
```env
OPENAI_API_KEY=sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
```
---
## ๐ฆ Requirements
- Node.js >= 18
- Yarn >= 1.22
- OpenAI API key (uses GPT-4o)
- React project with `.tsx` components
---
## ๐ฃ๏ธ Roadmap
- [x] Feature + step generator from component code
- [x] Unified CLI runner
- [x] Transpilation from TypeScript to CommonJS for Cucumber
- [ ] Support for Playwright/Testing Library
- [ ] GitHub Action for CI integration
---
## ๐งช Demo
```bash
yarn analyze:example
yarn features:example
yarn steps:example
yarn test:run
# or
yarn clean && yarn && yarn runner:example
```
Check the asciinema recording for a demo of the tool in action.
[](https://asciinema.org/a/731435)
---
## ๐ License
This project is licensed under the MIT License.