Menu

#481 green bar for unit tests

open
nobody
None
5
2010-11-10
2010-09-01
Yoni Tsafir
No

I would like to have a green/red bar when I run my tests, instead of having to look at the console and checking if tests passed
(like the JUnit view for java)

Also, it would be nice to have a checkbox in preferences that says "Run tests each time you save the file" or something.

I know PyCharm have these features, but I like PyDev better, so common! Make them too! :)

Maybe you can already do this things now but I really couldn't find how!

Discussion

  • Andres Riancho

    Andres Riancho - 2010-11-09

    +1 On this request!
    I think it would be *really* helpful for many people to have the "green and red bar" when running unit tests AND the feature of being able to automatically run unit tests when a file changes. Other plugins like RDT [0] (like PyDev but for Ruby) have this, so I imagine its not that hard to develop.

    [0] http://www.ibm.com/developerworks/opensource/library/os-rubyeclipse/Fig13.jpg

     
  • Fabio Zadrozny

    Fabio Zadrozny - 2010-11-09
    • status: open --> pending
     
  • Fabio Zadrozny

    Fabio Zadrozny - 2010-11-09

    I'm working on this feature now.

    As for the 'run test each time', this means it'd run the test when a file with a testcase changes or when any source code changes it'd run the test cases that it thinks are related?

     
  • Andres Riancho

    Andres Riancho - 2010-11-09

    @fabioz: I think it should be configurable, because running the unittests in big projects might take some time, so I would put these configuration options:

    [ ] Run unittests when any file changes
    [x] Run unittests when a file with unittests changes
    [ ] Run unittests when a file referenced from a module with unittests changes

    The second one would be the enabled by default (at least in my world).
    Regarding the third option that you mention, how would you define "thinks are related"?

     
  • Fabio Zadrozny

    Fabio Zadrozny - 2010-11-09

    The 3rd would be something like checking the changed file, getting the valid python names, getting all the available tests and check if the test has any reference to a name in that module (it may end up running some tests that it doesn't have to and may be slower to get the valid modules, but it may be a reasonable compromise or running all tests vs running only when test file changes).

    Note that probably the default would be 'don't run anything when file changes'.

     
  • Andres Riancho

    Andres Riancho - 2010-11-09

    I agree with that default. I was thinking about a global "Enable unit tests" checkbox, that when enabled would have the options we talked about inside.

     
  • Javier Andalia

    Javier Andalia - 2010-11-09

    This is a feature that would really help developers. I can't wait to see it in the next release!

     
  • Diego Scheinin

    Diego Scheinin - 2010-11-09

    +1

     
  • Yoni Tsafir

    Yoni Tsafir - 2010-11-10
    • status: pending --> open
     
  • Yoni Tsafir

    Yoni Tsafir - 2010-11-10

    Happy to see this request is finally happening!
    I agree with the checkbox suggestions.

     
  • Diego Andres Buthay

    +1

     
  • Andres Riancho

    Andres Riancho - 2010-11-29

    Any beta version of this feature we can test?

     
  • Fabio Zadrozny

    Fabio Zadrozny - 2010-12-11

    Just did the first part of this feature (http://pydev.blogspot.com/2010/12/improved-unittest-support-in-pydev.html). Still missing the run tests on file changes, but this should come soon.

     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.