Skip to content

Commit 1e7cc97

Browse files
Alvaro LasernaAlvaro Laserna
authored andcommitted
Merge branch 'master' of https://github.com/testdevlab/TestRay into master
2 parents 0c096b1 + 0d9bc13 commit 1e7cc97

3 files changed

Lines changed: 60 additions & 73 deletions

File tree

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
![TestRay Logo](resources/testray_png.png)
22

33
# About
4-
TestRay is a Ruby gem used to run YAML-based automation tests, using Selenium and Appium. While originally compatible only with Android, in its current iteration it can also automate iOS, web, Windows and Mac applications.
4+
TestRay is a Ruby gem used to run YAML-based automation tests, using Selenium and Appium. While originally compatible only with Android, in its current iteration it can also automate iOS, web, Windows and Mac applications - and with multi-platform support!
55

66
## Index
77
1. [Installation](#installation)
@@ -17,8 +17,9 @@ TestRay is a Ruby gem used to run YAML-based automation tests, using Selenium an
1717

1818

1919
## <a id="installation"></a>Installation
20+
TestRay has been tested to work on both Mac (Intel/M1) and Windows.
2021

21-
You can install TestRay master branch by creating a Gemfile with the following content and then running `bundle install`:
22+
One way to install the framework is by creating a Gemfile with the following content and then running `bundle install`:
2223

2324
<pre>
2425
gem "testray", :git => "https://github.com/testdevlab/TestRay.git"

SETUP.md

Lines changed: 35 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,5 @@
11
# TestRay Setup - Overview
2-
The TestRay framework is the primary automation framework used in the A/V department. Its key properties include the following:
3-
1. Written in Ruby
4-
2. Works on Mac (Intel/M1) and Windows
5-
3. Supports web automation (Selenium)
6-
4. Supports Android, iOS, Windows and Mac app automation (Appium)
7-
5. Allows testing multiple simultaneous users across all the above platforms
8-
6. Uses YAML-based test cases
9-
10-
This document aims to describe the full setup procedure for this framework, in three sections:
2+
This document aims to describe the full setup procedure for TestRay, in three sections:
113
1. Installing prerequisites for TestRay
124
2. Installing TestRay
135
3. Installing optional prerequisites for specific test platforms
@@ -16,7 +8,6 @@ This document aims to describe the full setup procedure for this framework, in t
168
Installations are provided either as a link, or as a command that should be run in the terminal (or PowerShell on Windows).
179
Also note that some steps differ depending on the computer on which you want to install TestRay (Windows or Mac). In order to distinguish these, icons will be used:
1810

19-
2011
⊞ - this indicates a step that is specific to installations on Windows
2112
⌘ - this indicates a step that is specific to installations on Mac
2213

@@ -85,37 +76,39 @@ First you need to install some common prerequisites, regardless of the platform
8576
gem uninstall eventmachine
8677
gem install eventmachine --platform ruby
8778

88-
Video Analysis
89-
Skip this section if you do not need to do video analysis.
90-
ffmpeg
91-
⌘ brew install ffmpeg
92-
⊞ https://www.gyan.dev/ffmpeg/builds/ffmpeg-release-essentials.zip
93-
Make a folder in your user directory called av-applications/ffmpeg
94-
Open the zip file and move all the contents (directories bin/doc/presets) to the new folder
95-
Start menu -> type 'path' -> Edit the system environment variables -> Environment Variables… -> section User variables -> select Path -> Edit -> New
96-
Paste C:\Users\[your username]\av-applications\ffmpeg\bin
97-
Save with OK -> OK -> OK
98-
Check that ffmpeg is installed by opening a new terminal/Powershell window and running ffmpeg -version
99-
If you plan to use ffmpeg to record the computer screen and launch TestRay using a CI tool (like TeamCity or Jenkins), this action may get stuck. One solution is to additionally install Java 8 and temporarily delete the Java 11 folder when registering the computer with the CI tool.
100-
Java 8 installations:
101-
102-
Audio Analysis
103-
Skip this section if you do not need to do audio analysis.
104-
sox
105-
⌘ brew install sox
106-
⊞ https://sourceforge.net/projects/sox/files/sox/14.4.2/sox-14.4.2-win32.exe
107-
Start menu -> type 'path' -> Edit the system environment variables -> Environment Variables… -> section System variables -> select Path -> Edit -> New
108-
Paste C:\Program Files (x86)\sox-14-4-2
109-
Save with OK -> OK -> OK
110-
Unfortunately, unlike the Mac version, the Windows version of sox does not include handling for .mp3 files, which you may need for spectrogram generation. You can add this support with the following steps:
111-
Download the two files at https://drive.google.com/drive/folders/1FipUjNGpzHaWgimstxjA7YcE6NmxpLVr
112-
Paste the files in the sox install directory (C:\Program Files (x86)\sox-14-4-2)
113-
Check that sox is installed by opening a new terminal/Powershell window and running sox --version
79+
### Video Analysis
80+
Skip this section if you do not need to do video analysis.
81+
ffmpeg
82+
83+
⌘ brew install ffmpeg
84+
https://www.gyan.dev/ffmpeg/builds/ffmpeg-release-essentials.zip
85+
Make a folder in your user directory called av-applications/ffmpeg
86+
Open the zip file and move all the contents (directories bin/doc/presets) to the new folder
87+
Start menu -> type 'path' -> Edit the system environment variables -> Environment Variables… -> section User variables -> select Path -> Edit -> New
88+
Paste C:\Users\[your username]\av-applications\ffmpeg\bin
89+
Save with OK -> OK -> OK
90+
Check that ffmpeg is installed by opening a new terminal/Powershell window and running ffmpeg -version
91+
If you plan to use ffmpeg to record the computer screen and launch TestRay using a CI tool (like TeamCity or Jenkins), this action may get stuck. One solution is to additionally install Java 8 and temporarily delete the Java 11 folder when registering the computer with the CI tool.
92+
93+
### Audio Analysis
94+
Skip this section if you do not need to do audio analysis.
95+
sox
96+
97+
⌘ brew install sox
98+
https://sourceforge.net/projects/sox/files/sox/14.4.2/sox-14.4.2-win32.exe
99+
Start menu -> type 'path' -> Edit the system environment variables -> Environment Variables… -> section System variables -> select Path -> Edit -> New
100+
Paste C:\Program Files (x86)\sox-14-4-2
101+
Save with OK -> OK -> OK
102+
Unfortunately, unlike the Mac version, the Windows version of sox does not include handling for .mp3 files, which you may need for spectrogram generation. You can add this support with the following steps:
103+
Download the two files at https://drive.google.com/drive/folders/1FipUjNGpzHaWgimstxjA7YcE6NmxpLVr
104+
Paste the files in the sox install directory (C:\Program Files (x86)\sox-14-4-2)
105+
Check that sox is installed by opening a new terminal/Powershell window and running sox --version
114106

115107
### Network Analysis
116108

117109
Skip this section if you do not need to do network analysis.
118110
Wireshark:
111+
119112
⌘ brew install --cask wireshark
120113
nano ~/.zshrc -> scroll to the bottom and paste the following:
121114
export PATH=$PATH:/Applications/Wireshark.app/Contents/MacOS/
@@ -127,24 +120,23 @@ Skip this section if you do not need to do network analysis.
127120
Check that Wireshark (specifically, tshark) is installed by opening a new terminal/Powershell window and running tshark -v
128121

129122

130-
### Installing TestRay
123+
## Installing TestRay
131124

132125
You can clone this project and the use:
133126

134127
rake install
135128

136-
137-
138129
## Prerequisites: Test Platforms
139130

140131
Now you can install optional prerequisites, depending on your tested target platform.
141132

142133
### Running Web Tests
143134

144135
Chrome - https://www.google.com/chrome/
145-
Other Chromium-based browsers are probably fine too, but have not been tested
136+
Other Chromium-based browsers are probably fine too, but have not been tested
137+
138+
chromedriver
146139

147-
#### chromedriver
148140
⌘ brew install --cask chromedriver
149141
⊞ https://chromedriver.chromium.org/downloads - select depending on your Chrome version
150142

@@ -163,6 +155,7 @@ Other Chromium-based browsers are probably fine too, but have not been tested
163155
#### Running Android Tests
164156

165157
Android Studio - https://developer.android.com/studio
158+
166159
⌘ After installing and opening the app, it will open a Setup Wizard
167160

168161
Select Custom install type
@@ -194,7 +187,7 @@ Android Studio - https://developer.android.com/studio
194187
Run adb devices - you should see the connected device and its UDID (identification number/string), for example, 1cd982880d027ece. The device should now also show up if you run testray android list_devices.
195188
If you require the phone to be connected over the network:
196189
adb -s <UDID> tcpip 5555
197-
adb connect <phone IP>:5555, for example, adb connect 172.16.113.201:5555
190+
adb connect <phone IP>:5555, for example, adb connect 192.168.0.1:5555
198191
Unplug the phone from the computer
199192
adb devices - the previous UDID should now be replaced with the IP of the phone
200193

@@ -223,8 +216,3 @@ Drag and drop the Xcode Helper application to the app list in the System Prefere
223216

224217
In Windows Settings, open Update & Security -> For developers -> switch to Developer Mode -> Yes
225218
You may also need to first start PowerShell as an administrator before running your tests
226-
227-
228-
229-
#### Developing Tests
230-

SETUP_IOS.md

Lines changed: 22 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ The two above functionalities in TestRay are provided by ideviceinstaller and id
6868
2. Set up the dependencies - install ideviceinstaller through Homebrew by running `brew install ideviceinstaller`
6969
3. Uninstall ideviceinstaller by running `brew uninstall ideviceinstaller`
7070
4. Download the ideviceinstaller source code: `git clone https://github.com/libimobiledevice/ideviceinstaller.git`
71-
5. Open src/ideviceinstaller.c in your favorite text editor (like VS Code)
72-
6. You need to change 3 lines of code, by just replacing CFBundleVersion with c:
71+
5. Open `src/ideviceinstaller.c` in your favorite text editor (like VS Code)
72+
6. You need to change 3 lines of code, by just replacing CFBundleVersion with CFBundleShortVersionString:
7373

7474
Line 127: CFBundleVersion -> CFBundleShortVersionString
7575
Line 142: CFBundleVersion -> CFBundleShortVersionString
@@ -79,31 +79,29 @@ The two above functionalities in TestRay are provided by ideviceinstaller and id
7979
8. In the terminal, open the ideviceinstaller directory
8080
9. Run the following 3 commands:
8181

82-
./autogen.sh
82+
a) `./autogen.sh`
8383

