Ben Weese

Tag Archives: QA

Testing with Postman: Lodash

Another javascript library built into Postman is Lodash. Looping Arrays with Lodash Sometimes you will want to iterate through an array. Maybe your response itself is an array. Luckily there is an easy for loop that can be used. This is use for where you see [] in the Json as that means what is […]

Testing with Postman: Moment

Postman has many built in Javascript libraries. Moment is one of the more useful ones for getting dates such as today’s date or tomorrow’s. Creating a Date with Moment Moment is another tool build into postman that can be used for your test. This is great for creating a rolling future, current or past date. […]

Testing with Postman: Chai Assertions

Postman uses the Chai Assertion Library so familiarize yourself with it. Using Chai Match Assertion You can define a format for your response using Regex and the match assertion. Below is an example of a data format for a mysql date. Date Format Multiple Assertions When using multiple assertions on a single data point you […]

Testing with Postman: Headers

Sometimes the only thing you need to test is a header. This is when a PDF or something else is returned. Below is how you can test a header. Testing for Correct Headers and PDF Responses Below are test you can run on headers. The great thing about this is it allows us to find […]