Giter VIP home page Giter VIP logo

automation's Introduction

Automation Framework

Environment
Platform: Linux/MacOS/Windows
Java: 11
Maven: 3.8.1
Docker: 19.03.8

Frameworks/Libraries
Selenide: 5.20.4 - WebDriver
Selenoid: 1.10.3 - Hub
Selenoid-UI: 1.10.3 - Selenoid UI
TestNG: 7.4.0 - Testing Framework
ReportPortal: 5.3.5 - Reporting

Stack:

  • Selenide (test automation framework)
  • Selenoid (Hub)
  • TestNG (testing framework)
  • Maven (project management tool)
  • ReportPortal (reporting tool)
 ├─── .github  
 │    └─── workflows  
 │         └─── main.yml  
 ├─── build  
 │    └─── reports  
 │         └─── tests  
 ├─── config  
 │    └─── browsers.json  
 ├─── src  
 │    ├─── main  
 │    │    ├─── java  
 │    │    │    ├─── automation.builders  
 │    │    │    │    └─── **/*Builder.java  
 │    │    │    ├─── automation.entities  
 │    │    │    │    ├─── browser
 │    │    │    │    │    ├─── Browser.java
 │    │    │    │    │    ├─── ChromeBrowser.java  
 │    │    │    │    │    └─── FirefoxBrowser.java  
 │    │    │    │    └─── **/**.java  
 │    │    │    ├─── automation.enums  
 │    │    │    │    └─── **/**.java  
 │    │    │    ├─── automation.forms  
 │    │    │    │    └─── **/*Form.java  
 │    │    │    ├─── automation.pages  
 │    │    │    │    └─── **/*Page.java  
 │    │    │    └─── com.d3m0.automation.utils  
 │    │    │         ├─── BaseTest.java  
 │    │    │         ├─── LoadingPageFactory.java  
 │    │    │         ├─── MyListener.java  
 │    │    │         └─── Verify.java  
 │    │    └─── resources  
 │    │         ├─── log4j2.xml  
 │              └─── reportportal.properties    
 │    └─── test  
 │         ├─── java  
 │         │    └─── testcases
 │         │         └─── **/*Test.java  
 │         └─── resources  
 │              └─── testng.xml  
 ├─── .gitignore  
 ├─── docker-compose.yml  
 ├─── pom.xml  
 ├─── README.md  
 └─── update_browsers.sh  

Installation

  1. Clone project.
  2. Make sure you have recent Docker installed.
  3. Browsers that will be used described in config/browsers.json. Chrome and Firefox images included into docker_compose.yml. If you need to update browsers, edit config/browsers.json (instructions could be found here, list of available images is here). Download browser images manually (docker pull image where image specified in config/browsers.json) or automatically using jq tool. See execution command in update_browsers.sh.
  4. If you're running docker on Windows, be sure to update docker-compose.yml (uncomment Windows-related postgres.volumes section and volumes at the end of the file) for correct ReportPortal work.
  5. Run docker-compose up --force-recreate -d to start Selenoid, Selenoid UI and ReportPortal.

Execution

  1. If you want to use Selenoid as a hub, update selenoid.hub.address in pom.xml with your actual IP address (docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' container_name_or_id). If you want to use built-in WebDriverManager just set parameter selenoid.enabled to false.
  2. Edit source/test/resources/testng.xml to include or exclude your test-cases.
  3. Setup RP:
    • navigate to ReportPortal instance (by default http://localhost:8080)
    • login as administrator (superadmin/erebus)
    • click on arrow menu icon in a top-right corner and select Administrate
    • click Add New Project button
    • set name of your project and all other settings
    • click Back to Project button in top-right corner
    • select your newly created project from dropdown in top-left corner
    • select Profile from dropdown in top-right corner
    • copy configuration properties to your reportportal.properties
  4. Run mvn test command to execute whole suite.

Results

  • to check in-browser execution, navigate to your Selenoid-UI instance (e.g. localhost:8090)
  • to check reports, navigate to ReportPortal instance (e.g. localhost:8080)

automation's People

Contributors

d3m0 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.