ScanAPI
Automated Integration Testing and Live Documentation
for your API
Camila Maia
1
EuroPython 2020
Slide 2
Slide 2 text
Motivation
Everything started in a week which I as Firefighter
2
Slide 3
Slide 3 text
I work at...
3
Slide 4
Slide 4 text
Who am I?
4
- Brazilian Backend Developer
- Bachelor of Computer Information System
- Coding since 2010
- Python and Ruby
- Events: Pyjamas and EuroPython
Slide 5
Slide 5 text
Motivation
Everything started in a week which I as Firefighter
5
Slide 6
Slide 6 text
Motivation
Integration Errors
6
- Client sending fields
different than what’s
expected
- Frontend receiving fields
different than what’s
expected
How does it work?
Chaining Requests ⛓
24
- Get details of a Pokémon
- In this case, the data is “static”, but it might not be.
- https://pokeapi.co/api/v2/pokemon/bulbasaur
Slide 25
Slide 25 text
How does it work?
Chaining requests ⛓
25
requests:
- name: pokemon
path: pokemon
requests:
- name: list_all
method: get
path: /
vars:
pokemon_name: ${{ response.json()["results"][0]["name"] }}
tests: ...
pokemon/${pokemon_name}
- name: details
method: get
path: ${pokemon_name}
How does it work?
And there is more
30
- Language-independent
- It also accepts API spec in JSON
- Environment variables
- Hide sensitive info in the report
- Multiple files API specification
- Custom templates
Slide 31
Slide 31 text
Can I start using it?
For sure!
31
Slide 32
Slide 32 text
scanapi.dev
32
Slide 33
Slide 33 text
Next Steps
What about the future?
33
- Missing HTTP methods (current: GET, POST, PUT, PATCH, DELETE)
- JSON visualization
- Docs + Tutorials
- Website improvements
- GitHub Action
And what if….
- OpenAPI
Slide 34
Slide 34 text
Why to contribute?
Join us!
34
- Backend, frontend, automation, design
- “Pure Python”
- Understand how a lib works
- Test coverage > 90%
- Issues with labels - i.e: good first issue
Slide 35
Slide 35 text
Why to contribute?
Join us!
35
How Open Source Changed My Life with Max Stoiber
Slide 36
Slide 36 text
Sprint Session
36
- Sprint session on this
weekend - July 25th and
26th (free!)
#sprint-scanapi
More information
Slide 37
Slide 37 text
github.com/scanapi ⭐
37
Slide 38
Slide 38 text
We are hiring!
Loadsmart
38
Direct Link
Slide 39
Slide 39 text
THANK YOU
@cmaiacd camilamaia
#talk-scanapi
#sprint-scanapi