Skip to content
Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
66 lines (53 sloc) 1.53 KB
- name: WDIO-based stress test
hosts: all
remote_user: root
tasks:
- name: Update and upgrade apt packages
become: true
apt:
upgrade: yes
update_cache: yes
cache_valid_time: 86400
- name: WDIO and Chrome dependencies
package:
name: "{{ item }}"
state: present
with_items:
- unzip
- nodejs
- npm
- libxss1
- libappindicator1
- libindicator7
- openjdk-8-jre
- name: Download Chrome
get_url:
url: "https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb"
dest: "/tmp/chrome.deb"
- name: Install Chrome
shell: "apt install -y /tmp/chrome.deb"
- name: Get Chromedriver
get_url:
url: "https://chromedriver.storage.googleapis.com/73.0.3683.20/chromedriver_linux64.zip"
dest: "/tmp/chromedriver.zip"
- name: Extract Chromedriver
unarchive:
remote_src: yes
src: "/tmp/chromedriver.zip"
dest: "/tmp"
- name: Start Chromedriver
shell: "nohup /tmp/chromedriver &"
- name: Sync the source code of the WDIO test
copy:
src: "wdio"
dest: "/root/"
- name: Install WDIO
shell: "cd /root/wdio && npm install"
- name: Start date
debug:
var=ansible_date_time.iso8601
- name: Execute
shell: 'cd /root/wdio && ./node_modules/.bin/wdio wdio.conf.js --spec specs/stream.js'
- name: End date
debug:
var=ansible_date_time.iso8601
You can’t perform that action at this time.