From the course: Scripting for Testers
Unlock this course with a free trial
Join today to access over 25,500 courses taught by industry experts.
Generate fake input data - Python Tutorial
From the course: Scripting for Testers
Generate fake input data
- [Instructor] One of the challenges that every tester faces is that of coming up with input data to use in their testing. It can be tricky to come up with data that's realistic enough to fit your test case, and it can sometimes be boring to just enter the same data over and over. Luckily, with Python, you can easily generate many different kinds of inputs data. We've already written several scripts in this course that have required typing in different input data, so let's look at how we could generate some of that data instead. So here I have a script that's just creating five different gig objects on the server. Right now, as you can see, all five of these objects are going to be identical. They're going to have the same attributes. It would be nice to introduce a little bit of variation into these inputs. To do this, we can use the Python Faker Library. You can see the documentation for it at faker.readthedocs.io. And the first thing that we're going to need to do is to install…
Contents
-
-
-
Exploring the API with Postman4m 39s
-
(Locked)
REST API calls in Python6m 22s
-
(Locked)
Authentication9m 55s
-
Setting up Visual Studio Code3m 27s
-
(Locked)
Finding an intermittent error10m 14s
-
(Locked)
Challenge: Find the API rate limit2m 59s
-
(Locked)
Solution: Find the API rate limit5m 38s
-
(Locked)
Generate fake input data4m 54s
-
(Locked)
Creating test data through API calls7m 37s
-
(Locked)
Using API calls to set up complex test scenarios8m 21s
-
-
-
-
-