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

qa-faker-factory

v1.0.2

Published

A lightweight test data factory for QA Engineers and Software Engineers based on @faker-js/faker

Downloads

193

Readme

qa-faker-factory

npm version MIT License Test

⭐ If this project helps your test automation workflow, please consider giving it a star! ⭐

A comprehensive, lightweight test data factory generating realistic fake data for Quality Assurance (QA) and testing workflows.
Built on faker-js/faker to produce diverse domain-specific mock data objects for rapid testing and prototyping.


Features

  • Generate fake Users, Addresses, Products, Orders, Companies, Vehicles, Bank Accounts, and more
  • Includes test data for specialized domains like Medical Records, Travel Bookings, Support Tickets, and Subscription Plans
  • Customizable options (e.g., country codes for phone numbers)
  • Lightweight and easy to integrate in Node.js projects
  • CLI and mock JSON data generation (planned / extendable)
  • Ideal for frontend, backend, and API testing

Installation

npm install qa-faker-factory

Usage

const {
  generateUser,
  generateAddress,
  generateProduct,
  generateOrder,
  generateCompany,
  generatePaymentCard,
  generateVehicle,
  generateBankAccount,
  generateJobProfile,
  generateEducationRecord,
  generateSocialProfile,
  generateMedicalRecord,
  generateTravelBooking,
  generateSupportTicket,
  generateSubscriptionPlan,
  generateChatMessage
} = require('qa-faker-factory');

// Generate a random user with default +1 country code for phone
const user = generateUser();
console.log(user);

// Generate an address with a specified country
const address = generateAddress({ country: 'United States' });
console.log(address);

// Generate an order with user's phone country code override
const order = generateOrder({ countryCode: '+1' });
console.log(order);

API Reference

generateUser(options) - Generate a random user object.

Parameters:

options (optional):

countryCode (string) - Country dialing code for phone number (default: '+1')

Returns:

{
  firstName: string,
  lastName: string,
  email: string,
  phone: string, // formatted with countryCode
  gender: 'Male' | 'Female' | 'Other'
}
generateAddress(options) - Generate a random address.

Parameters:

options (optional):

country (string) - Country name (default: 'United States')

Returns:

{
  street: string,
  city: string,
  state: string,
  postalCode: string,
  country: string
}
generateProduct() - Generate a random product.

Returns:

{
  name: string,
  price: string, // in Currency e.g ($)
  category: string,
  stock: number
}
generateOrder(options) - Generate an order object including a user, product, quantity, and total price.

Parameters:

options (optional):

countryCode (string) - Passed to generateUser to generate a user based on the country

Returns:

{
  user: object,
  product: object,
  quantity: number,
  total: string // total price string with currency symbol
}
generateCompany() - Generate a random company.

Returns:

{
  name: string,
  catchPhrase: string,
  industry: string,
  website: string
}
generatePaymentCard() - Generate a random payment card.

Returns:

{
  type: string,
  number: string,
  cvv: string,
  expiry: string // YYYY-MM-DD format
}
generateVehicle() - Generate a vehicle profile.

Returns:

{
  make: string,
  model: string,
  type: string,
  vin: string,
  registrationNumber: string
}
generateBankAccount() - Generate a bank account.

Returns:

{
  bankName: string,
  accountNumber: string,
  iban: string,
  bic: string
}
generateJobProfile() - Generate a job profile.

Returns:

{
  title: string,
  area: string,
  type: string,
  company: string
}
generateEducationRecord() - Generate an education record.

Returns:

{
  institution: string,
  degree: string,
  field: string,
  graduationYear: number
}
generateSocialProfile() - Generate a social media profile.

Returns:

{
  username: string,
  email: string,
  avatar: string, // URL
  url: string,
  followers: number
}
generateMedicalRecord() - Generate a medical record.

Returns:

{
  patientId: string,
  bloodType: string,
  allergies: string[],
  diagnosis: string,
  lastVisit: string // YYYY-MM-DD format
}
generateTravelBooking() - Generate a travel booking.

Returns:

{
  destination: string,
  departureDate: string, // YYYY-MM-DD
  returnDate: string, // YYYY-MM-DD
  airline: string,
  bookingRef: string
}
generateSupportTicket() - Generate a support ticket.

Returns:

{
  ticketId: string,
  subject: string,
  status: 'open' | 'pending' | 'closed',
  priority: 'low' | 'medium' | 'high',
  createdAt: string // ISO timestamp
}
generateSubscriptionPlan() - Generate a subscription plan.

Returns:

{
  planName: string,
  pricePerMonth: string, // e.g. "$19.99"
  features: string[]
}
generateChatMessage() - Generate a chat message.

Returns: 

{
  messageId: string,
  sender: string,
  message: string,
  timestamp: string // ISO timestamp
}

Contributing

Contributions are welcome! If you'd like to improve this project, follow these steps:

  • Fork the repository

  • Create a new branch

(git checkout -b feature-branch)
  • Make your changes

  • Commit your changes

(git commit -m 'Add new feature')
  • Push to the branch (git push origin feature-branch)

  • Open a Pull Request

Please make sure your code follows the existing style and includes relevant tests where applicable.


License

This project is licensed under the MIT License. You are free to use, modify, and distribute this software as permitted under the terms of the license.


📎 Links

GitHub: https://github.com/azupatrick0/qa-faker-factory

npm: https://www.npmjs.com/package/qa-faker-factory

Issues: https://github.com/azupatrick0/qa-faker-factory/issues