Questions tagged [faker]

An extension or library used in certain programming languages or frameworks (namely Ruby or Yii2) for generating fake data for debug purposes and testing.

In Ruby, Faker, a port of Data::Faker from Perl, is used to easily generate fake data: names, addresses, phone numbers, etc.

In Yii2, Faker can generate random strings (like name, address, phone number or anything), random numbers, keys or harshes as well as long sentences of fake text. It can be accessed in OOP style.

A PHP library is available for Faker that is used in some frameworks such as Laravel.

703 questions
-1
votes
1 answer

extension_whitelist prevents Faker::Avatar.image

I use CarrierWave to upload files to my app. I'm trying to setup database by fake data. seeds.rb require "open-uri" require 'openssl' # https://github.com/stympy/faker/issues/763 OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE puts 'Start…
ryo1916
  • 1
  • 1
  • 1
-1
votes
2 answers

Model Factory returning the age of based on the birthdate just like this

I want to write a function that refers to that birthdate entry.. so far this is what i've done but I get in the terminal
TheBAST
  • 2,680
  • 10
  • 40
  • 68
-1
votes
1 answer

forEach not a function error in NodeJS when using FakerJS

I was taking a Udemy course, here is my code for an exercise that I was doing. Faker is a package downloaded from the NPM library var faker = require("faker"); console.log("+++++++++++++++++++"); console.log("Welcome to my…
Rudhraksh
  • 27
  • 5
-1
votes
1 answer

Laravel Seeding with Faker DateTime

Okay so i am developing an application which receives some real time sensor readings from a device and stores it in a table inside the database. According to the use case the device will remain active for at least 8 hours each day and after a…
Badar Khan
  • 60
  • 1
  • 7
-1
votes
3 answers

Change data for an ASP.NET MVC view based on debug/release mode

I'm working on an ASP.NET MVC app using .NET Framework 4.6.1 in Visual Studio 2015 Update 3. I'm planning to use the Faker.Data library (https://github.com/FermJacob/Faker.Data) to produce fake data for debug mode in development; it might be some…
Alex
  • 34,699
  • 13
  • 75
  • 158
-1
votes
2 answers

factory_girl creates duplicate value

rails 4.1.1 rspec 3.2.1 Gemfile source 'https://rubygems.org' # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' gem 'rails', '4.1.1' # Use mysql as the database for Active Record gem 'mysql2', '~> 0.3.13', :platform => :ruby gem…
Lesha Pipiev
  • 3,251
  • 4
  • 31
  • 65
-2
votes
1 answer

How to use Python faker for dependent columns

Scenario If column1 = ‘Value’ then column2 = ‘AAA’ How can we use faker to generate mock data for these dependent columns. Need to consider both positive and negative data.
-2
votes
1 answer

Insert Faker data in MySQL database with Python 3.9.5

I have very simple table: customers (id int auto_increment, name varchar(255), address varchar(255). Want to insert fake data using npm faker with python. Started Python yesterday and I`m lost. Help plz. Tried many queries but does not work. for i…
sndd
  • 1
  • 1
-2
votes
1 answer

Fake time on Ubuntu Vagrant-box to test recurring payments

I have a task to trigger failed payments every 24 hours for 7 days then if no charges account should be cancelled, i am using a statemachine to implement such functionality. I finished implementing the logic, howver when it comes to test it i found…
Dahab
  • 518
  • 1
  • 5
  • 23
-2
votes
1 answer

How to import and use Faker Library in RIDE

I have to automate a Register and Sign In test case and I am using RIDE to write my tests. What I actually want to do is: To make a Register, but every time when I run the test I have to change the email value. I would prefer to make the Sign In…
-3
votes
4 answers

Paperclip image not uploads with faker gem data in ruby on rails?

I'm trying to upload fake image data using faker gem, but I am seeing this error: Paperclip::AdapterRegistry::NoHandlerError: No handler found for "https://robohash.org/app/assets/image.jpg.png?size=300x300&set=set1" in db/seed.rb 5.times do …
adarsh
  • 306
  • 5
  • 16
-3
votes
1 answer

Generate random values

I want to generate random name using the following code: def random_card_holder Faker::Name.first_name + " " + Faker::Name.last_name end But I get validation error. Is this code valid?
Peter Penzov
  • 1,126
  • 134
  • 430
  • 808
-5
votes
1 answer

How to implement a faker into my go test?

I am trying to learn Go and write my first test. I would like to figure out how to implement a faker to test CRUD on terraform. I've figured out how to import faker and created the variables to use. I tried to fmt.Println to see if it generates,…
epoX
  • 1
1 2 3
46
47