84-
You may receive the following error:
85-
The fix now depends on where your Homebrew is installed - run where brew.
86-
If you get /usr/local/bin/brew, run these:
84+
You may receive the following error:
85+
The fix now depends on where your Homebrew is installed - run where brew.
86+
If you get /usr/local/bin/brew, run these:
8787

88-
export PATH="/usr/local/opt/openssl/bin:$PATH"
89-
export LD_LIBRARY_PATH="/usr/local/opt/openssl/lib:$LD_LIBRARY_PATH"
90-
export CPATH="/usr/local/opt/openssl/include:$CPATH"
91-
export LIBRARY_PATH="/usr/local/opt/openssl/lib:$LIBRARY_PATH"
92-
export PKG_CONFIG_PATH="/usr/local/opt/openssl/lib/pkgconfig"
88+
export PATH="/usr/local/opt/openssl/bin:$PATH"
89+
export LD_LIBRARY_PATH="/usr/local/opt/openssl/lib:$LD_LIBRARY_PATH"
90+
export CPATH="/usr/local/opt/openssl/include:$CPATH"
91+
export LIBRARY_PATH="/usr/local/opt/openssl/lib:$LIBRARY_PATH"
92+
export PKG_CONFIG_PATH="/usr/local/opt/openssl/lib/pkgconfig"
9393

