Collections, Variables & Environments

Part 8 — organising requests and reusing values like a professional.

By SixQuality · API Testing

A single request is useful; dozens of organised, reusable requests are powerful. Postman's collections, variables, and environments are what take you from ad-hoc calls to a maintainable test suite.

Collections

A collection is a saved group of related requests — for example, all the calls for a "users" API. Collections can be organised into folders, shared with a team, and run as a whole.

Variables

Variables let you avoid hard-coding values. Instead of typing a base URL or token into every request, you reference a variable like {{baseUrl}} and change it in one place.

Environments

An environment is a set of variable values for a particular context — dev, test, or production. Switching environments re-points your whole collection without editing a single request.

One collection, many environments

Collection
→
Dev env baseUrl, token
Test env baseUrl, token
Prod env baseUrl, token
Why it matters: variables and environments make your tests portable and maintainable — the same collection runs against any environment just by switching a dropdown.

Conclusion

Collections group your requests, variables remove hard-coded values, and environments let one suite run anywhere. Together they turn scattered calls into an organised, reusable foundation for automation.

← Previous: 7. Your First Request in Postman Next: 9. Assertions & Automating Tests in Postman →