Pentest Tools
Published on August 13th, 2017 📆 | 5507 Views ⚑
0faker.js – Tool To Generate Fake Data For Testing
TTS Demo
faker.js is a tool to generate fake data in Node.js and in the browser, it has a lot of different data types to enable you to generate very customised and complete sets of fake or mock data for testing purposes.
It also supports multiple languages and locales and can generate a lot of data types to fit your use case.
Data Types
- address
- commerce
- company
- database
- date
- finance
- hacker
- helpers
- image
- internet
- lorem
- name
- phone
- random
- system
Usage
Browser
[adsense size='1' ]
1
2
3
4
5
6
|
<script src = "faker.js" type = "text/javascript"></script>
<script>
var randomName = faker.name.findName(); // Caitlyn Kerluke
var randomEmail = faker.internet.email(); // Rusty@arne.info
var randomCard = faker.helpers.createCard(); // random contact card containing many properties
</script>
|
Node.js
1
2
3
4
5
|
var faker = require('faker');
var randomName = faker.name.findName(); // Rowan Nikolaus
var randomEmail = faker.internet.email(); // Kassandra.Haley@erich.biz
var randomCard = faker.helpers.createCard(); // random contact card containing many properties
|
You can download faker.js here:
Or read more here.
Gloss