94-
If you get /opt/homebrew/bin/brew, run these:
94+
If you get /opt/homebrew/bin/brew, run these:
9595

96-
export PATH="/opt/homebrew/opt/openssl/bin:$PATH"
97-
export LD_LIBRARY_PATH="/opt/homebrew/opt/openssl/lib:$LD_LIBRARY_PATH"
98-
export CPATH="/opt/homebrew/opt/openssl/include:$CPATH"
99-
export LIBRARY_PATH="/opt/homebrew/opt/openssl/lib:$LIBRARY_PATH"
100-
export PKG_CONFIG_PATH="/opt/homebrew/opt/openssl/lib/pkgconfig"
96+
export PATH="/opt/homebrew/opt/openssl/bin:$PATH"
97+
export LD_LIBRARY_PATH="/opt/homebrew/opt/openssl/lib:$LD_LIBRARY_PATH"
98+
export CPATH="/opt/homebrew/opt/openssl/include:$CPATH"
99+
export LIBRARY_PATH="/opt/homebrew/opt/openssl/lib:$LIBRARY_PATH"
100+
export PKG_CONFIG_PATH="/opt/homebrew/opt/openssl/lib/pkgconfig"
101101

102-
Then run the autogen command again, it should work fine.
103-
104-
make
105-
sudo make install (enter your password if required)
106-
10. Confirm that ideviceinstaller was successfully installed by running `ideviceinstaller -v:`
107-
108-
### Developing Tests
102+
Then run the autogen command again, it should work fine.
109103

104+
b) `make`
105+
106+
c) `sudo make install` (enter your password if required)
107+
10. Confirm that ideviceinstaller was successfully installed by running `ideviceinstaller -v`

0 commit comments

Comments
 (0)