Friday, March 12, 2010

Using YAML syntax to write your tests.

Writing tests for OpenERP modules is not only about XML anymore!

Today, we are announcing the support of YAML syntax to write your tests. In a nutshell, YAML has a clean declarative syntax but more concise and readable than XML, with some bells and whistles. YAML support will be part of the next stable release of OpenERP, but you can try it now in the latest development release (trunk).

YAML should provide at least the same benefits as XML for loading data and writing tests (views remain written in XML). There are some sample test files in the account module (in the trunk) where you will see that, for example, you can write pure Python code (not only assertions/expressions) in a YAML block. We will soon update the documentation with the additional features YAML provides above those of XML.

The YAML support for tests is still a work in progress. I you find a bug or have suggestions, please report it with Launchpad. You can also contribute to the code as usual.


Recently, Camptocamp introduced OERPScenario, a tool to write business cases in a high level language based on Ruby and Cucumber.

YAML and OERPScenario are two distinct and independent tools to write tests for OpenERP modules.