SlideShare una empresa de Scribd logo
1 de 54
Descargar para leer sin conexión
POSTMAN
ON
STEROIDSSARA TORNINCASA @ CODERMINE
GITHUB.COM/SARASEWARD/POSTMAN-ON-STEROIDS
HTTP REQUESTS WITH A FRIENDLY UI
the dinosaur's footprints
PUBLISH
DESIGN
& MOCK
DEBUG
AUTOMATED
TESTING
DOCUMENT
MONITOR
POSTMANFUNDAMENTALS
ENVIRONMENTS
VARIABLES
COLLECTIONS
WORKSPACES
ENVIRONMENTS
SESSION VALUES: HANDLE SENSITIVE VALUES
VARIABLES
VARIABLES
Dynamic variables in the request URL / headers / body:
{{$guid}} | {{$timestamp}} | {{$randomInt}}
Read more
VARIABLE SCOPES
GLOBAL
COLLECTION
ENVIRONMENT
DATA
LOCAL
COLLECTIONS & EXAMPLES
COLLECTIONS
Collections are groups of requests that can be run
together as a series of requests, against a
corresponding environment.
> Automate API testing
> Make better use of scripts: pass data between
requests...
> ...or build workflows that mirror your APIs' use case.
WORKSPACES
WORKSPACES
A workspace is a view of all the Postman
things you've come to use: collections,
environments, ...
> Individuals can organize their work in
personal workspaces
> Teams can collaborate in team
workspaces.
> You can share elements in multiple
workspaces at the same time.
ROLES
COLLECTIONS TEAMS WORKSPACES
Collection
Editor
Collection
Viewer
Team
Admin
Team
Billing
Team
Developer
Workspace
Admin
Workspace
Collaborator
Roles extended | All roles
VERSION CONTROL
> Fork a collection
> Merge between forks
> Pull between forks
Read More
SCRIPTS
TESTING
PRE REQUEST SCRIPTS & TESTS
BEFORE:
PRE REQUEST SCRIPTSARE SNIPPETS OF JAVASCRIPT CODE EXECUTED BEFORE THE REQUEST IS SENT.
AFTER:
TESTSARE SNIPPETS OF JAVASCRIPT CODE EXECUTED AFTER THE REQUEST IS SENT.
Test examples
pm.test("Response is ok", function () {
//ok, success, redirection, clientError, serverError
pm.response.to.be.ok;
});
pm.test("Response can be processed by clients", function () {
pm.response.to.be.json;
pm.response.to.not.have.jsonBody("error");
});
pm.test('There is at least one contract', function(){
var data = pm.response.json();
pm.expect(data.contracts.length).to.be.above(0);
})
pm.test('All contracts have one line', function(){
var data = pm.response.json();
for (i = 0; i < data.contracts.length; i++){
contract = data.contracts[i];
pm.expect(contract.lines.length).to.eql(1);
}
})
SCRIPT SCOPES
I love inserting data manually
— Nobody, ever
PASS DATA BETWEEN REQUESTS
pm.test("Response contains customerId and userId", function () {
pm.response.to.have.jsonBody("customerId");
pm.response.to.have.jsonBody("userId");
});
//Set global variable
var data = pm.response.json();
pm.environment.set("customerId", data.customerId);
console.log("Env customerId id is " + pm.environment.get("customerId"));
pm.environment.set("userId", data.userId);
console.log("Env userId id is " + pm.environment.get("userId"));
Pre request script...
schema = {
"properties": {
"customerId": {
"type": "string"
},
"jsessionId": {
"type": "string"
},
"userId": {
"type": "integer"
}
},
"required": [
"customerId",
"userId",
]
};
...Test
// Request MUST define a JSON schema under the name "schema"
// in its pre-requests scripts
pm.test('Schema is valid', function() {
var result=tv4.validateResult(pm.response.json(), schema);
if(!result.valid){
console.log(result);
}
pm.expect(result.valid).to.be.true;
});
COLLECTION RUNNERS
MONITORS
NEWMAN
COLLECTION RUNNERS
COLLECTION RUNNERS
Collection runners send all requests in one collection one
after another, with a specific:
> Environment
> Number of iterations
> Delay between requests
> Log level
> Data file
READ DATA FROM FILES
Override current variables with values defined in a .json
or .csv file.
[
{
"username":"purpleurkle",
"password":"waldos",
"lineId": "1234567890",
"contractId": "1234567890cc",
"useDataFile": true
}
]
Read More
WORKFLOWS
WORKFLOWS
Build and test workflows that mirror your actual use
case of APIs.
Read more
//Set next request
postman.setNextRequest("menu web (flows)")
//End collection run
postman.setNextRequest(null)
MONITORS
MONITORS
Monitors run a collection periodically, with a specific:
> Environment
> Run frequency
> Region
> Request timeout/delay
> Email notifications on failure
CD/CI INTEGRATION
WITH NEWMAN
NEWMAN
Newman is a command line Collection Runner for Postman.
You can configure continuous integration tools to
respond to Newman's exit status codes and
correspondingly pass or fail a build.
Read More | Newman docs on Github
dl npm @ https://nodejs.org/en/download/package-manager/
or run $ brew install node
$ npm install -g newman
$
$ newman run examples/sample-collection.json
$
$ newman run https://www.getpostman.com/collections/{{id}}
$
$ newman run -h
! Status Code Test
GET https://echo.getpostman.com/status/404 [404 Not Found, 534B, 1551ms]
1. response code is 200
"#########################$##########$##########%
& & executed & failed &
'#########################(##########(##########)
& iterations & 1 & 0 &
'#########################(##########(##########)
& requests & 1 & 0 &
'#########################(##########(##########)
& test-scripts & 1 & 0 &
'#########################(##########(##########)
& prerequest-scripts & 0 & 0 &
'#########################(##########(##########)
& assertions & 1 & 1 &
'#########################*##########*##########)
& total run duration: 1917ms &
'###############################################)
& total data received: 14B (approx) &
'###############################################)
& average response time: 1411ms &
+###############################################,
# failure detail
1. AssertionFai… response code is 200
at assertion:1 in test-script
inside "Status Code Test" of "Example Collection with
Failing Tests"
REPORTERS
Reporters are node modules that provide information
about the collection run in a specific format.
$ newman run examples/sample-collection.json -r cli, json
$ newman run examples/sample-collection.json --reporters json
cli [default] json
junit external (HTML)
Custom (Read more)
newman run <collection-file-source> [options]
$-e <source>, -environment<source>
$-g <source>, --globals <source>
$-d <source>, --iteration-data <source>
$-n <number>, --iteration-count <number>
$--folder <name>
...And More
THERE'S MORE!
DOCUMENTATION
Read more | Postman On Steroids docs
MOCK SERVER
Mock with examples | Mock with API | Matching algorithm | Read more
INTEGRATIONS
Read more
> Use Postman as proxy
> Generate code snippets
> Enterprise Audit logs
> Enterprise SSO
Pricing
DOCUMENTATION
Concepts
Blog
Youtube channel
THANKYOU
github.com/saraseward/postman-on-steroids | Pictures: learning.getpostman.com

