Coder Social home page Coder Social logo

picklejuice's Introduction

Picklejuice

Functional Testing Framework based on Cucumber.js and WebdriverJS (now WebdriverIO: https://github.com/webdriverio/webdriverio), written in CoffeeScript. Picklejuice is intended to run locally or on your CI and supports Saucelabs for running on multiple platforms. Picklejuice is part of a larger ecosystem for end-to-end testing, in which Picklejuice provides the re-usable classes for the Cucumber.js infrastructure at Easytobook.com.

Picklejuice provides the following:

  • picklejuice: mixin for your 'World' context object, required for all other picklejuice components
  • hooks: generic before- and after hooks
  • views: generic view definitions

Picklejuice overview

Initialization

In your World context, mixin the picklejuice object as follows:

World = (done, environment) ->

  [type, browser, version] = environment.split(':') if environment?.length

  type ?= 'local'
  browser ?= 'firefox'
  version ?= 'any'

  env = require("./env-#{type}")(browser)
  env.type = type
  pickledWorld.call this, env

  done() if done?

We use a modified version of cucumber which allow us to pass an environment object via the CLI so we can switch environments based on our grunt test targets. See https://github.com/easytobook/cucumber-js/commit/d6256155e9ad7657c64c6d5b2c2b5bb48aee85b8. In the previous example we use an environment object, see examples/env-local.coffee for an example.

When writing your view definitions, import the Picklejuice baseView:

BaseView = require 'picklejuice/lib/views/base'


class HomeView extends BaseView
   ...

Grunt integration

In order to run Picklejuice from grunt you'll need grunt-cucumberjs and grunt-runselenium. You can set up multiple grunt targets to support running the tests locally, on a CI server or on Saucelabs for example.

picklejuice's People

Contributors

majalap avatar jopdeklein avatar

Watchers

Ionut Popa avatar Pmoranga avatar Suzana Zevri avatar James Cloos avatar  avatar Aviv Yeshua avatar  avatar Ivan Chura avatar seroga avatar  avatar Anton avatar Lance Bailey avatar Edan avatar Natalie Bar Natan avatar  avatar Roman Iaremchuk avatar  avatar  avatar  avatar  avatar  avatar

Forkers

jopdeklein

picklejuice'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.