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 have a .NET core tests of API. Inside my API I am doing many different other http calls. I wanted to verify the response from my API with Verify.Http and it works if I run a single test. But If I am running all tests then Verify somehow records also those "internal" http calls done by my API instead of the response given to my test by my API....
on the left - when I run multiple tests. On the right - when running single test.
...
I am using MSTests.
My setup:
[TestClass]
[UsesVerify]
public partial class VerifyChecksTests
{
[TestMethod]
public Task Run() => VerifyChecks.Run();
[ModuleInitializer]
public static void Initialize()
{
VerifyHttp.Initialize();
Recording.Start();
}
}
public abstract class IntegrationTestsBase
{
protected readonly VerifySettings _verifySettings = new VerifySettings();
protected readonly HttpClient _httpClient;
protected IntegrationTestsBase()
{
_verifySettings.UseDirectory("Infrastructure/VerifySnapshots");
var app = new WebApplicationFactory<Program>().WithWebHostBuilder(builder =>
{
....
_httpClient = app.CreateClient();
I have a .NET core tests of API. Inside my API I am doing many different other http calls. I wanted to verify the response from my API with Verify.Http and it works if I run a single test. But If I am running all tests then Verify somehow records also those "internal" http calls done by my API instead of the response given to my test by my API....
on the left - when I run multiple tests. On the right - when running single test.
...
I am using MSTests.
My setup:
Example test:
Am I doing something wrong or is it a bug?
The text was updated successfully, but these errors were encountered: