PetaPoco icon indicating copy to clipboard operation
PetaPoco copied to clipboard

Integration tests

Open asherber opened this issue 5 years ago • 3 comments

I see that there's a wiki page with information about integration tests for this library. @pleb Can you add some information about how to set up our machines to run these tests?

asherber avatar Sep 29 '18 18:09 asherber

@asherber sure. I'll jot a few things down now, and promise to add better docs soon.

Required software

Docker for windows

Instructions to run integration tests

  1. Start the test SQL databases by running docker compose
    // Note: the first run will take awhile, as it needs to download all the docker images. 
    // Future runs, after the initial download, should be very fast.

    // From the root of the PetaPoco source folder, run

    Powershell/Dos: docker-compose.exe -f docker-compose.yml up

image

  1. Running the integration tests

I normally don't run all the providers, as access, sql ce and sqlite can be a pain in the ass. The other providers seem to work well.

  • Access requires Access or the MS download to make it work here, but it can be a major pain to actually get it working. Only works with FF (not standard)
  • SQL CE only works with FF (not standard)
  • SQlite work with FF and partially with standard. I had to change provider for standard and it doesn't work the same.

The Jetbrains test explorer is my go-to pick. As it seems to handle the .net standard vs full framework better.

Using the R# test explorer (My favourite)

image

Using the built-in test explorer

image

pleb avatar Oct 03 '18 10:10 pleb

Let me know if you need more info

pleb avatar Oct 03 '18 10:10 pleb

Thanks, it was mostly the docker setup I wasn't sure about.

asherber avatar Oct 03 '18 13:10 asherber