.NET Core Integration Testing Basics #2- Infrastructure pre-provisioning & Data Cleanup

Поділитися
Вставка

КОМЕНТАРІ • 15

  • @dgodiegomartins
    @dgodiegomartins 7 місяців тому

    Thanks for the great content. I have a question regarding the database cleanup process. Should it really be inside a ClassFixture? My concern is that each test should be independent, and with the current approach, we are using the same data across multiple tests within the test class. Is that correct?

    • @vasiliioleinic
      @vasiliioleinic  7 місяців тому

      Hi, yes, IMO the cost of spinning up a new instance of the API and Database for every test method in a class is overkill. This is why we spin up one api/db/etc per test class, hence we need that cleanup process which efectively resets the whole setup to a clean/default state after every test method. Edit just to make clear: if the clean-up process works correctly the data generated by a test should not be there when the next test runs, and every test will run against an clean* database.

  • @ransandu
    @ransandu 3 місяці тому +1

    Thanks for this. I got a question. Sqledge container is for IOT dbs right? Does it work for other general business applications? I mean, can the Sqledge replace a RDBMS like MSSQL or Postgresql?

    • @vasiliioleinic
      @vasiliioleinic  3 місяці тому +1

      @@ransandu hi, technically it cloud. I never did it myself tho, using postgresql 90% of the time. I used sqledge in the video because it was the only option that was working with arm based macs (at the time I recorded the video), since then other providers stepped their game.

    • @ransandu
      @ransandu 3 місяці тому

      @@vasiliioleinic thanks for the clarification

  • @jephrennaicker4584
    @jephrennaicker4584 Рік тому +2

    Thanks I learnt alot!

  • @endotron
    @endotron 7 місяців тому

    Great video, I can't seem to resolve IApiMarker - is that because of a particular nuget package I'm missing, usually VS is good about pointing that out. Any help is appreciated.

    • @vasiliioleinic
      @vasiliioleinic  7 місяців тому +1

      Hi, thats an empty marker interface I created in part 1 inside the API

    • @endotron
      @endotron 7 місяців тому

      @@vasiliioleinic Oh sorry I must have skipped part 1. Thank you!

  • @luky92121
    @luky92121 11 місяців тому

    what about issue with running tests in parrallel - it will save my life

  • @sauravbhatta5303
    @sauravbhatta5303 Рік тому +1

    Zoom in plz. Harder to watch over the phone.