Skip to main content

Automated Test Generation

Supported frameworks

FrameworkLanguage
PlaywrightTypeScript / Python / C# (.NET)
SeleniumJava (JUnit 5)
CypressJavaScript
CucumberJavaScript / Java / Python

Code quality score

Before you push any code, TestForge calculates a local quality score (no extra LLM call) across 5 dimensions:
DimensionWeightWhat it checks
Syntax30%Language-specific structure
AC Coverage25%Keywords from acceptance criteria found in code
POM Pattern20%Page Object separation detected (N/A for Cucumber)
Traceability15%US ID annotation present in comments (@us-{id})
Readability10%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:
  1. Feature files are derived directly from the gherkinScenario fields of your manual tests — zero extra LLM call.
  2. 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
# Run
pytest

Playwright .NET (C#) \

# Install
dotnet add package Microsoft.Playwright
playwright install
Project structure
Tests/          ← generated test files
Pages/          ← Page Object classes
*.csproj
# Run
dotnet test

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
# Run
mvn test

Cypress JavaScript \

# Install
npm i -D cypress
Project structure
cypress/
  e2e/          ← generated test files
  support/      ← commands and fixtures
cypress.config.js
# Run
npx cypress run

Cucumber JavaScript \

# Install
npm i -D @cucumber/cucumber
Project structure
features/             ← generated .feature files
step-definitions/     ← generated step definitions
.cucumberrc.yml
# Run
npx cucumber-js

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
# Run
mvn test

Cucumber Python \

# Install
pip install pytest-bdd
Project structure
features/       ← generated .feature files
step_defs/      ← generated step definitions
pytest.ini
# Run
pytest
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.