R S O F T WA R E E N G I N E E R I S O LU T I O N S A G R U F E R 7 M A R C R U F E R A black and white sign with white text Description automatically generated
I O N I N T E G R AT I O N T E S T I N G I N . N E T A B O U T D ATA B A S E S A N D T E S T I N G T E S TC O N TA I N E RS C I / C D F I N A L T I P S
middleware, configuration, DI, … ▪ REST endpoints, request-response pipeline and serialization / deserialization can be tested ▪ Executable in CI pipeline (automation)
System under test (SUT) ▪ Create test web host for the SUT ▪ Use test server client to handle requests and responses ▪ Use test runner to execute and report
N TO P O F B L A Z O R . B F F. A Z U R E A D.T E M P L AT E ( M I C R O S O F T E N T R A I D ) • S Q L D ATA B A S E D E P E N D E N C Y & E F C O R E A D D E D
locally ▪ Windows agents cannot run all containers ▪ Fake AntiForgery token validation instead of deregistering it ▪ Fully debuggable ▪ Assert REST API responses with Verify.Xunit
▪ Testcontainers ▪ GitHub repository with sample code ▪ [HOWTO] Implement integration tests for ASP.NET Core Web API with AntiForgery token validation ▪ [FollowUp] Using Testcontainers in integration tests for ASP.NET Core Web API ▪ [NoBrainer] Avoid HTTPS redirection warnings in integration test logs