Más contenido relacionado

La actualidad más candente

Perl web frameworks
Perl web frameworksPerl web frameworks
Perl web frameworks
diego_k
 
YAPC::Asia 2010 Twitter解析サービス
YAPC::Asia 2010 Twitter解析サービスYAPC::Asia 2010 Twitter解析サービス
YAPC::Asia 2010 Twitter解析サービス
Yusuke Wada
 
Decoupling Objects With Standard Interfaces
Decoupling Objects With Standard InterfacesDecoupling Objects With Standard Interfaces
Decoupling Objects With Standard Interfaces
Thomas Weinert
 

La actualidad más candente (20)

Everybody Loves AFNetworking ... and So Can you!
Everybody Loves AFNetworking ... and So Can you!Everybody Loves AFNetworking ... and So Can you!
Everybody Loves AFNetworking ... and So Can you!
 
Perl web frameworks
Perl web frameworksPerl web frameworks
Perl web frameworks
 
Web Apps in Perl - HTTP 101
Web Apps in Perl - HTTP 101Web Apps in Perl - HTTP 101
Web Apps in Perl - HTTP 101
 
Puppet Camp 2012
Puppet Camp 2012Puppet Camp 2012
Puppet Camp 2012
 
Grails 1.2 探検隊 -新たな聖杯をもとめて・・・-
Grails 1.2 探検隊 -新たな聖杯をもとめて・・・-Grails 1.2 探検隊 -新たな聖杯をもとめて・・・-
Grails 1.2 探検隊 -新たな聖杯をもとめて・・・-
 
Replacing "exec" with a type and provider: Return manifests to a declarative ...
Replacing "exec" with a type and provider: Return manifests to a declarative ...Replacing "exec" with a type and provider: Return manifests to a declarative ...
Replacing "exec" with a type and provider: Return manifests to a declarative ...
 
