GithubHelp home page GithubHelp logo

bendkt / ui5-uiveri5 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sap/ui5-uiveri5

0.0 0.0 0.0 295 KB

End-to-end testing framework for SAPUI5

License: Apache License 2.0

JavaScript 94.16% HTML 5.84%

ui5-uiveri5's Introduction

openui5

What is it

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.

Benefits

  • Automatic synchronization with UI5 app rendering so there is no need to add waits and sleeps to your test. Tests are reliable by design.
  • Tests are written in synchronous manner, no callbacks, no promise chaining so are really simple to write and maintain.
  • Full power of webdriverjs, protractor and jasmine - deferred selectors, custom matchers, custom locators.
  • Control locators (OPA5 declarative matchers) allow locating and interacting with UI5 controls.
  • Does not depend on testability support in applications - works with autorefreshing views, resizing elements, animated transitions.
  • Declarative authentications - authentication flow over OAuth2 providers, etc.
  • Console operation, CI ready, fully configurable, no need for java (comming soon) or IDE.
  • Covers full UI5 browser matrix: Chrome, Firefox, IE, Edge, Safari, iOS, Android.
  • Open-source, modify to suite your specific neeeds.

Requirements

  • NodeJS, version 8.0 or higher

Configuration

UIVeri5 accepts a declarative configuration in a conf.js file. Configuration could be overriten with command-line arguments. All configuration options are explained in Configuration

Installation

Install globally:

$ npm install @ui5/uiveri5 -g

Usage

Create a test

Create a clean folder that will contain your test and configuration files. UIVeri5 uses Jasmine as a test runner so the test resides in a spec.js file. Put the declarative configuration in the conf.js file.

  • conf.js
exports.config = {
  profile: 'integration',

  baseUrl: 'https://openui5.hana.ondemand.com/test-resources/sap/m/demokit/master-detail/webapp/test/mockServer.html',
};
  • masterdetail.spec.js
describe('masterdetail', function () {

  it('should load the app',function() {
    expect(browser.getTitle()).toBe('Master-Detail');
  });

  it('should display the details screen',function() {
    element(by.control({
      viewName: 'sap.ui.demo.masterdetail.view.Master',
      controlType: 'sap.m.ObjectListItem',
      properties: {
        title: 'Object 11'
      }}))
    .click();
  });

  it('should validate line items',function() {
    expect(element.all(by.control({
      viewName: 'sap.ui.demo.masterdetail.view.Detail',
      controlType:'sap.m.ColumnListItem'}))
    .count()).toBe(2);
  });
});

Run the test

Open console in the test folder and execute:

$ uiveri5

You will see the test execution in the console and an overview when the test completes. Check the target folder for a visual report with screenshots.

Usage hints

By default uiveri5 will discover all tests in current folder and execute them on localy started Chrome. All of those defaults could be modified either in conf.js or by providing command-line arguments.

  • Enable verbose logging
-v
  • Run tests on different browser
--browsers=firefox
  • Run tests against app deployed on a specific system
--baseUrl="http://<host>:<port>/app"
  • Run tests against a remote selenium server
--seleniumAddress="<host>:<port>/wd/hub"

Learn more

Learn how to build your tests in our Testing Guide.

Support

If you face a problem, please check our list of common issues. If you think you found a bug, please create a new github issue. If you have a question, please ask on StackOverflow.

Known Bugs

No major bugs known.

Release plan

See how we plan to continue in our TODO .

Related projects

Here we gather few projects that build on UIVeri5 and tailor it for specific usecases.

  • Docker container with UIVeri5, Chrome, Jenkins: Link

Automatic Downloads

By default, when running locally, UIVeri5 downloads selenium.jar and/or the respective webdrivers - chromedriver, geckodriver,InternetExplorerDriver from their official locations. You can disable the downloading or change the locations in profile.conf.js. When using --seleniumAddress, nothing is downloaded.

Licence

Copyright (c) 2018 SAP SE or an SAP affiliate company. All rights reserved. This file is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file.

ui5-uiveri5's People

Contributors

maximnaidenov avatar xtatica avatar tsaleksandrova avatar hmanchev avatar cvakiitho avatar fatschi avatar vobu avatar antoniym avatar bozhkotodorov avatar mide42 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.