Automated Test Generation
Supported frameworks
| Framework | Language |
|---|
| Playwright | TypeScript / Python / C# (.NET) |
| Selenium | Java (JUnit 5) |
| Cypress | JavaScript |
| Cucumber | JavaScript / Java / Python |
Code quality score
Before you push any code, TestForge calculates a local quality score (no extra LLM call) across 5 dimensions:
| Dimension | Weight | What it checks |
|---|
| Syntax | 30% | Language-specific structure |
| AC Coverage | 25% | Keywords from acceptance criteria found in code |
| POM Pattern | 20% | Page Object separation detected (N/A for Cucumber) |
| Traceability | 15% | US ID annotation present in comments (@us-{id}) |
| Readability | 10% | Line length, comments, naming conventions |
Score ≥ 70: good quality, push with confidence. Score < 60: Regenerate button is highlighted.
Regenerate with corrections
Click Regenerate to run a new generation. TestForge automatically collects all quality warnings from the previous result and sends them to the LLM as a CORRECTIONS REQUIRED section. You don’t need to describe the issues manually.
Cucumber: feature files from Gherkin
When you select a Cucumber framework:
- Feature files are derived directly from the
gherkinScenario fields of your manual tests — zero extra LLM call.
- Step definitions are generated by the LLM from those scenarios.
For Cucumber, generate manual tests first. If no Gherkin scenarios are available, TestForge cannot proceed.
Getting started with your generated code
After generation, TestForge displays a “How to use this code” panel with the exact steps for your framework. Here is the full reference for all 8 frameworks.
Playwright TypeScript \
# Install
npm i -D @playwright/test
npx playwright install
Project structure
tests/ ← generated test files
pages/ ← Page Object classes
playwright.config.ts
# Run
npx playwright test
Playwright Python \
# Install
pip install pytest-playwright
playwright install
Project structure
tests/ ← generated test files
pages/ ← Page Object classes
pytest.ini
Playwright .NET (C#) \
# Install
dotnet add package Microsoft.Playwright
playwright install
Project structure
Tests/ ← generated test files
Pages/ ← Page Object classes
*.csproj
Selenium Java \
Add to your pom.xml:
<dependencies>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>4.x</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>5.x</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.github.bonigarcia</groupId>
<artifactId>webdrivermanager</artifactId>
<version>5.x</version>
<scope>test</scope>
</dependency>
</dependencies>
Project structure
src/test/java/
tests/ ← generated test files
pages/ ← Page Object classes
pom.xml
Cypress JavaScript \
# Install
npm i -D cypress
Project structure
cypress/
e2e/ ← generated test files
support/ ← commands and fixtures
cypress.config.js
Cucumber JavaScript \
# Install
npm i -D @cucumber/cucumber
Project structure
features/ ← generated .feature files
step-definitions/ ← generated step definitions
.cucumberrc.yml
Cucumber Java \
Add to your pom.xml:
<dependencies>
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-java</artifactId>
<version>7.x</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-junit</artifactId>
<version>7.x</version>
<scope>test</scope>
</dependency>
</dependencies>
Project structure
src/test/resources/features/ ← generated .feature files
src/test/java/steps/ ← generated step definitions
pom.xml
Cucumber Python \
# Install
pip install pytest-bdd
Project structure
features/ ← generated .feature files
step_defs/ ← generated step definitions
pytest.ini
The inline “How to use this code” accordion in the QA Hub links directly to each section above. Keep this page up to date whenever framework versions are bumped.