Test Driven Development Lab

  • Code twice deploy once :D

What I've learned

  • Automated testing basically means we write code to test the actual code of our application automatically, meaning we end up with Prod\Dev Code and Testing Code;
  • More time efficient than manual testing which involves launching the application, Login\register, navigate to desired page, populate fields and verify the result.;
  • You write them once and they're FREE to run anytime as we require!;
  • Bug are caught before deployment and when we deploy, we do it with confidence!;
  • Unit Tests test a single class or small unit of related classes (quick);
  • Integration Tests cover a greater range of the system by testing the application with it's external dependencies like DB CRUD operations(slow);
  • User Interface tests, which cover user interface from buttons to subsystems including database level (slower);

Testing Pyramid

testing-pyramid

AAA

Arrange

  • Initially create object instances, create test data;

Act

  • Execute application code, call methods;

Assert

  • Check result, test passes or fails? Output vs expected result;

Tools used

  • Visual Studio 2019, .NET5, Microsoft SQL Server 18;

Some amazingly useful links

Git for Professionals
XML Documentation Comments
What is CI/CD
NUnit Assert Examples - How to Use?
Comparison between NUNIT and XUnit

  • Hosted at: Coming soon™;