Building and testing an API with AI
APIs are the glue of the Internet these days. In 2022, API calls were responsible for 83% of all Internet traffic, and that number is not likely to decrease any time soon. Knowing how to build and test APIs is therefore essential knowledge for every development team.
To speed up that development and testing process, we can make use of the powers provided to us by LLMs, but only if we know what we’re doing and if we’re able to stay in control.
In this workshop, we are going to design, develop and test an API with several endpoints in a highly iterative manner, all with the help of AI. Every iteration brings a new challenge, new tasks to complete and new tests and test types to consider and execute.
In this way, we’ll incrementally build a comprehensive API testing strategy, and learn more about good practices for API design and development in the process. Along the way, you’ll learn how AI can help you build and test your API faster, while you remain in control of what is built and how it is tested.
Yes, I’d like to book this course for my team!
What will you learn?
This course covers, among other things:
API design
- Contract-first or code-first API design and development?
- Good API design practices
- Making your API easy to understand, consume and extend
API development
- Setting up a new API development project
- Using API development frameworks
- Implementing different routes for HTTP GET, POST, PUT / PATCH and DELETE
- Adding a database to your API
- Adding authentication and role-based access control to your endpoints
API testing
- Writing unit tests for logic in API controllers
- Exploratory API testing, focusing on behaviour and security
- Writing acceptance tests for individual API endpoints and for API scenarios
- Mocking databases and downstream services for testing purposes
- Building a build-test-deploy pipeline for our API
- Testing our API tests
Using AI responsibly
- Asking an LLM to build an API, one step at a time
- Using tests to drive the design and implementation of the API
- Discussing what can be left to the LLM and what we should do ourselves
Who should take this workshop?
This workshop is great for testers and developers who want to learn more about developing and testing APIs, and what it takes to do it well, especially now that we have LLMs at our disposal.
Some prior knowledge of APIs, HTTP and JSON, as well as of (object-oriented) software development and testing will be helpful.
Workshop duration and delivery
This introduction to Playwright workshop takes 6-8 hours. It works great either as an on-site or an online in-company workshop, or as a full-day conference tutorial.
I can deliver this course using a number of technologies:
- C# .NET with ASP.NET Core and RestAssured.Net or RestSharp for acceptance tests and NUnit, xUnit or MSTest for unit tests and as a test runner
- Java with Spring and REST Assured for acceptance tests and JUnit or TestNG for unit tests and as a test runner
- Python with FastAPI or Flask and requests for acceptance tests and unittest or pytest for unit tests and as a test runner
- JavaScript / TypeScript with Express and Axios or Pactum for acceptance tests and Jest or Mocha for unit tests and as a test runner
Don’t see your preferred technology stack in the list? Other technologies and libraries are available on demand.
I’m interested, what’s next?
I’m happy to hear that! Click the button below, complete the contact form, and I’ll get back to you as soon as possible.
Yes, I’d like to book this course for my team!
If you’d like to see the other training courses and workshops I have on offer, please click here.