Have you implemented OpenMRS? Please participate in the Implementation Site Survey. If you already have, thank you!
Page tree

Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0


Infoq presentation - http://www.infoq.com/presentations/bdd-dan-north

How to write BDD tests

Wiki Markup*           * Irrespective of any             Irrespective of any language/framework, BDD tests will follow similar pattern.    We will have set of stories which are written in the format of \ [Given, When, Then\]. These stories are mapped to appropriate steps(original test code is written in steps).

Code Block
GivenStories: org/openmrs/stories/go_to_admin_page.story

Given I am on Admin page
When I click on the Advanced Settings link
Then take me to Advanced Settings Page with Advanced Settings as heading

When I type Test1 as name
When I type Test2 as value

And I click on Save button
Then display message Global properties saved


                             This maven profile runs the specified tests on the release-test database, provided that you’ve already created the release-test database using the profile “integration-test”.  When you use this profile to run a test, it start the server by connecting it to the release-test database and executes the specified tests. Make sure you've ran integration-test profile before you ran smoke-test because the integration-test profile will help in establishing the database and corresponding properties file.

Maven command for the same is as follows.