Skip to content

Latest commit

 

History

History
85 lines (54 loc) · 5.98 KB

Testing_7cdee40.md

File metadata and controls

85 lines (54 loc) · 5.98 KB
loio
7cdee404cac441888539ed7bfe076e57

Testing

OpenUI5 provides several testing options, like to unit and integration tests and the OData V2 mock server.

Before you start implementing your first test, you should think about how to test the different aspects of your application. The image below shows some examples of testing tools along the agile testing pyramid.

Testing Pyramid

You can use a local test runner, such as Selenium or Karma, that automatically executes all tests whenever a file in the app project has been changed.



OPA5

We recommend OPA5 for integration tests. OPA5 is part of OpenUI5. It is built on top of QUnit and provides good integration with OpenUI5.


wdi5

WebdriverIO (WDIO) is a hugely popular end-to-end testing framework. It can work with any web app but lacks the awareness of the web framework that the application uses. wdi5, which is a WDIO plugin, bridges this gap and provides two key benefits, namely control locators and synchronization with the web framework. wdi5 uses a real browser and interacts with your app the same way a real user would.

  • Test Starter
    The test starter is a concept intended to simplify the test setup for OpenUI5 applications and libraries by orchestrating your QUnit and OPA5 tests.
  • Unit Testing with QUnit
    QUnit is a powerful, easy-to-use JavaScript unit testing framework. It is used by the jQuery, jQuery UI and jQuery Mobile projects and is capable of testing any generic JavaScript code. It supports asynchronous tests out-of-the-box.
  • Integration Testing with One Page Acceptance Tests (OPA5)
    OPA5 is an API for OpenUI5 controls. It hides asynchronicity and eases access to OpenUI5 elements. This makes OPA especially helpful for testing user interactions, integration with OpenUI5, navigation, and data binding.
  • Mock Server
    A mock server mimics one or more back-end services. It is used to simplify integration testing and to decouple UI development from service development. By using a mock server you can develop and test the UI even if the service in the back end is incomplete or unstable.
  • Test Automation
    To make sure that the code is always tested thoroughly before it is included in a productive app, you should use a test runner that automates tests. The test runner can be included in your project setup so that it is called whenever code changes are submitted.
  • Behavior-driven Development with Gherkin
    A software development process driven by app behavior.
  • Test Recorder
    The Test Recorder tool supports app developers who write integration and system tests.

Related Information

Tutorial: Testing

Integration Testing with One Page Acceptance Tests (OPA5)

Tutorial: Mock Server

wdi5 Home Page

Selenium Home Page

Karma Home Page

Mock Server