this post was submitted on 18 Jul 2023
12 points (100.0% liked)

Software Testing

217 readers
1 users here now

Spreading knowledge on software testing and the value it can provide, as well as a location to ask questions about implementations or testing strategies or frameworks

Icon base by Delapouite under CC BY 3.0 with modifications to add a gradient

founded 1 year ago
MODERATORS
 

cross-posted from: https://programming.dev/post/619886

As of version 3.42.0 (2023-05-16), the SQLite library consists of approximately 155.8 KSLOC of C code. (KSLOC means thousands of "Source Lines Of Code" or, in other words, lines of code excluding blank lines and comments.) By comparison, the project has 590 times as much test code and test scripts - 92053.1 KSLOC.

  • 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

Related discussions:

top 3 comments
sorted by: hot top controversial new old
[–] [email protected] 4 points 1 year ago (1 children)

millions of test cases

I’m gonna post this in my Teams chat tomorrow and watch heads explode

our very large Enterprise software has like… 2,000 tests?

[–] JackbyDev 5 points 1 year ago (1 children)

To be fair, many of the tests SQLite runs are closed source and run because it needs to be aviation grade to run on commercial planes.

[–] [email protected] 3 points 1 year ago

yeah good point, I'd probably be too afraid to be responsible for that code

I should also say my 2,000 number was from a QA perspective only. Devs manage their own unit tests, but still the overall number is not that large in our department