Giter Site home page Giter Site logo

ahmetbeskazalioglu / ahmetb_mentor_saucedemo_cucumber Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 16 KB

AhmetB_Mentor_Saucedemo_Cucumber is a test automation framework designed to test the Saucedemo web application. The framework is built using the Java programming language and leverages the Cucumber framework for Behavior Driven Development (BDD).

Home Page: https://www.saucedemo.com/

Java 94.11% Gherkin 5.89%

ahmetb_mentor_saucedemo_cucumber's Introduction

Codes And Test Prepared By :

A B

Test Automation Engineer :

[email protected]

Getting Started To get start with this framework, you will need to have following software on your system

  • Java 8 or later
  • Maven 4.7 v. or later
  • Chrome, Edge, Safari, IE or Firefox Web Browser
  1. Open Terminal or command prompt and navigate to the root directory of the project.

  2. Run the following command to download the required dependencies:

mvn clean
  1. Run the following command to run the test
mvn verify

Run With CukesRunner

  1. Open the project with IntelliJ IDEA
    • Go to CukesRunner Class inside the project
    • Add a tag name
    • Click the " Run " button

My Framework is Cucumber (BDD)

  • I built my framework using the Java Programing Language
  • I used Maven as a build management tool.
  • I used cucumber-Junit and Cucumber Runner to orchestrate tests.
  • Inside the Cucumber Runner, I used glues to connect feature files to step definitions.
  • I added the report plugin to Cucumber Cukes Runner to generate JSON and HTML reports.
  • I have a utilities package, which contains utility classes such as Configuration Reader, Browser Utils, and Driver.
  • I am using Page Object Modelling to enhance test maintenance and reduce code duplication.
  • I use Page Object Classes to store and identify the elements that I work on.
  • I use the Page Factory class and initElements() method to initialize them.
  • I am using Cucumber and Gherkin language for non-technical people to understand what is going on in testing.
  • To interact with browsers, I am utilizing Selenium WebDriver.
  • I used the Singleton pattern by declaring the constructor of the class as private so that no one instantiates the class outside of it. And declared a static method with return type as an object of the class which should check if the class is already instantiated once.
  • I have created my test cases in the feature files as-is.
  • In the Feature folder, I store my feature files separately, and it helps in the usability of the codes.
  • I use hook class as pre-and post-test implementations.
  • The step Definitions folder is the place where my actual test scripts are.
  • I added a screenshot interface; when the scenario fails, it takes a screenshot.
  • For assertions/verifications, to compare expected and actual results I utilize Junit assertions.
  • I also use tags for tests that I want to run in bulk.
  • My framework is easy to maintain since I have elements stored in one centralized place. If any changes happen in the application about the elements, I know where to go and how to fix it to run test scripts correctly.

2024 January

END

ahmetb_mentor_saucedemo_cucumber's People

Contributors

ahmetbeskazalioglu avatar

Watchers

 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.