GithubHelp home page GithubHelp logo

rhussmann / cucumberselenium Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sourabhmunje/cucumberselenium

0.0 1.0 1.0 5.67 MB

A framework with combination of maven, cucumber and selenium

Java 90.22% Gherkin 8.19% Shell 1.59%

cucumberselenium's Introduction

READ THIS FIRST

I've added some additional support / modifications to allow this test suite to run on the Mac. Primarily, I've removed Edge testing and removed the hardcoded overrides to system properties. Additionally, I've added some scripts to help get this suite up and running.

Prerequisites

  • Maven (mvn) is installed
  • Homebrew (brew) is installed

Running

  • Run ./initialize to install chromedriver and geckodriver from homebrew
  • Run ./run to run the test suite

Web Testing Framework

This framework is a combination of maven, cucumber and selenium.

Pre-requisites :

  • Java home should be set in the machine.
  • Maven home should be set in the machine.
  • Browsers supported are Firefox, Chrome and Edge.
  • If any of the browser not present, comment the data line from feature file.
  • The version of selenium webdriver being used is 3.0.1
  • The browser versions this is being tested are:
    • Chrome - Version 55.0.2883.87 m (64-bit)
    • Firefox - Version 50.1.0 (64-bit)
    • Edge - Microsoft Edge 38.14393.0.0

Setting up project in local -

  • If using git command line then use the below line on terminal.
git clone https://github.com/sourabhmunje/CucumberSelenium.git
  • Else project can be downloaded using download link on github web page
https://github.com/sourabhmunje/CucumberSelenium

Writing test cases

This is a cucumber based project, so test cases can be written in feature files which are at folder location /src/test/resource/Tests1.feature

  • The name of the scenario can be given using Scenario Outline:
  • Any additional test cases can be written using annotations Given, When, And, Then
  • The data to be provided should be given using Examples:
  • The test cases can be increased for the same Scenario by adding more rows to the Examples:
  • The browser to be used for execution is denoted by browserType
  • The browsers supported are Firefox, Chrome and Edge.
  • The keyword to be used for browsers are: firefox- ff, Chrome- chrome, Edge- edge
  • If browser not specified, then chrome will be default browser.
  • The test cases to be excuted needs to be specified with tags for example- @test1
  • This tag needs to be specified in the RunnerTest.java
@Cucumber.Options(format = { "pretty", "json:target/json/output.json","html:target/html/" },
				features = { "./src/test/resource" },
				tags = { "@test1" })

Executing test cases

  • Open the comman line terminal.
  • Go to the folder where project is present.
  • Use maven commands to clean the project
mvn clean
  • Compile the project
mvn compile
  • Run the test cases
mvn test

Reporting

  • The html report will be present in the target\html folder.
  • Failed test cases screenshot will be kept in target folder.

cucumberselenium's People

Contributors

rhussmann avatar sourabhmunje avatar

Watchers

 avatar

Forkers

wdemoss

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.