Postman How-to: Dynamic Iteration Within a Collection

Postman How-to: Dynamic Iteration Within a Collection

You might be familiar with using the Postman Collection Runner to run a collection over multiple variables using a CSV file. But what about situations where you don’t know the data in advance? For example, let’s say you want to test an item info API with all the current items. First you need to get the list of items, then call the info API with each item. So you don’t want to loop the entire collection, just the item info request. The postman.sendNextRequest function can help you do just that. Continue reading “Postman How-to: Dynamic Iteration Within a Collection”

C# Advent: WireMock.Net

C# Advent: WireMock.Net

For the past few years I have mostly been testing backend services written in Java. But now that I’ll be working more in Unity, I wanted to see if one of my favorite Java testing libraries, WireMock, is available for C# development. WireMock allows you to set up a mock HTTP service at run-time with request matching and pre-set responses. If you need to write tests with any kind of micro-service or other HTTP dependencies, then WireMock is an invaluable tool for setting up fast and reliable mock responses. Thankfully, a port is available for .Net development: WireMock.Net! Continue reading “C# Advent: WireMock.Net”

Using JMeter Properties from the Command Line

It says it right there when you start JMeter: Don’t use GUI mode for load testing !, only for Test creation and Test debugging.”

Don't use GUI mode for load testing !
JMeter Startup Message

The JMeter developers were even kind enough to include an example of how to call JMeter on the command line:

jmeter -n -t [jmx file] -l [results file] -e -o [Path to web report folder]

This is a good start, but the real power in running JMeter from the terminal comes when you can set your test parameters at run time by passing them as properties. For example, you might want to run the same scenario with various thread counts or for a different number of iterations. You can even use command-line properties to toggle multiple test scenarios. Continue reading “Using JMeter Properties from the Command Line”

POST/CON 2018

POST/CON 2018

Back in the spring of 2016 I did my very first talk for STPCon. It was about testing REST services and I mentioned Postman as a good tool for exploring services; saying in passing, “I could probably do a whole talk just on Postman”. Since then I have done multiple talks and workshops on the Postman tool, so when I saw that Postman the company was doing its first ever conference in essentially my backyard, I had to throw my hat in the ring as a speaker.

I was pretty excited about this conference both as a chance to meet the Postman team and also because it would be my first time stepping out of the test conference bubble and meeting with a whole different group of people. In that regard, POST/CON 2018 definitely lived up to my expectations. I had a great time talking with people from all sorts of different roles, not just testing. Below is a brief overview of the program with some highlights: Continue reading “POST/CON 2018”

Testing with Naughty Strings in Postman

Testing with Naughty Strings in Postman

Postman is a great tool for exploratory testing and the Big List of Naughty Strings (BLNS) is a great resource for exploratory testing, so I wanted to put the two things together into a Reese’s Peanut Butter Cup of tasty test flavor.

Step One: Getting the Naughty Strings

My plan was to use the Collection Runner to put each naughty string into my chosen API parameter. To do that, I would need a list of strings in a csv format. The BLNS repo includes a couple files with the strings encoded as base64, which is necessary for the csv parser, so my first quick and dirty solution was just to cut and paste the strings from blns.base64.json into a text file, slap a header on top and save it as a csv. Continue reading “Testing with Naughty Strings in Postman”

A Little Agile Night Music

A Little Agile Night Music

From the ages of 9 to 18 I dedicated at least an hour most days to practicing the cello. I was far from a prodigy, but with work, private lessons, and endless nagging by my mother, I was able to achieve a moderately high level of mediocre. Seattle has one of the best youth symphony orchestra organizations in the country and for two years I played in the top level orchestra. I was clinging by my fingernails to the very back of the section, but I was there, nonetheless

It has been 30 years since I played the cello seriously, but I find many parallels between my experiences as a cellist and my career as a software tester. Being in a siloed test team, such as the ones I experienced at Microsoft, is like playing in an orchestra. Ideally, the different sections work in concert towards a shared goal, watching management for cues on where to put the most effort. But there isn’t very much communication between the dev and test teams. At my last Microsoft position, the dev and test teams were on completely different floors, so we didn’t even see each other in the break room. Continue reading “A Little Agile Night Music”

Creating Weighted Flows in JMeter

It is pretty common for applications to have multiple flow paths. For example, it is common in mobile games to have one call flow for players that have authenticated with Facebook and a very different one for anonymous players. When trying to replicate a realistic server load in JMeter, it is important to be able to handle these different paths that users take through the client application.

JMeter actually has this capability right out of the box, no Groovy scripting or secondary plugins needed. With a Random Variable and a few If Controllers, you can enable any number of different flow paths in your load testing script. Continue reading “Creating Weighted Flows in JMeter”

Using Production Data in Continuous Integration Tests

Handling test data is a challenge for anyone testing a service or application that interacts with a database. One of the services my team is responsible for is already used by several games in production. So any changes have to be validated against the real production data. In this post, I’ll describe how I am able to get the data I need for continuous integration testing, without putting undue stress on our production databases or our DBA team. Continue reading “Using Production Data in Continuous Integration Tests”