Replies:

Hi Talita and Karl,

Sorry about the late response. Reading your question again, the answer should be that there are currently no native Cucumber bindings for Object script.

The above example is using Cucumber's javascript bindings to work with WebdriverIO, a node.js implementation of Selenium WebDriver, to test the Management Portal UI, so it not quite what you're looking for.

However it is possible, to some extent, to test Object script code using Cucumber's javascript bindings to invoke object script commands within step definitions using the ISCNodeAPI.

For example, using its invoke_command method as follows:

let irisnode = require("../../common/utilities/iris1200.node");

When(/^I execute the following SQL statement (.*)$/, function (sql) {
    let myData = new irisnode.IRIS(); 
    sql = 'SELECT name, number FROM "SQLUser"."customer"'; 
    var stmt = myData.create_instance({class: "%SQL.Statement" }); 
    var r = myData.invoke_method( stmt, { method: "%Prepare", arguments: [ sql ] } );
    var result = myData.invoke_method( stmt, { method: "%Execute" } );
})  

This is certainly not ideal, so it would be great if SmartBear or someone else were to work on actual cucumber bindings for COS.

Thank you for the response! Could code within the unit test class set these additional fields in the new mapping table programatically?  (Sorry, am a bit unfamiliar with %UnitTests, just looking at aggregating/classifying their results).

To be more specific about what I'm trying to do:  it's to generate a new field/value in %UnitTest_Result.TestSuite  
in addition to Name, TestInstance, ID, Duration, ErrorAction, ErrorDescription, Status which appear to be available by default.   

Followers:
Olga has no followers yet.
Following:
Olga has not followed anybody yet.
Global Masters badges:
Olga has no Global Masters badges yet.