Creating blog entry with details

As a blogger I should be able to create blog entries that appear on the home page so that users can read it.

We have already created a workflow to create a new blog entry.

Blog Creation:
  • create a new blog entry

Instead of creating a new workflow step for our requirement, we could rephrase the workflow step and add necessary parameters.

  1. Select the workflow step create a new blog entry, and click Rephrase workflow step from Context menu.
  2. Modify the workflow step such that the dialog box now displays create a new blog entry with title "title" subtitle "subtitle" and text "text". Press OK.
  3. Modify the underlying code in BlogCreation to:
    public void createANewBlogEntryWithTitleSubTitleAndText(String title, String subtitle, String text) {
            selenium.type("title", title);
            selenium.type("subtitle", subtitle);
            selenium.type("name=body", text);
            selenium.click("//button[@value='Save']");
    }
    
Note that existing all Scenarios that used create a new blog entry have been modified to now use create a new blog entry with title "title" subtitle "subtitle" and text "text".

Rephrasing a workflow step can be done from both the scenario and the underlying code:

  1. From the scenario: Use Rephrase workflow step from Context menu
  2. From the underlying Java code: Use change method signature to add/remove parameters

Proceed to Guidelines for writing tests.