@elliemae/pui-e2e-test-sdk

ICE MT End to End Test SDK for Web

Usage no npm install needed!

<script type="module">
  import elliemaePuiE2eTestSdk from 'https://cdn.skypack.dev/@elliemae/pui-e2e-test-sdk';
</script>

README

End to End Test SDK for Web

Build Status

SonarQube Report

Features

  • Selenium, Appium test framework

  • Functional testing with local Chrome browser / BrowserStack

  • Visual regression testing with WDIO Image Comparison Service / Appitools

Basic Usage

Following are basic steps required for installing and using pui-e2e-test-sdk library

  • install test sdk using the following command

    npm i --save-dev @babel/cli @babel/core @babel/preset-env @babel/register @elliemae/pui-e2e-test-sdk
    
  • create babel.config.js file in your project root and copy the content below

    module.exports = {
      presets: [
        [
          '@babel/preset-env',
          {
            targets: {
              node: 'current',
            },
          },
        ],
      ],
      comments: false,
    };
    
  • create wdio.override.js file in your project root and copy the content below

    module.exports = () => {
      const config = {};
      // set the baseUrl property to the location where your application is hosted, you can also set the baseUrl using environment variable BASE_URL
      config.baseUrl = 'http://pui-react-boilerplate-dev.ux.rd.elliemae.io';
      // change any of the wdio config properties (https://webdriver.io/docs/configurationfile.html). For most projects, default configuration provided by test sdk is more than suffice
      return config;
    };
    
  • add following script line to your package.json scripts block

    "e2e:test": "e2e-test-sdk run"
    
  • create e2e folder in project root and create a file demo.func.spec.js under that and copy the content below

    describe('Test SDK Demo Tests', () => {
      it('should open Loan View page', () => {
        browser.url('./');
        expect($('div=Loan View')).toBeDisplayed({ wait: 5000 });
      });
    });
    
  • now run the e2e tests using the command below

    npm run e2e:test
    

Appendix

Migration Guide

v3 to v4

  • replace capabilities.isTablet & capabilities.isPhone with capabilities['ice:options'].isTablet & capabilities['ice:options'].isPhone respectively
  • appium version upgraded from 1.19.1 to 1.21.0