Skip to main content

Tdd

Improving Code Quality with Testify in Go: A Deep Dive into Testing

·13 mins
Introduction # Testify is a popular testing toolkit for the Go programming language. It provides a wide range of assertion functions, test suite support, and mocking capabilities, making it a powerful tool for testing Go applications. Testify aims to simplify the process of writing tests and improve the quality of test coverage in Go applications. Testing is a critical aspect of software development that helps ensure that the software behaves as intended and catches bugs early in the development process. Writing tests can be time-consuming, but it is essential for delivering a reliable and maintainable software system. Testify can help make testing in Go more efficient and effective.

TDD Approach to Create an Authentication System With FastAPI Part 5

·9 mins
Introduction # We have been using FastAPI along with the Test-Driven Development process to come up with an authentication system. Till now we can register to own tiny application using a username and password. We are also able to generate a JWT token to be classified as a logged-in user. But there is no point in logging in until the logged-in user can do something privileged. In this iteration of the series, we’d see how to access a protected endpoint using FastAPI and JWT. Given that we already have a JWT token.

TDD Approach to Create an Authentication System With FastAPI Part 4

·11 mins
Introduction # In the last couple of posts in TDD Auth with FastAPI we’ve been sustainably moved towards a web service that can let users register with the service. Now what? We have already done the easy part. The next part is to look at the authorization. This involves letting the user log in. And only give access to what they are authorized for. Let us look at the login part first.

TDD Approach to Create an Authentication System With FastAPI Part 2

·15 mins
Introduction # In the last post in the series we did the project setup and seen some FastAPI basics along with red-green-refactor mantra of TDD. We know that FastAPI comes with inbuilt integration of SwaggerUI. We also know that FastAPI makes use of non-blocking code to make who thing lightning fast. With that said, let’s jump into our second part of the series which is about database setup and user registration.

A TDD Approach to Creating an Authentication System with FastAPI, Part 1

·8 mins
Introduction # I have been tinkering with this new framework and have a little bit of experience with FastAPI as of now. What I’ve though of is to do a post about authentication and authorization. I’m sure going to do a registration and login system and nothing fancy this time. I am going to use JWT as authorization mechanism. This is mostly a walkthrough of new features in Python.

Continuous Integration and Deployment to Beanstalk With Docker

In a previous post we discovered how can we run commands on each push and check if the test is passing against multiple versions of go. This is a continuation of the same concept. We are going to deploy our code to Elastic Beanstalk, straight from git push. Elastic Beanstalk is nothing but a wrapper around it’s EC2 infrastructure. It is a developer-centric view of deploying an application on AWS. Developers just have to push the code and Beanstalk can take care of Auto Scaling Group, Elastic Load Balancer, databases etc. No need to manage infrastructure manually.