I am able to save a sample webform in Simpletest if I only use title and body:
$edit = array();
$edit['title'] = 'Sample webform';
$edit["body[$langcode][0][value]"] = $this->randomName();
$this->drupalPost('node/add/webform', $edit, t('Save'));
But when it comes to add the additional fields,
$edit['customfield_xxx'] = '0053416';
the test fails:
Failed to set field customfield_xxx to 0053416
Is any nesting necessary to make it work?
UPDATE It seems like after submitting the form as describe above I need to access the components page: $this->drupalGet('node/1/webform/components'); where I build an array with all components. However I have been able to fill in the specific component form with 1 single field.