1.0.1 • Published 7 years ago

wis-aut-ui v1.0.1

Weekly downloads
1
License
ISC
Repository
-
Last release
7 years ago

How to use this framework

  • Clone this repository
  • copy config.yml.sample to config.yml and update credentials.
  • npm install
  • Add your project's test case folder inside e2e-tests/projects/ # You may create a symlink from your project repository.
  • npm run start-local-server # start local selenium server
  • npm test

Spira integration

  • Each scenario will be considered as a test case.
  • On executing npm run spira for the first time, the framework will return newly created test case IDs.
  • Add them as tags over your Scenarios.
  • Tag Format- @TC:25722

Running tests

  • npm test

Sending results to spira

  • npm run spira

Run Lint

  • npm run lint

Running local selenium server

  • npm run start-local-server

Installing java on debian based OS to support local selenium server

sudo apt-get install -y software-properties-common python-software-properties
echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | sudo /usr/bin/debconf-set-selections
sudo add-apt-repository ppa:webupd8team/java -y
sudo apt-get update
sudo apt-get install oracle-java8-installer
echo "Setting environment variables for Java 8.."
sudo apt-get install -y oracle-java8-set-default

TODOS

  • Testing proxy configuration and documenting in README

Future TODOS

  • Add tslint
  • Updated README, add instructions for adding git submodules. - All project test cases will be different repositories. We will add symlinks at correct location.
  • Add babel support Not required after typescript integration.

Configuring Browsers:

For creating an instance of local available browser.

Selenium_server:
  grid_url:           http://hub-cloud.browserstack.com/wd/hub # or local server path
  grid_username:      
  grid_key:           
  grid_browsers:
  -
    browserName: 'chrome'
    chromeOptions: 
      args: 
        - 'disable-infobars'    
    shardTestFiles: true
    maxInstances: 5
    getPageTimeout: 60000
    allScriptsTimeout: 500000   
  -
    browserName: 'firefox'
    firefoxOptions: 
        args: 
            - 'disable-infobars'    
    shardTestFiles: true
    maxInstances: 5
    getPageTimeout: 60000
    allScriptsTimeout: 500000

Configuring browsers on browserstack.

For creating an instance on a remote server (i.e on browserstack server).

Selenium_server:
  grid_url:           http://hub-cloud.browserstack.com/wd/hub
  grid_username:      your_browserstack_username
  grid_key:           your_browserstack_key
  grid_browsers:
  -
    browserName : IE
    browser_version : 11.0
    os : Windows
    os_version : 7.0
    resolution : 1024x768  
  -
    browserName : Chrome
    browser_version : 59.0
    os : Windows
    os_version : 7.0
    resolution : 1024x768
  • To add debugging visual logs:
browserstack.debug : true 
./BrowserStackLocal --key grid_key --local-identifier project_name_identifier

Now Add these lines to each of the browsers

browserstack.local : true
browserstack.localIdentifier : project_name_identifier

General Notes

  • Docker may also be used: sudo docker run -d -p 4444:4444 -p 5900:5900 selenium/standalone-chrome-debug:3.4.0-einsteinium