Coder Social home page Coder Social logo

hotelbookingsystem's Introduction

Test Automation For Hotel Booking System

Framework Design Approach

Selenium-cucumber is a behavior driven development (BDD) approach to write automation test script to test Web.

Page Factory is an inbuilt Page Object Model concept for Selenium WebDriver but it is very optimized.Here we follow the concept of separation of Page Object Repository and Test Methods.

Additionally, with the help of PageFactory class, we use annotations @FindBy to find WebElement. We use initElements method to initialize web elements.

For UI Tests : Selenium-cucumber-Maven with PageFactory Design Pattern.

For API Tests : RestAssured with Junit

Tools And Environment

  1. IntelliJ IDEA 2016
  2. Java-8
  3. Maven-3.5.3
  4. Enable cucumber-java plugin in IntelliJ
  5. Git
  6. Required driver versions (Chrome-v2.38 & Gecko-v0.20.1)
  7. Required browsers (Chrome-v66.0 & Firefox-v60.0)
  8. Windows 64bit

Configure JAVA_HOME and MAVEN_HOM in the Environmental Variables : Follow the setup instructions specified in here https://www.mkyong.com/maven/how-to-install-maven-in-windows/

Test Architecture

  HotelBookingSystem
      |manualTestReports
      |  |ManualAcceptance.md
      |src/test/java
      |  |HelpersTests
      |  |  |ApiHelper
      |  |  |UiHelper
      |  |  |Utils
      |  |pageobjects
      |  |  |BookingHomePage
      |  |StepDefinitions
      |  |  |ApiStepDefinitions
      |  |  |Hooks
      |  |  |StepDefinitions
      |  |RuApiTest
      |  |RunUITest
      |src/test/resources
      |  |Drivers
      |  |Features
      |  |  |HotelBooking.feature
      |  |  |ApiTests.feature
      |  |jsonFiles
      |  |  |Post.json
      |  |config.Properties

Steps to run the tests

Please make sure to have all the tools and libraries mentioned in the "Tools And Environment" section.

Step-1: Clone the repository from https://github.com/nirmalaC/HotelBookingSystem.git

Step-2: Use the following maven commands to run the tests.

"mvn test" executes both UI and API tests
mvn test -Dcucumber.options="--tags @ui" to run the UI tests
mvn test -Dcucumber.options="--tags @api" to run the api tests

Cucumber Test Reports

UI Test Results

alt text

API Test Results

alt text

hotelbookingsystem's People

Contributors

nirmalac avatar

Stargazers

 avatar

Watchers

James Cloos avatar

hotelbookingsystem's Issues

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.