green bar for unit tests
Brought to you by:
fabioz
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!
+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
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?
@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"?
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'.
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.
This is a feature that would really help developers. I can't wait to see it in the next release!
View and moderate all "feature-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "(deprecated) Please use https://www.brainwy.com/tracker/PyDev/"
+1.
This is a really good idea.
View and moderate all "feature-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "(deprecated) Please use https://www.brainwy.com/tracker/PyDev/"
This is will be of great help to the developers community. Please include this feature as soon as possible !
View and moderate all "feature-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "(deprecated) Please use https://www.brainwy.com/tracker/PyDev/"
Absolutely a must! specially with all the attention tests should have. Also, I agree 100% with the config suggestions by andresriancho.
+1
Happy to see this request is finally happening!
I agree with the checkbox suggestions.
+1
Any beta version of this feature we can test?
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.