Bungalow64 / DBConfirm

A C# testing framework to write and run tests for logic within SQL Server.
https://www.dbconfirm.com
Apache License 2.0
7 stars 2 forks source link

Cross platform development #133

Open nholland20 opened 5 months ago

nholland20 commented 5 months ago

Hi - is this project designed for cross platform development? We are looking for a solution to move our db unit tests to Linux.

jamie-burns commented 5 months ago

Hey - thanks for your question. This project is written in .net and that runs on both Windows and Linux. You could set up a C# project that runs the DB tests and deploy that to Linux, if that's what you're meaning?

nholland20 commented 5 months ago

Yeah, we are looking to move our build and test machines from Windows and Linux. Another quick question. We are trying to find a way to both build cross-platform and something that works for a database engineers as well. Have you considered adding database set up as direct sql or is that out-of-scope for this project?

jamie-burns commented 5 months ago

Do you mean a setup script that runs once before the test run actually starts? If so, then that's probably best handled as a separate step before you kick the tests off. This project is mainly geared at making the individual tests repeatable, so there's nothing in there for the overall test run start or end.

If you look at the CI build for this project (https://github.com/Bungalow64/DBConfirm/blob/main/azure-pipelines.yml) we've got something similar there. The first task is setting up the DBs in Docker, then doing the build and running the tests. You might not be using Docker but the principle should hopefully be the same, whatever you're using to run the tests should hopefully be able to run any setup script.