hackforla / peopledepot

A project to setup a datastore for people and projects at HackforLA. The link below takes you to the code documentation
https://hackforla.github.io/peopledepot/
GNU General Public License v2.0
7 stars 26 forks source link

Technical: make testing faster #414

Open ethanstrominger opened 1 week ago

ethanstrominger commented 1 week ago

Overview

Speed of testing has significant impact on development - more than just the time that it takes, it interrupts the flow.

There are three ways to speed it up:

fyliu commented 1 week ago

I see these are quick ways to speed up the tests.

Any general idea how long the tests take to run currently and how much these measures speed it up? Having the expected savings for each measure is useful for a developer to decide what to enable/disable. If it's reducing the run time to 1/8 with a quad-core hyperthreaded CPU (8 virtual processors), then we can expect not worry about speed again until we added 8x the tests we have now.

A root cause of the slowness is that the tests are accessing the database every time. A great way to speed up tests is to make each test run faster by not accessing the database. It's also not quick.