Test Driven Development in Go Language with VS Codes

On this article, we want to show you how to implement test driven development in Go Language with VS Codes.

What is Test Driven Development

Test Driven Development (TDD) is a programming technique when you do test first development. It is introduced in the era eXtreme Programming with their Agile process. The idea of test driven is like this

  • Create the empty function with input and output.
  • Create the unit test regarding the function
  • Make it fail (yes, it shall fail since it's empty function)
  • Correct the function
  • Make it pass

It provides you an extra step, but it will make your code quality better

Before we start

Before we start you should install

  • Visual Studio Codes
  • Go Languages SDK
  • Go extension in VS Codes

You can visit the tutorial here.


On this video demonstration, I will show you how to:

  • Create a skeleton function
  • Invoke the Test Generator to generate the test function
  • Creating test case
  • Invoke the unit test
  • Fix the codes
  • Rerun the test till pass

Add comment

  Country flag

  • Comment
  • Preview

Topics Highlights

About @ridife

This blog will be dedicated to integrate a knowledge between academic and industry need in the Software Engineering, DevOps, Cloud Computing and Microsoft 365 platform. Enjoy this blog and let's get in touch in any social media.


Month List