Capturing emails in Acceptance tests with Specflow
Pretty much every web application out there nowadays needs to send emails, whether it be for registration, password reset or some other bespoke functionality. When you’re working in your own dev environment and building out features, tools like smtp4dev work great for capturing emails sent to localhost; to use, simply add the following to web.config
<system.net>
<mailSettings>
<smtp deliveryMethod="Network">
<network host="localhost" port="25" defaultCredentials="true" />
</smtp>
</mailSettings>
</system.net>
start smtp4dev.exe
and you can start capturing emails sent whilst developing. You can use web config transforms or slow cheetah to replace the mail settings for different build configurations too. But what about acceptance tests; how do you handle emails sent during acceptance test runs?
c# (16)
asp.net mvc (8)
javascript (6)
jquery (5)
search (4)
elasticsearch (4)
nest (3)
openai (2)
async (2)
asynchrony (2)
await (2)
f# (2)
dependency injection (2)
castle windsor (2)
model binding (2)
validation (2)
llm (1)
csharp (1)
ocr (1)
translation (1)
vector search (1)
qdrant (1)
x509 (1)
certificate (1)
ssl (1)
tls (1)
bouncy castle (1)
statiq (1)
github (1)
query (1)
array (1)
internalsvisibleto (1)
dotnet (1)
msbuild (1)
friend assemblies (1)
monitoring (1)
windows (1)
process (1)
procmon (1)
vagrant (1)
winrm (1)
powershell (1)
task parallel library (1)
tpl (1)
gnaf (1)
addresses (1)
australia (1)
sql server (1)
akka (1)
akka.net (1)
reactive (1)
actor model (1)
agents (1)
versioning (1)
optimistic concurrency (1)
geospatial (1)
geojson (1)
geometry (1)
resharper (1)
semanticmerge (1)
git (1)
refactoring (1)
clean code (1)
windows services (1)
topshelf (1)
masstransit (1)
email (1)
acceptance tests (1)
specflow (1)
smtp4dev (1)
bdd (1)
wsfederationauthenticationmodule (1)
classic asp (1)
windows identity foundation (1)
wif (1)
nuget (1)
asp.net web api (1)
parameter binding (1)
csv (1)
valueprovider (1)
signal r (1)
ndc 2012 (1)
conferences (1)
events (1)
razor (1)
continuation passing style (1)
captcha (1)
routing (1)
modelmetadata (1)
podcasts (1)