Cucumber / Gherkin integration
Are there any BDD testing automation implementations within Mumps/Cache Objects already in existence?
We are looking at using Cucumber for our Java regression test automation and would like to use similar feature file testing with the Cache code.
Looking to use something existing before building it.
Regards,
-Karl
In Caché we have %UnitTest, you can find more information about it in the documentation. It is also possible to automate testing with various of Continuous Integration tools.
Thanks Dmitry, We use and enhanced version of %UnitTest already on our unit tests and behind the scenes functional tests.
We are looking for a way to run feature files directly in Cache. Ultimately these files will get broken down into test cases and tests, but that breakdown, running and reporting is what needs to be built if there isn't already something out there.
Ex feature file:
Feature: Login Action
Scenario: Successful Login with Valid Credentials
Given User is on Home Page
When User Navigate to LogIn Page
And User enters UserName and Password
Then Message displayed Login Successfully
Scenario: Successful LogOut
When User LogOut from the Application
Then Message displayed LogOut Successfully
-Karl
Hi Karl,
By 'application' in the example above, do you mean a web application hosted on a Cache server/written in COS?
Yes, it is very possible to do (and in fact we are working on transitioning our internal UI testing for IRIS and Healthshare to use a Cucumber BDD framework with Selenium Webdriver and Allure reporting - with scenarios as in the example below).
Would you like more details about the setup?
Thanks,
Olga
Hi, Olga.
Can you tell more about the details?
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.