If you don't know, Komodo IDE 10.2 got a new look for its Unit Testing feature.
I've decided to tell you about most important changes in it.
Unit test wizard
First of all, we got a new comfortable UI for creating test plans.
You can do anything that you were able to do with the old unittest wizard.
More over, you can create file-specific tests by editing the command (just pick the Custom item in the framework list). The "Path" input will be the current working directory for your test plan, so you could use relative paths to your files :)
Unit test pane
You can now sort your passes by 4 categories: Successful, Failed, Error and All.
You can also filter by test suite if the unit test framework supports it (e.g. Python/NodeJS unit test frameworks; thanks to Nathan Rijksen from the Komodo Team for pointing that to me!)
(you can see a tree-like view where
Mpociot\... things are test suites).
As you can see, there are 2 new checkboxes:
- Run on Save will run the whole test once you save a file located in the unittest path (e.g.
- Show details will show some additional details (e.g. error message) right below the pass item. (in case it's too long, it will be truncated).
stderr tabs contains the output and errors of the unit test command that Komodo run (in my case:
rspec -f RspecTap::Formatter).
The old unit testing implementation didn't run tests the same way you would when you run them from the command line. This were causing some troubles.
As for now, Komodo runs tests in the same way you run them from your favorite terminal. It's all about parsing them now.
Komodo supports the following formatters:
- go test
Supported frameworks are:
- RSpec for Ruby
- PHPUnit for PHP
- pytest for Python 2 and Python 3
- prove for Perl
- Mocha for NodeJS
go testfor Golang
But you can use custom framework as long as it could format its output to the one of supported formatters. For example, if a Ruby project you maintain uses
bacon for unit testing instead of RSpec or Minitest, you could easily create a test plan for it. Just pick "Custom" in the framework chooser, write the command that will create a TAP-formatted output (
bacon --tap filename.rb) and you're done.
If you have any questions, you can ask them in the comments section or on the Forums.