New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

test-project-generator

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

test-project-generator

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

latest
Source
npmnpm
Version
1.0.1
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

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
npm link

Step 4: Create Your First Project

testgen

📖 Detailed Usage Guide

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:

  • Add Cucumber dependencies to your project
  • Create feature files with Gherkin syntax
  • Generate step definitions for your language
  • 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

  • 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

📄 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:

  • Check the Issues page
  • Create a new issue with detailed information
  • Join our community discussions

Happy Testing! 🧪✨

Made with ❤️ by erdncyz

Keywords

test-automation

FAQs

Package last updated on 23 Sep 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts