Continuous testing

2007-07-14
2013-03-15
  • Thank's for a great product that I have high hopes on to make me more productive... now to my question.

    What's the simplest way to get PyDev (or Eclipse in general) to Run a file whenever I save it?

    That way all unit tests belonging to the module will be run, by using the __name__ == '__main__' idiom, and I won't be able to save without having any errors or failures will nagging me to fix them. (I usually set the TestRunner to make it rewardingly quiet when everything passes once in while.)

    On the same topic: Are there already some Eclipse plugin that can parse the output of unittest and populate the Problems view with it?

     
    • > (I usually set the TestRunner to make it rewardingly quiet when everything passes once in while.)

      Gha! Should be:

      (I usually set the TestRunner to silent to make it rewardingly quiet when everything passes once in while.)

       
    • > What's the simplest way to get PyDev (or Eclipse in general) to Run a file whenever I save it?

      Come to think about it. Having an option to automatically invoke the PyDev test runner on the whole project when saving may be a more preferable behavior for continuous testing... I can always keep on running test for single modules by hitting F9 as always.

      I guess the continuous thing can be implemented with Jython-scripting of PyDev? Unless there is an even simpler, more general, way to do it.

       
    • Ok, so I've started implementing this as a Jython-script for PyDev and building my own custom test runner.  Guess I should join pydev-code now. :-)