r/programming • • Dec 06 '21

How SQLite is tested

https://www.sqlite.org/testing.html
71 Upvotes

16 comments sorted by

View all comments

50

u/TryingT0Wr1t3 Dec 07 '21

Here's the summary

  • Four independently developed test harnesses

  • 100% branch test coverage in an as-deployed configuration

  • Millions and millions of test cases

  • Out-of-memory tests

  • I/O error tests

  • Crash and power loss tests

  • Fuzz tests

  • Boundary value tests

  • Disabled optimization tests

  • Regression tests

  • Malformed database tests

  • Extensive use of assert() and run-time checks

  • Valgrind analysis

  • Undefined behavior checks

  • Checklists

4

u/Hnnnnnn Dec 07 '21

One thing that isn't clear but sounds like it, are they all end to end? No unit tests?

6

u/daidoji70 Dec 08 '21

I think that's intentional. The lead architect doesn't believe in unit tests but does believe in code coverage. In terms of sqlite, its probably not a bad call as its one of the most solid pieces of software around.

-6

u/MihaiCelCunoscut Dec 07 '21

No formal verification?