Testing Backbone applications with Jasmine
Testing Backbone applications with JasmineTesting Backbone applications with Jasmine
Testing Backbone applications with Jasmine
 
B03-GenomeContent-Intermine
B03-GenomeContent-IntermineB03-GenomeContent-Intermine
B03-GenomeContent-Intermine
 
Hack tutorial
Hack tutorialHack tutorial
Hack tutorial
 
第4回 g* ワークショップ はじめてみよう! Grailsプラグイン
第4回 g* ワークショップ はじめてみよう! Grailsプラグイン第4回 g* ワークショップ はじめてみよう! Grailsプラグイン
第4回 g* ワークショップ はじめてみよう! Grailsプラグイン
 
JavaScript Promise
JavaScript PromiseJavaScript Promise
JavaScript Promise
 
Eve - REST API for Humans™
Eve - REST API for Humans™Eve - REST API for Humans™
Eve - REST API for Humans™
 
YAPC::Asia 2010 Twitter解析サービス
YAPC::Asia 2010 Twitter解析サービスYAPC::Asia 2010 Twitter解析サービス
YAPC::Asia 2010 Twitter解析サービス
 
RESTful web services
RESTful web servicesRESTful web services
RESTful web services
 
Decoupling Objects With Standard Interfaces
Decoupling Objects With Standard InterfacesDecoupling Objects With Standard Interfaces
Decoupling Objects With Standard Interfaces
 
Asynchronous Programming FTW! 2 (with AnyEvent)
Asynchronous Programming FTW! 2 (with AnyEvent)Asynchronous Programming FTW! 2 (with AnyEvent)
Asynchronous Programming FTW! 2 (with AnyEvent)
 
"The little big project. From zero to hero in two weeks with 3 front-end engi...
"The little big project. From zero to hero in two weeks with 3 front-end engi..."The little big project. From zero to hero in two weeks with 3 front-end engi...
"The little big project. From zero to hero in two weeks with 3 front-end engi...
 
第3回Grails/Groovy勉強会名古屋「Grails名古屋座談会」
第3回Grails/Groovy勉強会名古屋「Grails名古屋座談会」第3回Grails/Groovy勉強会名古屋「Grails名古屋座談会」
第3回Grails/Groovy勉強会名古屋「Grails名古屋座談会」
 
Introduction to Nodejs
Introduction to NodejsIntroduction to Nodejs
Introduction to Nodejs
 
Tools for Solving Performance Issues
Tools for Solving Performance IssuesTools for Solving Performance Issues
Tools for Solving Performance Issues
 

Similar a Postman On Steroids

Quality Assurance for PHP projects - ZendCon 2012
Quality Assurance for PHP projects - ZendCon 2012Quality Assurance for PHP projects - ZendCon 2012
Quality Assurance for PHP projects - ZendCon 2012
Michelangelo van Dam
 
Socket applications
Socket applicationsSocket applications
Socket applications
João Moura
 
fog or: How I Learned to Stop Worrying and Love the Cloud (OpenStack Edition)
fog or: How I Learned to Stop Worrying and Love the Cloud (OpenStack Edition)fog or: How I Learned to Stop Worrying and Love the Cloud (OpenStack Edition)
fog or: How I Learned to Stop Worrying and Love the Cloud (OpenStack Edition)
Wesley Beary
 

Similar a Postman On Steroids (20)

Having Fun with Play
Having Fun with PlayHaving Fun with Play
Having Fun with Play
 
Broadleaf Presents Thymeleaf
Broadleaf Presents ThymeleafBroadleaf Presents Thymeleaf
Broadleaf Presents Thymeleaf
 
Charla EHU Noviembre 2014 - Desarrollo Web
Charla EHU Noviembre 2014 - Desarrollo WebCharla EHU Noviembre 2014 - Desarrollo Web
Charla EHU Noviembre 2014 - Desarrollo Web
 
Future of Web Apps: Google Gears
Future of Web Apps: Google GearsFuture of Web Apps: Google Gears
Future of Web Apps: Google Gears
 
Load Testing with PHP and RedLine13
Load Testing with PHP and RedLine13Load Testing with PHP and RedLine13
Load Testing with PHP and RedLine13
 
Burn down the silos! Helping dev and ops gel on high availability websites
Burn down the silos! Helping dev and ops gel on high availability websitesBurn down the silos! Helping dev and ops gel on high availability websites
Burn down the silos! Helping dev and ops gel on high availability websites
 
