npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

test-project-generator

v1.0.1

Published

Interactive CLI tool for generating test automation projects with different languages and frameworks

Downloads

10

Readme

Test Project Generator 🚀

GitHub npm Node.js Downloads

Interactive CLI tool for generating test automation projects with different programming languages and frameworks.

📦 Installation

npm install -g test-project-generator

🚀 Quick Start

testgen

✨ Features

  • 🌐 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

🚀 Quick Start

Step 1: Clone the Repository

git clone https://github.com/erdncyz/testgen.git
cd testgen

Step 2: Install Dependencies

npm install

Step 3: Global Installation (Recommended)

npm link

Step 4: Create Your First Project

testgen

📖 Detailed Usage Guide

Method 1: Global Installation (Recommended)

Step 1: Clone and Setup

# Clone the repository
git clone https://github.com/erdncyz/testgen.git
cd testgen

# Install dependencies
npm install

# Install globally
npm link

Step 2: Create a Project

# 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

Step 3: Start Development

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

Method 2: Local Usage

Step 1: Clone and Setup

git clone https://github.com/erdncyz/testgen.git
cd testgen
npm install

Step 2: Run Locally

# Run the generator
npm start
# or
node index.js

🎯 Interactive Flow

The generator will guide you through these steps:

1. Select Programming Language

? Which programming language would you like to use?
❯ Java
  Python
  Ruby
  TypeScript

2. Select Test Framework

? Which test framework would you like to use?
❯ Selenium WebDriver
  Appium (Mobile Testing)
  Playwright

3. Choose BDD Support

? Do you want to use Cucumber for BDD (Behavior Driven Development)?
❯ Yes
  No

4. Project Details

? What is your project name?
> my-awesome-tests

? Where should the project be created?
> /Users/username/projects

📁 Generated Project Structure

Java Project (Maven)

my-awesome-tests/
├── src/
│   ├── main/java/
│   └── test/java/
│       └── SampleTest.java
├── src/test/resources/features/
│   └── sample.feature
├── pom.xml
└── README.md

Python Project

my-awesome-tests/
├── src/
├── tests/
│   └── test_sample.py
├── features/
│   ├── sample.feature
│   └── steps/
│       └── sample_steps.py
├── requirements.txt
└── README.md

Ruby Project

my-awesome-tests/
├── lib/
├── spec/
│   └── sample_spec.rb
├── features/
│   ├── sample.feature
│   └── steps/
│       └── sample_steps.rb
├── Gemfile
└── README.md

TypeScript Project

my-awesome-tests/
├── src/
├── tests/
│   └── sample.test.ts
├── features/
│   ├── sample.feature
│   └── steps/
│       └── sample_steps.ts
├── package.json
├── tsconfig.json
└── README.md

🛠️ Framework Support

Selenium WebDriver

  • Web application testing
  • Cross-browser support (Chrome, Firefox, Safari, Edge)
  • Multiple language bindings
  • Grid support for distributed testing
  • WebDriverManager integration (automatic driver management)

Karate API Testing (Java)

  • 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

Requests API Testing (Python)

  • 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

Supertest API Testing (TypeScript)

  • REST API testing with Supertest
  • Jest integration for test execution
  • Express.js testing support
  • Async/await syntax
  • Parallel execution with Jest
  • Coverage reports

Appium

  • Mobile application testing
  • iOS and Android support
  • Native, hybrid, and web apps
  • Desktop application testing

Playwright

  • Modern web testing
  • Fast and reliable
  • Auto-wait and retry mechanisms
  • Cross-browser testing

🥒 BDD with Cucumber

When you choose Cucumber support, the generator will:

  1. Add Cucumber dependencies to your project
  2. Create feature files with Gherkin syntax
  3. Generate step definitions for your language
  4. Set up the necessary configuration

Example Feature File

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 page

📦 Dependencies

The generator automatically installs the latest stable versions:

Java Projects

  • 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

Python Projects

  • 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

Ruby Projects

  • selenium-webdriver: ~> 4.15
  • appium_lib: ~> 12.0
  • playwright: ~> 1.40
  • rspec: ~> 3.12
  • cucumber: ~> 8.0

TypeScript Projects

  • 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

🎯 Example Scenarios

Scenario 1: Java + Selenium + Cucumber

testgen
# Selections:
# - Language: Java
# - Framework: Selenium WebDriver
# - Cucumber: Yes
# - Project Name: java-selenium-bdd
# - Path: /Users/username/projects

Scenario 2: Python + Playwright + Traditional

testgen
# Selections:
# - Language: Python
# - Framework: Playwright
# - Cucumber: No
# - Project Name: python-playwright-tests
# - Path: /Users/username/projects

Scenario 3: TypeScript + Appium + Cucumber

testgen
# Selections:
# - Language: TypeScript
# - Framework: Appium (Mobile Testing)
# - Cucumber: Yes
# - Project Name: mobile-app-tests
# - Path: /Users/username/projects

🚀 Getting Started with Generated Projects

Java Project

cd java-selenium-bdd
mvn clean test

Python Project

cd python-playwright-tests
pip install -r requirements.txt
pytest

Ruby Project

cd ruby-appium-tests
bundle install
rspec

TypeScript Project

cd mobile-app-tests
npm install
npm test

🔧 Advanced Configuration

Custom Project Templates

The 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

Environment Setup

Each generated project includes:

  • Dependency management files
  • Build configuration files
  • Test runner setup
  • Sample test files
  • Documentation and examples

🆕 New Advanced Features

📊 Advanced Reporting

  • 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

⚡ Parallel Execution

  • 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

🔄 CI/CD Integration

  • 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

📝 Professional Logging

  • 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

🛠️ Configuration Management

  • 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

📸 Test Artifacts

  • 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)

🏗️ Page Object Model (POM)

  • 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

🤝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙏 Acknowledgments

📞 Support

If you encounter any issues or have questions:

  1. Check the Issues page
  2. Create a new issue with detailed information
  3. Join our community discussions

Happy Testing! 🧪✨

Made with ❤️ by erdncyz