Code Monkey home page Code Monkey logo

smoke_test_webstation's Introduction

smoke_test_webstation

This project is written in Pycharm 2018.2 and to make easier to write .feature files install plugin: Gherkin

Framework Behave driven development (BDD) used with combination with Page Object Model (POM)

  • Webdriver: ChromeWebDriver used

Requirements:

install package: behave in cmd/terminal type:

pip install behave

and selenium

pip install selenium

Webdriver:

The ChromeDriver controls the browser using Chrome's automation proxy framework. The server expects you to have Chrome installed in the default location for each system:

Download ChromeDriver on this link (version I am currently using is 2.41)

Set path of ChromeWebDirver:

For Linux:

  1. Move the file to /usr/bin directory sudo mv chromedriver /usr/bin

  2. Go to /usr/bin directory and you would need to run something like "chmod a+x chromedriver" to mark it executable.

For Windows:

Paste the chromedriver.exe file in "C:\Python\Scripts" Folder.

more detail on ChromeDriver wiki

Obligated structure of the prject is:

.
└── features
   ├── #.feature
   ├── #.feature
   ├── environment.py
   ├── steps
       └── #.py

Here's a brief explanation of the files:

  • environment.py: Define code to run before and after certain events during testing. (starts WebDriver)
  • .feature: Written test for create account and login, with scenarios an steps.
  • steps/: This is where Behave will initially look for the code for tests via decorators.
  • pages/: Use locators in file and webDriver methods from browser.py for implementing steps
  • base/browser.py: Contains all webDriver actions wrapped to unique methods to make code reduced and easy to maintain.

To run test case open terminal in project root directory and type:

behave

smoke_test_webstation's People

Contributors

ivanori1 avatar

Forkers

rajasgs

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.