You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
GTechene edited this page Aug 8, 2024
·
3 revisions
SAS is an acronym that stands for Scenario/API/Simulator which are 3 main pillars to build readable and maintenable acceptance tests for .Net Core applications. A description of this concept can be found in this article (currently in French; coming soon in English).
This library aims to relieve the developers of the burden of writing boilerplate code to wirte such tests.
Scenario is the test business context. There isn't much the library can do here as this is completely business-oriented.
API is basically a way to instanciate the whole API under test in memory. In .Net Core, that means using WebApplicationFactory under the hood.
A Simulator is a stub that will simulate a specific layer of the code. Since we are talking about acceptance tests here, simulators are usually stubs to infra layers (e.g. database interaction, third-party REST service, etc...).
There are several available packages that target different needs and offer various helpers.
You can find an example code that uses the library here.