Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Tudo que você sempre quis saber sobre testes de...
Search
Frederico Moreira
May 05, 2017
Technology
0
62
Tudo que você sempre quis saber sobre testes de APIs REST, mas que nunca te contaram...
Palestra no TDC 2017 - Florianopolis
Frederico Moreira
May 05, 2017
Tweet
Share
More Decks by Frederico Moreira
See All by Frederico Moreira
3 Tópicos sobre testes em APIs GraphQL que todo QA deveria saber.
fredmoreira
0
73
Because every QA should know API Testing
fredmoreira
0
130
Para, entenda seu contexto e contribua de maneira efetiva como QA
fredmoreira
0
42
Pirâmide testes mobile, distribua seus testes de maneira efetiva
fredmoreira
1
48
Porque todo QA deveria saber testes de APIs
fredmoreira
0
130
Testes de APIs
fredmoreira
0
72
Microservices alterando seu mindset de tester
fredmoreira
1
140
Palestra de como testar sua API Rest no Grupo de Teste Carioca
fredmoreira
0
35
Docker para testers - Um passeio fora da caixa
fredmoreira
0
50
Other Decks in Technology
See All in Technology
Yahoo!ショッピングのレコメンデーション・システムにおけるML実践の一例
lycorptech_jp
PRO
1
180
[JAWS DAYS 2026]私の AWS DevOps Agent 推しポイント
furuton
0
140
作りっぱなしで終わらせない! 価値を出し続ける AI エージェントのための「信頼性」設計 / Designing Reliability for AI Agents that Deliver Continuous Value
aoto
PRO
2
270
Oracle Database@AWS:サービス概要のご紹介
oracle4engineer
PRO
3
1.7k
情シスのための生成AI実践ガイド2026 / Generative AI Practical Guide for Business Technology 2026
glidenote
0
190
聲の形にみるアクセシビリティ
tomokusaba
0
170
Exadata Database Service on Dedicated Infrastructure(ExaDB-D) UI スクリーン・キャプチャ集
oracle4engineer
PRO
8
7.2k
「ストレッチゾーンに挑戦し続ける」ことって難しくないですか? メンバーの持続的成長を支えるEMの環境設計
sansantech
PRO
3
610
オレ達はAWS管理をやりたいんじゃない!開発の生産性を爆アゲしたいんだ!!
wkm2
4
490
SRE NEXT 2026 CfP レビュアーが語る聞きたくなるプロポーザルとは?
yutakawasaki0911
0
220
vLLM Community Meetup Tokyo #3 オープニングトーク
jpishikawa
0
310
Claude Codeの進化と各機能の活かし方
oikon48
21
12k
Featured
See All Featured
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
0
220
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
1
2.4k
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.1k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
290
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
89
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
99
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
82
The Pragmatic Product Professional
lauravandoore
37
7.2k
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
460
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
140
Game over? The fight for quality and originality in the time of robots
wayneb77
1
130
Transcript
Frederico Moreira Tudo que você sempre quis saber sobre testes
de APIs Rests, mas que nunca te contaram... @fredaomoreira
MG • Café, testes e pão de queijo • MTC
- Minas Testing Conference Agile Testers • Fórum • Agile Testers Conference UAI, TREM, SÔ • if(pinga && torresmo) @fredaomoreira @ConcreteS
O que é uma API?
Uma API é criada quando uma empresa de software tem
a intenção de que outros criadores de software desenvolvam produtos associados ao seu serviço. “ Fonte: https://goo.gl/zMwp3U
Exemplos de APIs: Companhias Aéreas • Google Flights • Sky
Scanner Cálculo de entrega (CEP) • e-commerce Geolocalização • API Google Maps
Pirâmide de Testes “Ideal” Mike Cohn UI Service Unit Manual
Testes no Nível de Serviço Preenche o gap entre testes
unitários e de UI Acontecem em paralelo ao desenvolvimento Foco na funcionalidade e não no comportamento/experiência Testa critérios de aceite mesmo antes da interface(mobile ou web) estar desenvolvida. Subcutaneous Test - Martin Fowler
REST em cima de protocolo HTTP mas você pode usar
REST com outro protocolos como TCP, UDP e gRPC (http://www.grpc.io/). O mais comum de encontrar no mercado são projetos novos usando
None
None
None
None
None
None
None
None
None
None
None
http://racksburg.com/choosing-an-http-status-code/
Como testar manualmente?
Ferramentas http://www.telerik.com/fiddler https://www.getpostman.com/
Entendendo transações HTTP
request response VIEW
None
#COMANDO CURL curl -i -X GET "http://localhost:5000/contacts?name=Tester" #HEADER HTTP/1.1 200
OK X-Powered-By: Express Content-Type: application/json; charset=utf-8 Content-Length: 110 ETag: W/"6e-Za+ESrkoytVXhydy0NJoFA" Date: Mon, 14 Mar 2016 18:17:19 GMT Connection: keep-alive #BODY [{"_id":"56d5efa8c82593800291c02b","name":"Tester","mobilephone":"05 52188889999","homephone":"0552133332222"}]
Mas eu preciso mesmo automatizar testes de API? “ disse
o QA
None
Mundo JS http://frisbyjs.com/ http://www.fredmoreira.com/2014/11/como-voce-anda-testando-sua-api-rest.htm l http://dareid.github.io/chakram/ https://github.com/fredmoreira/ApiTest
Mundo Ruby https://ruby-doc.org/stdlib-2.3.1/libdoc/net/http/rdoc/Net/HTTP.html https://github.com/jnunemaker/httparty https://github.com/jnunemaker/httparty https://github.com/lostisland/faraday https://github.com/fredmoreira/api-test-ruby
Mundo Java https://github.com/fredmoreira/demo-rest-assured https://www.youtube.com/watch?v=dShI6n1CSoY @juliodelimas
Mundo Python https://github.com/fredmoreira/demo-pyresttest https://github.com/svanoort/pyresttest
https://github.com/fredmoreira/phone-book
Segurança O que eu como QA consigo pensar em segurança,
nos testes de APIs?
Dependências NodeJs • Snyk • NSP Java e .NET •
OWASP Dependency-check Python • Dependency-check-py
X-XSS-Protection
Appcanary Tudo que você precisa saber sobre segurança em headers
HTTP https://blog.appcanary.com/2017/http-securit y-headers.html
E se eu sou preguiçoso(a) ?
http://www.mocky.io/
https://apiary.io/
Mas porque? Porque eu como QA deveria saber testar API?
O que teste de API pode me ajudar no meu dia a dia?
Links: • https://snyk.io/ • https://github.com/nodesecurity/nsp • https://www.owasp.org/index.php/OWASP_Dependency_Check • https://github.com/jhermann/dependency-check-py
• http://www.fredmoreira.com/2014/11/como-voce-anda-te stando-sua-api-rest.html • https://httpstatuses.com/ • http://apimetrics.io/2015/03/31/automated-api-testing-ne cessary/ • https://goo.gl/5vM84j
• http://sensedia.com/blog/apis/sites-para-descobrir-apis/ • http://keeptesting.com.br/2014/09/09/testando-suas-api s-com-frisby-js/ Links:
Repositórios: • https://github.com/fredmoreira/demo-pyresttest • https://github.com/fredmoreira/demo-rest-assured • https://github.com/fredmoreira/ApiTest • https://github.com/fredmoreira/api-test-ruby •
https://github.com/fredmoreira/phone-book
Dúvidas?
None