As a QA Engineer who has been working with UIVeri5 testing automation framework for one and a half years, I want to share the experience. So In this blog post you will find an initial configuration and dummy examples with automated tests using the framework.
UIVeri5 is an E2E testing framework for UI5-based applications. It uses WebDriverJS to drive a real browser and interacts with your application as a real user would. UIVeri5 is heavily inspired by Protractor and brings most (and more) of its benefits to UI5 applications.
{
"name": "uiveri5-example",
"version": "0.0.0",
"scripts": {
"tests": "uiveri5 ./tests/conf.js"
},
"dependencies": {
"@ui5/uiveri5": "~1.46.0",
"path": "^0.12.7"
},
"engines": {
"node": ">=0.10"
}
}
npm install @ui5/uiveri5
exports.config = {
profile: 'integration',
baseUrl: 'https://openui5.hana.ondemand.com/api/’, // define url to your app
specs: [
path.relative(process.cwd(), path.join(__dirname, '*', '*.spec.js'))
/* define all spec files (as a list) that you want to run */
]
};
describe('exampleSpec', function () {
beforeAll(() => {
const cookieSettingsDialog = element(by.control({
controlType: "sap.m.Dialog",
properties: {title: "Your Cookie Settings"}
}));
const acceptAllButton = cookieSettingsDialog.element(by.control({
controlType: "sap.m.Button",
properties: {text: "Accept All"}
}));
acceptAllButton.click()
});
beforeEach(() => { });
afterEach(() => { });
afterAll(() => { });
it('Check Change Version Dialog opening', function () {
// get button by bindingPath
const changeVersionButton = element(by.control({
controlType: "sap.m.Button",
bindingPath: {
modelName: "appView",
propertyPath: "/bShowVersionSwitchInHeader"
}
}));
const changeVersionDialog = element(by.control({
controlType: "sap.m.Dialog",
properties: {title: "Change Version"}
}));
changeVersionButton.click();
expect(changeVersionDialog.isDisplayed()).toBeTruthy()
});
});
...
"scripts": { "tests": "uiveri5 ./tests/conf.js" }
...
...
"tests": "uiveri5 ./tests/conf.js --specs=./tests/integration/exampleSpec.spec.js"
...
it('Check that there are versions 1.89.*', function () {
const changeVersionDialog = element(by.control({
controlType: "sap.m.Dialog",
properties: {title: "Change Version"}
}));
const versionSearchField = changeVersionDialog.element(by.control({
controlType: "sap.m.SearchField"
}));
const versionStandardListItems = changeVersionDialog.all(by.control({
controlType: "sap.m.StandardListItem",
id: /-versionList-/
}));
versionSearchField.sendKeys(`1.89\n`);
expect(versionStandardListItems.count()).toBeGreaterThan(0);
});
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
5 | |
4 | |
4 | |
4 | |
3 | |
3 | |
2 | |
2 | |
2 | |
2 |