Kicking off with Zend Expressive and Doctrine ORM (PHP UK 2017)
Kicking off with Zend Expressive and Doctrine ORM (PHP UK 2017)Kicking off with Zend Expressive and Doctrine ORM (PHP UK 2017)
Kicking off with Zend Expressive and Doctrine ORM (PHP UK 2017)
 
Crafting Quality PHP Applications (Bucharest Tech Week 2017)
Crafting Quality PHP Applications (Bucharest Tech Week 2017)Crafting Quality PHP Applications (Bucharest Tech Week 2017)
Crafting Quality PHP Applications (Bucharest Tech Week 2017)
 
Bonnes pratiques de développement avec Node js
Bonnes pratiques de développement avec Node jsBonnes pratiques de développement avec Node js
Bonnes pratiques de développement avec Node js
 
Os Pruett
Os PruettOs Pruett
Os Pruett
 
Kicking off with Zend Expressive and Doctrine ORM (Sunshine PHP 2017)
Kicking off with Zend Expressive and Doctrine ORM (Sunshine PHP 2017)Kicking off with Zend Expressive and Doctrine ORM (Sunshine PHP 2017)
Kicking off with Zend Expressive and Doctrine ORM (Sunshine PHP 2017)
 
Quality Assurance for PHP projects - ZendCon 2012
Quality Assurance for PHP projects - ZendCon 2012Quality Assurance for PHP projects - ZendCon 2012
Quality Assurance for PHP projects - ZendCon 2012
 
Beyond Cookies, Persistent Storage For Web Applications Web Directions North ...
Beyond Cookies, Persistent Storage For Web Applications Web Directions North ...Beyond Cookies, Persistent Storage For Web Applications Web Directions North ...
Beyond Cookies, Persistent Storage For Web Applications Web Directions North ...
 
Logstash for SEO: come monitorare i Log del Web Server in realtime
Logstash for SEO: come monitorare i Log del Web Server in realtimeLogstash for SEO: come monitorare i Log del Web Server in realtime
Logstash for SEO: come monitorare i Log del Web Server in realtime
 
Socket applications
Socket applicationsSocket applications
Socket applications
 
Crafting Quality PHP Applications (ConFoo YVR 2017)
Crafting Quality PHP Applications (ConFoo YVR 2017)Crafting Quality PHP Applications (ConFoo YVR 2017)
Crafting Quality PHP Applications (ConFoo YVR 2017)
 
Refactoring using Codeception
Refactoring using CodeceptionRefactoring using Codeception
Refactoring using Codeception
 
CQRS / ES & DDD Demystified
CQRS / ES & DDD DemystifiedCQRS / ES & DDD Demystified
CQRS / ES & DDD Demystified
 
fog or: How I Learned to Stop Worrying and Love the Cloud (OpenStack Edition)
fog or: How I Learned to Stop Worrying and Love the Cloud (OpenStack Edition)fog or: How I Learned to Stop Worrying and Love the Cloud (OpenStack Edition)
fog or: How I Learned to Stop Worrying and Love the Cloud (OpenStack Edition)
 
Cross Domain Web
Mashups with JQuery and Google App Engine
Cross Domain Web
Mashups with JQuery and Google App EngineCross Domain Web
Mashups with JQuery and Google App Engine
Cross Domain Web
Mashups with JQuery and Google App Engine
 

Último

Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
VictoriaMetrics
 
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
masabamasaba
 

Último (20)

Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
 
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
 
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
 
WSO2Con2024 - From Blueprint to Brilliance: WSO2's Guide to API-First Enginee...
WSO2Con2024 - From Blueprint to Brilliance: WSO2's Guide to API-First Enginee...WSO2Con2024 - From Blueprint to Brilliance: WSO2's Guide to API-First Enginee...
WSO2Con2024 - From Blueprint to Brilliance: WSO2's Guide to API-First Enginee...
 
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
 
WSO2CON 2024 Slides - Unlocking Value with AI
WSO2CON 2024 Slides - Unlocking Value with AIWSO2CON 2024 Slides - Unlocking Value with AI
WSO2CON 2024 Slides - Unlocking Value with AI
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
 
WSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaSWSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaS
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
WSO2Con2024 - Hello Choreo Presentation - Kanchana
WSO2Con2024 - Hello Choreo Presentation - KanchanaWSO2Con2024 - Hello Choreo Presentation - Kanchana
WSO2Con2024 - Hello Choreo Presentation - Kanchana
 
tonesoftg
tonesoftgtonesoftg
tonesoftg
 
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
 

Postman On Steroids