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
I've noticed that using the testing library on NuGet assumes something about how you are testing.
The method:
letrunWith config webParts =...
creates a http handler on a port and then when you use it together with
letreqResp ...
it disposes the SuaveTestContext. That implies that you need to a new instance using runWith for each test, i.e. it's singe use. If the test runner decides to run the tests in parallel then you need to set a port for each test.
It would perhaps be nice to have more of those assumptions specified more clearly. Perhaps as an example of how to test your Suave app in the examples folder?
That blog post implies that you don't need to go through the trouble of having the full stack up and running. So perhaps it would make sense to have a namespace or module in the testing lib intended for use when you don't want a full http handler up and running.
Thoughts?
The text was updated successfully, but these errors were encountered:
Suave.Testing
I've noticed that using the testing library on NuGet assumes something about how you are testing.
The method:
creates a http handler on a port and then when you use it together with
it disposes the
SuaveTestContext
. That implies that you need to a new instance using runWith for each test, i.e. it's singe use. If the test runner decides to run the tests in parallel then you need to set a port for each test.It would perhaps be nice to have more of those assumptions specified more clearly. Perhaps as an example of how to test your Suave app in the examples folder?
Suave Testing light
On the other hand you have An Introduction To Testing Suave WebParts by @MattJOlson.
That blog post implies that you don't need to go through the trouble of having the full stack up and running. So perhaps it would make sense to have a namespace or module in the testing lib intended for use when you don't want a full http handler up and running.
Thoughts?
The text was updated successfully, but these errors were encountered: