sasafister's avatar

Testing with Sqlite JSON column?

As you may know, Sqlite has different approach to creating JSON fields, so I'm wondering how do you run phpunit with sqlite if you have some JSON columns?

Mysql as test DB is working fine, but it is slooow :(

So what's your approach?

0 likes
3 replies
jove's avatar

This won't help your answer but I think it may still be usefull to know. Sqlite operates differently that mysql so I ended up using mysql for test too because some tests failed in sqlite but not in mysql due to the data being different. And that sqlite missed some features that mysql had. I just found it to be too unreliable when what I was testing for was a mysql server. If I were to use sqlite in the prod system I would also use it for testing.

sasafister's avatar

@jove exactly, so do you have any tips how to speed up mysql tests? It's damn slow. Sqlite is so fast :)

jove's avatar

@sasafister No sorry I do not know, mine are quick, but probably slower than SQLite. I just have a Mariadb server running on my development PC with the default config for secure install.

(I have currently 40 tests and it only takes up to 15 sec)

Please or to participate in this conversation.