@testwizard/core
Version:
26 lines (19 loc) • 876 B
JavaScript
;
const Commands = require('@testwizard/commands-core');
class AddPerformanceDataCommand extends Commands.SessionCommandBase {
constructor(session) {
super(session, 'AddPerformanceData');
}
async execute(dataSetName, key, value, description) {
if (dataSetName === undefined)
throw new Error('dataSetName is required');
if (key === undefined)
throw new Error('key is required');
if (value === undefined)
throw new Error('value is required');
const requestObj = [dataSetName, key, value, description];
var json = await this.executeCommand(requestObj);
return new Commands.ResultForOkAndErrorCodeAndMessage(json, 'AddPerformanceData was successful', 'AddPerformanceData failed');
}
}
module.exports = AddPerformanceDataCommand;