Interactive CLI tool for generating test automation projects with different programming languages and frameworks.
npm install -g test-project-generatortestgen- π Multiple Programming Languages: Java, Python, Ruby, TypeScript
- β‘ Test Frameworks: Selenium, Appium, Playwright, Karate API
- π₯ BDD Support: Cucumber/Gherkin integration
- π― Interactive CLI: Easy-to-use command-line interface
- π Project Templates: Pre-configured project structures
- π§ Auto Configuration: Dependencies and build tools setup
- π Documentation: Ready-to-use README and examples
- π Advanced Reporting: Allure Reports, HTML reports, Coverage reports
- β‘ Parallel Execution: Multi-threaded test execution support
- π CI/CD Ready: GitHub Actions, Jenkins, GitLab CI templates
- π Logging: Log4j2, Winston, Python logging integration
- π οΈ Configuration Files: .gitignore, testng.xml, pytest.ini, jest.config.js
- πΈ Screenshot & Video: Automatic failure screenshots and video recording
- π Cross-Browser: Chrome, Firefox, Safari, Edge support
- π± Mobile Testing: iOS and Android device configurations
- ποΈ Database Testing: Database connection utilities
- π§ Email Testing: Email validation and testing support
git clone https://github.com/erdncyz/testgen.git
cd testgennpm installnpm linktestgen# Clone the repository
git clone https://github.com/erdncyz/testgen.git
cd testgen
# Install dependencies
npm install
# Install globally
npm link# Run the generator
testgen
# Follow the interactive prompts:
# 1. Select programming language
# 2. Select test framework
# 3. Choose BDD support (Cucumber)
# 4. Enter project name and path# Navigate to your new project
cd your-project-name
# Install dependencies (language-specific)
# For Java: mvn clean install
# For Python: pip install -r requirements.txt
# For Ruby: bundle install
# For TypeScript: npm install
# Run tests
# For Java: mvn test
# For Python: pytest
# For Ruby: rspec
# For TypeScript: npm testgit clone https://github.com/erdncyz/testgen.git
cd testgen
npm install# Run the generator
npm start
# or
node index.jsThe generator will guide you through these steps:
? Which programming language would you like to use?
β― Java
Python
Ruby
TypeScript
? Which test framework would you like to use?
β― Selenium WebDriver
Appium (Mobile Testing)
Playwright
? Do you want to use Cucumber for BDD (Behavior Driven Development)?
β― Yes
No
? What is your project name?
> my-awesome-tests
? Where should the project be created?
> /Users/username/projects
my-awesome-tests/
βββ src/
β βββ main/java/
β βββ test/java/
β βββ SampleTest.java
βββ src/test/resources/features/
β βββ sample.feature
βββ pom.xml
βββ README.md
my-awesome-tests/
βββ src/
βββ tests/
β βββ test_sample.py
βββ features/
β βββ sample.feature
β βββ steps/
β βββ sample_steps.py
βββ requirements.txt
βββ README.md
my-awesome-tests/
βββ lib/
βββ spec/
β βββ sample_spec.rb
βββ features/
β βββ sample.feature
β βββ steps/
β βββ sample_steps.rb
βββ Gemfile
βββ README.md
my-awesome-tests/
βββ src/
βββ tests/
β βββ sample.test.ts
βββ features/
β βββ sample.feature
β βββ steps/
β βββ sample_steps.ts
βββ package.json
βββ tsconfig.json
βββ README.md
- Web application testing
- Cross-browser support (Chrome, Firefox, Safari, Edge)
- Multiple language bindings
- Grid support for distributed testing
- WebDriverManager integration (automatic driver management)
- REST API testing with simple syntax
- BDD-style API test scenarios
- Built-in assertions and validations
- Environment management (dev, staging, prod)
- Data-driven testing with JSON/CSV
- Parallel execution support
- Beautiful HTML reports
- REST API testing with Python requests
- pytest integration for test execution
- JSON validation and assertions
- Environment configuration support
- Parallel execution with pytest-xdist
- HTML and JSON reports
- REST API testing with Supertest
- Jest integration for test execution
- Express.js testing support
- Async/await syntax
- Parallel execution with Jest
- Coverage reports
- Mobile application testing
- iOS and Android support
- Native, hybrid, and web apps
- Desktop application testing
- Modern web testing
- Fast and reliable
- Auto-wait and retry mechanisms
- Cross-browser testing
When you choose Cucumber support, the generator will:
- Add Cucumber dependencies to your project
- Create feature files with Gherkin syntax
- Generate step definitions for your language
- Set up the necessary configuration
Feature: Sample Feature
As a user
I want to test the application
So that I can ensure it works correctly
Scenario: Login to the application
Given I am on the homepage
When I click on the login button
Then I should see the login pageThe generator automatically installs the latest stable versions:
- Selenium: 4.15.0
- WebDriverManager: 5.6.2 (automatic driver management)
- Appium: 8.5.1
- Playwright: 1.40.0
- Karate: 1.4.1 (API testing)
- JUnit: 5.9.3
- TestNG: 7.8.0 (parallel execution)
- Allure: 2.24.0 (advanced reporting)
- Log4j2: 2.20.0 (logging framework)
- Cucumber: 7.14.0
- Selenium: 4.15.0
- Appium: 3.1.0
- Playwright: 1.40.0
- Requests: 2.31.0 (API testing)
- pytest: 7.4.3
- pytest-html: 4.1.1 (HTML reports)
- pytest-xdist: 3.3.1 (parallel execution)
- allure-pytest: 2.13.2 (Allure reports)
- pytest-cov: 4.1.0 (coverage reports)
- behave: 1.2.6
- selenium-webdriver: ~> 4.15
- appium_lib: ~> 12.0
- playwright: ~> 1.40
- rspec: ~> 3.12
- cucumber: ~> 8.0
- selenium-webdriver: ^4.15.0
- webdriverio: ^8.15.0
- @playwright/test: ^1.40.0
- supertest: ^6.3.3 (API testing)
- express: ^4.18.2 (API framework)
- jest: ^29.7.0 (parallel execution support)
- winston: ^3.11.0 (logging framework)
- allure-jest: ^2.0.0 (Allure reports)
- @cucumber/cucumber: ^8.11.0
testgen
# Selections:
# - Language: Java
# - Framework: Selenium WebDriver
# - Cucumber: Yes
# - Project Name: java-selenium-bdd
# - Path: /Users/username/projectstestgen
# Selections:
# - Language: Python
# - Framework: Playwright
# - Cucumber: No
# - Project Name: python-playwright-tests
# - Path: /Users/username/projectstestgen
# Selections:
# - Language: TypeScript
# - Framework: Appium (Mobile Testing)
# - Cucumber: Yes
# - Project Name: mobile-app-tests
# - Path: /Users/username/projectscd java-selenium-bdd
mvn clean testcd python-playwright-tests
pip install -r requirements.txt
pytestcd ruby-appium-tests
bundle install
rspeccd mobile-app-tests
npm install
npm testThe generator creates optimized configurations for each combination:
- Java: Maven POM file, JUnit 5, TestNG, Cucumber integration
- Python: requirements.txt, pytest, behave (Cucumber)
- Ruby: Gemfile, RSpec, Cucumber
- TypeScript: package.json, Jest, Playwright/Appium bindings
Each generated project includes:
- Dependency management files
- Build configuration files
- Test runner setup
- Sample test files
- Documentation and examples
- Allure Reports: Beautiful HTML reports with screenshots, videos, and detailed test results
- HTML Reports: pytest-html for Python, Jest HTML for TypeScript
- Coverage Reports: Code coverage analysis for all languages
- JSON Reports: Machine-readable test results for CI/CD integration
- Java: TestNG parallel execution with thread pools
- Python: pytest-xdist for distributed testing
- TypeScript: Jest parallel execution with worker threads
- Cross-browser: Simultaneous testing across multiple browsers
- GitHub Actions: Pre-configured workflows for all languages
- Matrix Testing: Multiple versions and browsers in parallel
- Artifact Upload: Automatic test result and report uploads
- Cache Optimization: Fast builds with dependency caching
- Java: Log4j2 with file and console appenders
- Python: Structured logging with file rotation
- TypeScript: Winston logger with multiple transports
- Log Levels: DEBUG, INFO, WARN, ERROR with filtering
- Environment Variables: .env files for different environments
- Test Configuration: Language-specific config files
- Git Integration: Comprehensive .gitignore files
- IDE Support: VS Code and IntelliJ configurations
- Screenshot on Failure: Automatic screenshots for failed tests
- Video Recording: Test execution videos for debugging
- Log Files: Detailed execution logs
- Test Reports: Multiple report formats (HTML, JSON, XML)
- BasePage Class: Common functionality and wait strategies
- Page Classes: HomePage, LoginPage, and other page-specific classes
- WebDriverManager Utility: Cross-browser driver management
- Reusable Components: Modular and maintainable test structure
- Best Practices: Industry-standard POM implementation
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Selenium - Web browser automation
- Appium - Mobile application automation
- Playwright - Modern web testing
- Cucumber - Behavior-driven development
If you encounter any issues or have questions:
- Check the Issues page
- Create a new issue with detailed information
- Join our community discussions
Happy Testing! π§ͺβ¨
Made with β€οΈ by erdncyz