Giter VIP home page Giter VIP logo

Comments (8)

js-dieu avatar js-dieu commented on June 12, 2024 1

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.

michelfurrer avatar michelfurrer commented on June 12, 2024

Same issue here.
In my current setup it would be especially intressting to see metrics in tests that fail.

from pytest-monitor.

js-dieu avatar js-dieu commented on June 12, 2024

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.

Diego-Hernandez-Moodys avatar Diego-Hernandez-Moodys commented on June 12, 2024

@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.

Veritogen avatar Veritogen commented on June 12, 2024

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.

Veritogen avatar Veritogen commented on June 12, 2024

@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.

lhpt2 avatar lhpt2 commented on June 12, 2024

Is there any progress on that? The feature would be quite handy.

from pytest-monitor.

lhpt2 avatar lhpt2 commented on June 12, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.