Select Page
Software Testing

Generate Random Test Data using Silly Python Library

Being a leading QA Company, we write blogs on all prominent software testing topics and tools using our real-world experience. So stay sharp by subscribing to our Newsletter.

Generate Random Test Data using Silly Python Library - Blog
Listen to this blog

Generating random test data during test automation execution is an easier job than retrieving from Excel Sheet/JSON/YML file. If you start maintaining dummy test data in an external file, it will increase test data feeding time before you begin the automated regression test suite.

You can generate random test data using Silly Python library if you have Selenium automated test suite in Python. Let’s see how to use it.

Installation

pip install silly
[/code]

How to use

import silly

name = silly.name()
print("my name is {}".format(name))
# my name is colonel beefheart

print("you should not contact me at {}".format(silly.email()))
# you should not contact me at [email protected]

number = silly.number()
print(number)
# 7
number_in_words = silly.numberwang()
print(number_in_words)
# Eighty Eight

silly.paragraph()
# Youssef Chiffon needs a cluster of white dances, badly.
# Cabinet Management Systems is the best company in Bagsberg.
# Armourshire is in North Testonia. Fear space!

silly.paragraph(length=1000)
# oh no! that was the length in SENTENCES!
# what have we done!
# oh well
# let's do this anyways:
#
# Cheekshop is the best company in Birmingplace.
# Cornelius Slabmove will braise a heart, seventy-two rum staffs,
# and one hundred and thirty-two plans. Mysteriousshire Plumbing
# is the best company in Coasttown. Your mom can't wait to punch
# one hundred and thirty-seven brown socks in Jerkhall....
[/code]

Comments(0)

Submit a Comment

Your email address will not be published. Required fields are marked *

Talk to our Experts

Amazing clients who
trust us


poloatto
ABB
polaris
ooredo
stryker
mobility