Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Implement support for additional test runner in PyCharm

I'm working on my own python testing framework which I'd like to use within PyCharm. Is this something that can only be achieved by implementing a custom plugin or is there another (simpler) way to add my framework to PyCharm's test runner? If it can be done without a plugin, what would the procedure be and what kind of interactions would be required between PyCharm and the framework?

like image 522
mdwhatcott Avatar asked Mar 06 '26 07:03

mdwhatcott


1 Answers

Code for supporting a test framework in PyCharm consists of two parts: IDE plugin (written in Java and running inside PyCharm) and runtime component (written in Python and integrated with your test framework). The IDE plugin provides the user interface for editing run configurations, creates the command line for running the tests and displays the test results. The runtime component reports the progress of test execution in the format that the IDE plugin can understand.

The standard format we use for communicating between the runtime and the IDE plugin is TeamCity service messages printed to the standard output stream:

http://confluence.jetbrains.net/display/TCD65/Build+Script+Interaction+with+TeamCity

If you use those too, you can reuse the components for parsing the output and displaying the test results view.

like image 50
yole Avatar answered Mar 07 '26 21:03

yole



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!