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
Porque todo QA deveria saber testes de APIs
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Frederico Moreira
June 05, 2017
Technology
150
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Porque todo QA deveria saber testes de APIs
Palestra apresentada no Agile Testers Conference de Belo Horizonte em 2017.
Frederico Moreira
June 05, 2017
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
91
Because every QA should know API Testing
fredmoreira
0
130
Para, entenda seu contexto e contribua de maneira efetiva como QA
fredmoreira
0
53
Pirâmide testes mobile, distribua seus testes de maneira efetiva
fredmoreira
1
55
Tudo que você sempre quis saber sobre testes de APIs REST, mas que nunca te contaram...
fredmoreira
0
72
Testes de APIs
fredmoreira
0
77
Microservices alterando seu mindset de tester
fredmoreira
1
140
Palestra de como testar sua API Rest no Grupo de Teste Carioca
fredmoreira
0
41
Docker para testers - Um passeio fora da caixa
fredmoreira
0
61
Other Decks in Technology
See All in Technology
生成 AI の基礎 〜 サンプル実装で学ぶ基本原理
enakai00
7
4.4k
PLATEAU で バーチャル花火大会
tatsuya1970
0
110
システム思考で問題に対処する
yussak
0
210
モダンフロントエンド 開発研修
recruitengineers
PRO
4
570
『三匹の子ぶた』から学ぶネットワークセキュリティの昔と今 / Network Security: Then and Now Through the Lens of The Three Little Pigs
nttcom
1
1.8k
Webアクセシビリティ入門 2026
recruitengineers
PRO
3
460
老害フォレンジッカーはAI羊の夢を見るか?
tadmaddad
0
310
制約理論(ToC)入門 2026版
recruitengineers
PRO
7
2.1k
Issue設計から始める仕様駆動開発 / 20260731 Mizuki Hirata
shift_evolve
PRO
1
150
トヨタ⽣産⽅式(TPS)⼊⾨
recruitengineers
PRO
3
660
Forza Horizon 6 のテレメトリ機能で 自動運転に使えそうな学習データを集める話
henjin0
0
150
オートロックマンションなのに、各部屋は施錠なし!? 攻撃者が組織内ネットワークで大暴れする理由 / The Front Door Is Locked, but the Rooms Are Wide Open: Why Attackers Move Freely Inside Enterprise Networks
nttcom
1
1.6k
Featured
See All Featured
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
400
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
1.7k
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2.1k
Paper Plane
katiecoart
PRO
2
52k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.8k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
200
Building a Scalable Design System with Sketch
lauravandoore
463
34k
Scaling GitHub
holman
464
140k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.9k
Believing is Seeing
oripsolob
1
180
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
1.1k
Transcript
Frederico Moreira @fredaomoreira Porque todo QA deveria saber testes de
API ?
MG • Café, testes e pão de queijo • MTC
- Minas Testing Conference Agile Testers • Fórum • Agile Testers Conference UAI, TREM, SÔ, PÃO DE QUEIJO • if(pinga && torresmo) @fredaomoreira @ConcreteS
Mas porque? Porque eu como QA deveria saber testar API?
O que teste de API pode me ajudar no meu dia a dia?
Quem aqui testa API hoje? Quem já testou API?
Arquitetura Calabash IOS https://github.com/calabash/calabash-ios-server
Front-End Back-End Node.js HTML 5 CSS 3 Angular.js iOS Android
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
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/
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