coveragepy,
@coveragepy@hachyderm.io avatar

I'd like to do more measurements of real-world test suite running times.

Do you have a project with an easily runnable test suite that takes between 1 and 10 minutes to run and uses coverage? Ideally it could also be run without coverage measurement, and can run under Python 3.12.

TIA!

paulox,
@paulox@fosstodon.org avatar

@coveragepy you can try with Django. Starting with the 5.0 version it supports Python 3.12, it uses coverage and the last test result I checked took 9 minutes
https://djangoci.com/job/pull-requests-focal/database=sqlite3,label=focal-pr,python=python3.12/22729/testReport/

coveragepy,
@coveragepy@hachyderm.io avatar

@paulox Thanks, good idea! But when I follow the directions:

clone django; cd django

$ brew install libmemcached
$ pip install -e .
$ coverage run tests/runtests.py --settings=test_sqlite
$coverage report --format=total --precision=6

I get a total of 32.848540 which seems way too low. How do you run it, and what total do you get? Maybe I'm missing a step?

paulox,
@paulox@fosstodon.org avatar

@coveragepy your value is way too low.

You missed only one step:

$ coverage combine

And after that, I get a higher value:

$ coverage report --format=total --precision=6
78.587580

Here you can find the reference:
https://docs.djangoproject.com/en/dev/internals/contributing/writing-code/unit-tests/#code-coverage

#Django #Test #Coverage

coveragepy,
@coveragepy@hachyderm.io avatar

@paulox Thanks, but I must be missing something else. Before coverage combine I have only one .coverage* file. Running coverage combine says "No data to combine." I think I missed an earlier step.

paulox,
@paulox@fosstodon.org avatar

@coveragepy these are the steps I did:

$ cd tests/
$ python -m pip install -e ..
$ python -m pip install -r requirements/py3.txt
$ coverage run ./runtests.py --settings=test_sqlite
$ coverage combine
$ coverage report --format=total --precision=6

coveragepy,
@coveragepy@hachyderm.io avatar

@paulox Ah, I needed to be in the tests directory...

paulox,
@paulox@fosstodon.org avatar

@coveragepy exactly. 🙂
I hadn't seen this message from you before my previous reply.

danyeaw,
@danyeaw@fosstodon.org avatar

@coveragepy https://github.com/gaphor/gaphor if you want to test a Desktop app

  • All
  • Subscribed
  • Moderated
  • Favorites
  • python
  • ngwrru68w68
  • rosin
  • GTA5RPClips
  • osvaldo12
  • love
  • Youngstown
  • slotface
  • khanakhh
  • everett
  • kavyap
  • mdbf
  • DreamBathrooms
  • thenastyranch
  • magazineikmin
  • megavids
  • InstantRegret
  • normalnudes
  • tacticalgear
  • cubers
  • ethstaker
  • modclub
  • cisconetworking
  • Durango
  • anitta
  • Leos
  • tester
  • provamag3
  • JUstTest
  • All magazines