How to SAVE a webform in Simpletest?
You need to mimics the user's behaviour.

You need to submit individually each form in multiple steps.

You must write correctly the field names (look for input names in the DOM with Firebug or Developer Tools)

  $edit = array();
  $edit['title'] = 'Sample webform';
  $edit["body[$langcode][0][value]"] = $this-&gt;randomName();
  $this-&gt;drupalPost('node/add/webform', $edit, t('Save'));


then submit the fields individually:

  $edit = array();
  $edit['add[name]'] = 'Sample webform';
  $edit['add[type]'] = 'textfield';//or whatever, optional
  $this-&gt;drupalPost('node/webforms/components', $edit, t('Add'));


Rinse and repeat.

You can create a custom function to perform that.