I’m getting ready to start the development of integration tests for my OrmLite code. I’m using Dotnet Core, xUnit, and Visual Studio Code, and Jenkins for CI. I’d like to run integration tests against SQLServer, SQLite, and MySQL.I’d like to have the Test Fixture create a new, empty in-memory database in whatever actual database the environment/configuration specifies. All test methods in the class will use a transaction to create/populate tables as needed for the code being tested, validate, then rollback the transaction, which will provide an isolated environment for each test and allow parallel test execution.
Does OrmLite have any methods I can utilize in the test fixture that would ease the process of creating a new, empty database? Or should I just use DDL specific to each database server type to create the new empty test database?
(More of a hopeful wish here: :-)) Are you aware of any test runners or methodology that will let me run the same test class multiple times, with different values for environment variables before each run? So I can set an environment variable “TestDB” to the value e.g. “MySQL”, run the test class, change the variable “TestDB” to the value “mssql”, and run the test class again, and do this for each kind of database server automatically. Or even better, run the test classes for each environment value in parallel? I’m hoping that you’ve implemented such testing in ServiceStack, and can point me to some areas in the GitHub repositories I can study for ideas?
Thanks for an excellent product!