Skip to content

AnudeepKumarTuniki/slack-webtest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Description

  • This project contains slack web tests which include:
    • Search Saved messaged
WebDriver management

The project currently handles only Chrome and Firefox

  • For local execution the setup and automatically configured by WebDriver manager library. This library automatically detects the os version as well as the compatible browser version and creates a session.
Prerequisites
  • JAVA and MAVEN should be properly configured on the machine
  • Docker desktop should be available if you prefer remote execution on dockerized grid.
Execution
List of System properties to pass:
  • Provide browser name either firefox/chrome for this setup
    • E.g: -Dbrowser= "chrome"
  • Slack registered user email
    • E.g -Demail="<Email>"
  • Slack web url for the registered user.
  • Slack web password
    • E.g -Dpasswd="<Passwd>"
  • User channel name
    • E.g: -Dchannel="automation"
  • Host where the selenium grid is running.As a prerequisite you have to run "docker-compose up" in your local This spins up a grid network. Which can be verified at "http://localhost:4444". If successful pass host as 'localhost' or leave empty if it is a local run
    • E.g: -Dhub_host="localhost"
Local Terminal
  • Navigate to the project directory and run the below command. Avoid "hub_host" as this is a local run.
  • mvn clean test -Dbrowser="firefox" -DsuiteXmlFile="ui/suites/regression.xml" -Dslack_url="<URL>" -Demail="<EMAIL>" -Dpasswd="<PASSWD>" -Dchannel="<CHANNEL_NAME>"
Remote driver setup
  • Navigate to the project folder where you have "docker-compose.yaml" file Run command: "docker-compose up"

  • This creates a selenium grid network with one chrome node and one firefox node. The setup can be verified by launching the URL: "http://localhost:4444" on your browser

  • To run on remote driver pass the system property -Dhub_host="localhost" along with the desired browser -Dbrowser="chrome"/-Dbrowser="firefox" "chrome" is picked up by default

  • E.g: mvn clean test -Dbrowser="firefox" -DsuiteXmlFile="ui/suites/regression.xml" -Dslack_url="<URL>" -Demail="<EMAIL>" -Dpasswd="<PASSWD>" -Dchannel="<CHANNEL_NAME>" -Dhub_host="localhost"

  • Do not forget to set down you grid once you are done with it. Run "docker-compose down" to bring the grid down.

runner.sh
  • This runner file has all the system properties. User can fill in those properties and run the runner.sh file from the terminal
Parallel execution
  • Include parallel="tests" in the testng's .xml file for running all tests in parallel.
  • For remote WebDriver execution since it required more nodes to be configured, while running the docker-compose add more instance to the services.
    • E.g: "docker-compose up chrome=2 firefox=2" (will create 4 container nodes which will share the tests while parallel execution)
    • E.g: "docker-compose up chrome=4" (will create 4 chrome container nodes which will share the tests while parallel execution)
Reports
  • After execution of tests,the reports are generated in "target" folder. TestNG report is generated in "surefire-reports" and Extent report is generated by the name "Test-Automation-Report.html"
  • A log file "test_execution.log" is also generated in the "target" folder

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors