Skip to content

Simple Automated UI-tests for the https://redrift.com website with Selenide and Allure Report.

Notifications You must be signed in to change notification settings

mikki-messer/redrift-ui-tests

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Automated tests for the RedRift.com main page

⛑️ Contents

⛑️ Coverage

  • Check that the "Join our team" link opens the "Jobs" page
  • Check that the "News" link opens the "Blog & News" page
  • Check that on scrolling down to the "100% Success Rate" block the lion widget appears
  • Check that the lion widget disappears after the click on the close button
  • Check that the contact card with links to the Facebook and LinkedIn appears on mouse hover over the first contact in the "Team block"
  • Check that there are no errors in the browser console logs

⛑️ Technology stack

⛑️ Prepare test data

The test data is passed via the src/test/resources/configuration/testData.properties file

Required test data:

  • newsPageHeaderText - String. Required for the Check the News link test. The header of the /news page.
  • jobsPageHeaderText - String. Required for the Check the Jobs link and Check the Join our team link tests. The header of the /jobs page.
  • firstURLOfTheFirstContact - String. Required for the Check display of the contact card for the first contact test. The first link in the contact card of the first contact in the Contacts block.
  • secondURLOfTheFirstContact - String. Required for the Check display of the contact card for the first contact test. The second link in the contact card of the first contact in the Contacts block.
  • nameOfTheFirstContact - String. Required for the Check display of the contact card for the first contact test. The name the contact card of the first contact in the Contacts block.
  • errorName - String. Required for the Check that there are no errors in the console logs. The text of the error to look for.

TestData.properties file example

newsPageHeaderText=Blog & News
jobsPageHeaderText=Red Rift Awaits You Stranger
firstURLOfTheFirstContact=https://facebook.com/Denis.Puhleacov
secondURLOfTheFirstContact=https://www.linkedin.com/in/denis-puhleacov/
nameOfTheFirstContact=Denis P.
errorName=SEVERE

⛑️ Launch

How to launch on the local machine with tests running locally

Launch with the default params:

  • browser: chrome
  • browser size: 1280x800
  • browser version: not specified
  • baseURL: https://redrift.com

Command:

gradle clean test

Launch with the arbitrary params

Pass the arbitrary params via System properties.

gradle clean test -"Dbrowser=yourPreciousBrowser" -"DbrowserSize=AAAAxBBBB" -"DbrowserVersion=XXX.Y" -"DbaseURL=https://staging.redrift.com"

How to launch on the local machine with tests running on the remote server

Create the .properties file with any given name in the src/test/resources/configuration/ folder with the login and password to the Selenoid server and with the boolean parameter isRemote set to "true". You can include the URL of the remote server in the remoteURL field as well. It might be useful if you have several remote servers and want to switch between them specifying the environment as a parameter.

Environment .properties file example

The "login", "password" and "isRemote" fields are mandatory, remote URL might be omitted and passed via System properties.

isRemote=true
remoteURL=myselenoid.example.com
login=myAwesomeLogin
password=mySecurePassword

Launch with the default params

Pass the name of your .properties file via the environment system property. For instance, if your .properties file's is remote.properties launch command will be:

gradle clean test -"Denvironment=remote"

Launch with the arbitrary params

Pass the arbitrary params via System properties. Put the name of your .properties file to the environment system property. For instance, if your .properties file's is remote.properties launch command will be:

gradle clean test -"Dbrowser=yourPreciousBrowser" -"DbrowserSize=AAAAxBBBB" -"DbrowserVersion=XXX.Y" -"DbaseURL=https://staging.redrift.com" -"Denvironment=remote"

How to launch remotely on Jenkins

Create the testData.properties file in the src/test/resources/configuration/ folder following instructions from here.

Create the .properties file with any given name in the src/test/resources/configuration/ folder with the login and password to the Selenoid server and with the boolean parameter isRemote set to "true". You can include the URL of the remote server in the remoteURL field as well. It might be useful if you have several remote servers and want to switch between them specifying the environment as a parameter.

Environment .properties file example

The "login", "password" and "isRemote" fields are mandatory, remote URL might be omitted and passed via System properties.

isRemote=true
remoteURL=myselenoid.example.com
login=myAwesomeLogin
password=mySecurePassword

Launch with the arbitrary params on Jenkins

Jenkins build params

  • environment - name of the .properties file with credentials to the remote Selenoid server.
  • baseURL - the URL of the web-application to test.
  • remoteURL - the URL of the Selenoid instance to run tests on. Might be passed via the environment.properties file.
  • browser - the browser.
  • browserSize - the size of the browser window in AAAAxBBBB format.
  • browserVersion - the version of the browser.

Pass the name of your .properties file via the environment system property. For instance, if your .properties file's is remote.properties launch command will be:

clean
test
-"Denvironment=remote"
-"DbaseURL=${BASE_URL}"
-"DremoteURL=${REMOTE_URL}"
-"Dbrowser=${BROWSER}"
-"DbrowserSize=${BROWSER_SIZE}"
-"DbrowserVersion=${BROWSER_VERSION}"

⛑️ Jenkins build example

⛑️ Allure reports integration

Overview

Test Suites

Behaviors

Please note, saving browser console logs to Allure reports is not supported for Firefox!!!

⛑️ Allure TestOps integration

The Jenkins job automatically sends the results of the launch to the Allure TestOps.

Dashboards

Test cases

Launches

⛑️ Telegram Notifications

qa-guru/allure-notifications is used

⛑️ Selenoid launch example

There is a video for each test demonstrating the flow.

About

Simple Automated UI-tests for the https://redrift.com website with Selenide and Allure Report.

Topics

Resources

Stars

Watchers

Forks

Languages