Building and testing an API
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.
Unfortunately, despite the importance of APIs, a lot of API testing is still conducted in a very shallow way, and typically also quite late in the development process.
After an API endpoint has been built and deployed into a test environment, we invoke some endpoints, check response HTTP status codes and some of the data, and then we often call it a day.
This course is meant to change that situation. In an iterative and highly interactive way, we are going to design, develop and test an API with several endpoints.
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.
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 project
- 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
- Inspecting API specification documents
- 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
- An introduction to contract testing
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.
Some prior knowledge of APIs, HTTP and JSON and XML, as well as of (object-oriented) software development and testing is beneficial, but I am confident that even without this, you will find this workshop to be very valuable.
Workshop duration and delivery
This course takes 2-3 days, depending on the level of depth we agree on and the prior experience of the participants.
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.