JSONPath: Query JSON Structures
Over deze cursus
JSONPath is een querytaal voor JSON, net zoals XPath dat is voor XML. Als je een API test gebruik je het om één waarde uit een response te halen, een lijst terug te brengen tot de items die je nodig hebt, en daar precies op te asserten, in plaats van de hele body te matchen. Deze cursus behandelt JSONPath voor API-testers, met live oefeningen.
Veelgebruikte JSONPath-expressies
| Expressie | Geeft terug |
|---|---|
$.user.email |
het veld email op het user-object |
$.items[0] |
het eerste item in de lijst |
$.items[*].id |
de id van elk item in de lijst |
$.items[?(@.price > 10)] |
items met een prijs boven tien |
$..sku |
elke sku waar dan ook in de response |
Een kort voorbeeld
# De id van de eerste order die nog open staat
$.orders[?(@.status=='open')][0].id
In de cursus werk je met wildcards, recursief zoeken, en filters op echte API-responses, elke stap met directe feedback.
Cursus Inhoud
Over je trainer
Roy de Kleijn · Trainer softwaretesten
Roy de Kleijn heeft meer dan 15 jaar praktijkervaring in software testing en testautomatisering. Hij schrijft en onderhoudt elke Testsmith-cursus, zodat wat je oefent aansluit op hoe het werk echt gedaan wordt.
Verbind op LinkedInReviews
I had a great learning experience with the JSONPath: Query JSON Structures course from TestSmith. The concepts were explained in a simple and clear manner, making it easy to understand how to navigate complex JSON structures, access nested objects, work with arrays, and extract specific values. As someone working in QA and API testing, I found this course particularly useful because these concepts are directly applicable to validating API responses in real-world testing scenarios. A special thanks to Roy de Kleijn for putting together this course and explaining the concepts so effectively. The practical approach made learning much easier and more interesting. I would definitely love to explore more courses from TestSmith, especially on Core Java and API Testing, with hands-on exercises and real-world examples. Looking forward to learning more and strengthening my technical skills with TestSmith!
Nog geen account? Registreer
Wat je krijgt
- 34 uitgebreide lessen
- Leer op je eigen tempo
- Interactieve oefeningen
- Volg je voortgang