Skip to content
Rubens Dos Santos Filho edited this page Feb 7, 2019 · 3 revisions

Updates one or more records in the informed database table during the test execution.

Parameters

Attribute Type Name
table string Table name
data Object TEMP-TABLE like JSON with the record(s) data
index string[] List with table index columns

This method returns a Promise with true value or with an Error instance depending if the command was successfully executed or not.

const data = {
  Department: [
    {
      DeptCode: 'PRC',
      DeptName: 'Purchasing Dept.'
    },
    {
      DeptCode: 'HRM',
      DeptName: 'HR Manag. Dept.'
    }
  ]
};

oeAgent.update('Department', data, ['DeptCode']);
Clone this wiki locally