Hacker News new | past | comments | ask | show | jobs | submit login
Pytest-austin: performance regression testing with no instrumentation (github.com/p403n1x87)
45 points by p403n1x87 on Oct 22, 2020 | hide | past | favorite | 10 comments



I hope TypeScript community will come up with something as powerful as py.test soon. Fixtures keep your wrists agony free when writing tests. Asserts are joy to read. Decorators make everything readable. Plugin system has a solution for everything.

Meanwhile in the JS land I.cannot().keep.guessing().what().crap().to.chain.or.not().


Have you tried https://jestjs.io/? It doesn't have as crazy of chaining like Mocha and has snapshots which I sometimes miss when using pytest.


pytest is awesome, but I wish pytest were more like rspec. In my opinion, rspec is THE BEST testing framework out there.


Isn’t the built in unittest based on rspec?


Jest and power asserts is what I use now. It is the best you get but still an order of magnitude behind py.test


Has anyone used something like this to report performance regressions? I don't as much want to assert that performance stays below X seconds on particular tests, and more want a report on pull requests if any tests regressed more than X%, the same way I currently get CI reports for coverage regressions.



That's a good idea and planned for the next release.


Yesterday I was wondering if anything like this existed after accidentally adding 100 duplicate database requests on a Django endpoint.


django_assert_num_queries is helpful for this as well -- basically any time I'm writing a test for something where I've spent time thinking about query efficiency in the first place, I'll throw in an assert. (I actually use a homerolled version that can log the location of the queries with -v, but same idea.)

https://pytest-django.readthedocs.io/en/latest/helpers.html#...




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: