Comments (8)
Hi @Veritogen / @Diego-Hernandez-Moodys
Sorry for the long delay. I have reworked the plugin a bit to be able to support this feature without having everything break.
I expect to deliver it by end of week. I need to solve a bias in memory snapshot first but I don't expect it to be very long.
from pytest-monitor.
Same issue here.
In my current setup it would be especially intressting to see metrics in tests that fail.
from pytest-monitor.
Hello
Thanks for submitting. Failed tests are filtered out on purpose (primarily designed that way to get consistent metrics).
However, the subject has been previously raised in #27 and at that time decision has been taken to postpone it.
I think it may be time for that improvement. Now the question game:
- shall we add test status (failed or succeeded) or not? I personally tend to think that the status is of interest for those willing to filter out failed test.
- shall we add an option to activate that behavior (by extension, the current behavior will be the default one) or should we consider it default?
from pytest-monitor.
@js-dieu It's useful because I expect to use this to test for memory leaks. To answer your questions
- Yes, add the status to have parity with the pytest output
- It should be on by default since that's what the user would see in the pytest output. They should have an option to turn off the plugin, though.
One row for each test case please.
from pytest-monitor.
I'd also like to see the results of failed tests in the database by default.
@js-dieu If you can point me to where changes are needed to accomplish that and if its not too much of implementation effort, my employer allows me to implement this kind of stuff during my work time.
from pytest-monitor.
@js-dieu awesome, thats great to hear. Let me know if there's something you could need help with.
I also made a prove of concept for a DBHandler that can handle postgres for persisting the test results. Should I raise a PR for that?
from pytest-monitor.
Is there any progress on that? The feature would be quite handy.
from pytest-monitor.
As the discussion froze and @js-dieu seems to be busy, I decided to do my own changes locally. I'm gonna summarize my insights below so in case this feature will be implemented in the future.
- I added a new table column (boolean) "TEST_PASSED" to the METRICS table to reflect if a test passed or not and changed the wrapper functions accordingly
- As the memory_profiler module is not maintained anymore and the company I work is not able to take maintainership, I stripped out and simplified the logic needed for memory measurement and put it in a new module profiler.py inside of this project.
- I changed the functions calls from the plugin to the profiler accordingly and introduced a new attribute "passed" in the pytest node to be able to hand through the information to the database
Of course I would be open to make a PR if you want, but I'm not sure if I did it the way it was intended by you.
from pytest-monitor.
Related Issues (20)
- add support for unittests (via pytest) HOT 9
- Provide an option to force garbage collector to run between tests HOT 2
- discuss best memory measurement approach and possible leak detection
- Backend realization HOT 2
- Unable to send measures on monitor-server
- Write monitor-output of tests to console HOT 6
- Incorrect result HOT 6
- pytest.skip() in a fixture causes an AttributeError for monitor_results during teardown HOT 5
- creating/binding a socket in a fixture causes it to not close HOT 6
- unicode issue in determine_scm_revision with Perforce
- Crash on __init__ if psutil.cpu_freq() gives no results HOT 1
- Running pytest after install pytest-monitor results in `FileNotFoundError: [Errno 2] No such file or directory (originated from sysctl(HW_CPU_FREQ))` HOT 6
- NotImplementedError: can't find current frequency file HOT 4
- Support for newer python versions HOT 1
- Drop python 3.7/pytest 5.*
- Use black and flake8 with pre-commit hooks
- Add Bitbucket CI details to
- Add postgres DB handler
- --no-monitor breaks pytest.raises and django_assert_num_queries HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pytest-monitor.