To learn what kind of "software" project my automated testing team faces (I consider test automation a certain kind of software project), I assessed the size of our automated (functional, GUI-focussed) test suite. One key figure imho is the number of lines that our scripts consist of, surely listing comment and blank line separately from real code lines.

Now I'd like to find popular reference projects, either automated test suites, or applications, and their LOC figures to give an impression if our LOC count is astoundingly high (which I think it is), or not, in comparison to the test coverage (and other automated testing features) delivered.

Where can I find such figures? Where should I search? All I find easily is the LOC wikipedia article listing LOC figures for popular OS software project sources. In particular, I failed to find automated test suites' metrics.

While I think this does not make a big difference, our project is HP ALM- and HP UFT-based, with BPTs (i.e. business process testing tests, and components).

P.S.: I do understand LOC count is not the sole key indicator to look at, not even the most important one. It is, however, one of the most tangible ones that I have, enabling me to trigger thinking about what the code does, what coverage it delivers, if that is the kind of coverage we want, and if so, if it is efficiently maintainable -- and what alternatives we might have.

  • I'm not sure if there are any sources where the LOC of "popular" programms are listed, especially as they are also changing every day. And as you mentiend by yourself: LOC is quite unimportant im terms of saying anything about the quality of code.
    – bish
    Nov 30, 2015 at 9:11
  • You HP rep might be able to help. Nov 30, 2015 at 14:08
  • 1
    c2.com/cgi/wiki?LinesOfCode - "The number of lines of program code is wonderful metric. It's so easy to measure and almost impossible to interpret." -- "Measuring software productivity by lines of code is like measuring progress on an airplane by how much it weighs."- Bill Gates Nov 30, 2015 at 16:09
  • I totally agree. Then, please, I am looking for examples of such not-useful LOC figures. And, ehem, I doubt HP reps will come up with real-world representative figures...;) Nov 30, 2015 at 22:14

1 Answer 1


So you need real-world examples of LOC metrics in a software sources and a test suite LOC volume, right? I can share some rough metrics for one real-world project. Never heard about representative figures. It highly depends on technologies and tools you're using.

The applications are written in C++ (Windows only though). Metrics were done with simple Python script (no complicated parsing, just simple things).

1 289 287  total lines
1 072 302  total non-empty lines
1 014 829  total non-commented lines (lines starting with "//" excluded, but /* */ included)
5617  classes in *.h files

The GUI test suites are written in Python (using pywinauto library).

The total Python metrics include pywinauto code and running/reporting auxiliary libs:

147 157  lines in *.py files
122 582  non-empty lines in *.py files
101 832  non-commented lines in *.py files (lines starting with "#" excluded)
988  classes in *.py files

Test code itself (no pywinauto, no running/reporting libs):

39 322  lines in *.py files
31 544  non-empty lines in *.py files
26 826  non-commented lines in *.py files (lines starting with "#" excluded)
162  classes in *.py files

Probably some cross-platform project metrics would be more useful, if you were found it for me. :)

P.S. pywinauto is about 26k non-commented LOC now (and 3.5k LOC of GUI unit tests with 97% of code covered). It's not cross-platform yet.

P.P.S. So for pywinauto the tests are 13% of total LOC (with 97% statements covered), for the real-world project it's ~10% of total LOC (with ~80% of functions and ~60% of conditions covered). I don't know how it's good or not.

  • Yeah, that´s useful. If no "better" answers come up, this will remain the accepted answer. Thanks! Dec 3, 2015 at 12:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.