Skip to main content

4 posts tagged with "tdd"

View All Tags

How To Attach a Debugger to a Running FastAPI Server in VS Code

· 4 min read
Morgan Moneywise
CEO at Morgan Moneywise, Inc.

picture of a cute bug hacking into a server

Introduction​

In the realm of software development, debugging is not only inevitable but can also be a complex endeavor.

Picture this: you're faced with the task of deciphering what's occurring within a server that's already humming along. Relaunching it with an attached debugger, the usual go-to method, isn't an option.

In this post, we'll navigate this challenge, zeroing in on how to debug an already running FastAPI server in the rag-stack project as an example. And for those on a tight schedule, here's a quick video tutorial breaking down the process:

How to Simplify Docker Container Management in Integration Tests Using Pytest-Docker

· 4 min read
Morgan Moneywise
CEO at Morgan Moneywise, Inc.

picture of gears to represent integration tests

Introduction​

Today, we're going to discuss an efficient way to set up your automated integration test workflows using Docker and Pytest.

Motivation​

In an era where software complexity is rapidly growing, developing an efficient testing strategy is more than a mere best practice — it's the bedrock of stable and reliable applications.

One common strategy involves using Docker to set up a test version of a software component, such as a vector database. There are two popular variations to this strategy, both of which have their own limitations.

Effortless VSCode Setup: Debug 3rd Party Libraries with Pytest in Minutes!

· One min read
Morgan Moneywise
CEO at Morgan Moneywise, Inc.

Every time I work on a Python project, I find myself having to look up the VS Code launch configuration to enable Pytest to step into 3rd party libraries when using the interactive debugger. It became quite frustrating, and I knew I couldn't be the only one facing this issue. So, I decided to create a video tutorial to share my knowledge and help fellow developers set up their projects more efficiently.

My VS Code Setup To Practice TDD When Developing REST APIs

· One min read
Morgan Moneywise
CEO at Morgan Moneywise, Inc.

A lot of people I know will repeatedly alternate between writing an endpoint in their IDE and Postman/Swagger to test it. I do not like this workflow because of the constant context switching. I also find that it's easy to forget to test a scenario or to test the wrong scenario. I've found that it's much easier to test the API in the IDE itself.

I personally prefer the Test Driven Development (TDD) approach. I find that it helps me to write better code and to think about the API design before I actually start writing code. I also find that it helps me to write better tests and to think about the different scenarios that I need to test for.

So, how can we do this in VS Code?