parent
5c8555e22b
commit
e2bc553f88
@ -0,0 +1,91 @@
|
|||||||
|
# Mocking AJAX Requests with Postman
|
||||||
|
|
||||||
|
## Download
|
||||||
|
|
||||||
|
Go to [the download page](https://www.getpostman.com/apps) and choose your platform.
|
||||||
|
|
||||||
|
## Set Up
|
||||||
|
|
||||||
|
1. Start a new collection
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
1. Give it a name and click Create
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
1. Close the side panel
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
1. Add a request
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
1. Click the arrow next to Save and choose Save As
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
1. Give it a name
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
1. Choose your recently created collection
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
1. Click Save
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
1. Expand your collection by clicking on it
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
1. Click on Tests
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
1. There are snippets on the right with suggestions for various tests
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
1. Write a test
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
1. Run the request by clicking Send
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
1. View the response below
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
1. Click on Test Results
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
1. Check whether or not your test passed
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
1. Do this for several other requests
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
1. Click Runner at the top
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
1. Click the collection you want to test
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
1. Click Run
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
1. Check your results
|
||||||
|
|
||||||
|

|
||||||
Loading…
Reference in new issue