Socket
Book a DemoInstallSign in
Socket

unstoppable

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

unstoppable

0.1.0
bundlerRubygems
Version published
Maintainers
1
Created
Source

unstoppable

  • Homepage
  • Documentation Cucumber extension that ensures all tests run to completion, catching failures and errors along the way and reporting them at completion.

This concept may seem ludicrous to some. It is however serving my purposes.

Description

Problem:

While Cucumber is an awesome tool, for some kinds of tests it's default behaviour becomes an obstacle. Testing large batches of input against a slow error prone system is the source of much frustration. Cucumber will skip remaining steps on failure or error. This is especially problematic if the test input is a dynamic collection, *(e.g. results of a database query). This is opposed to a static collection testing which is solved by a Scenario Outline.

Solution:

We need to step putside Cucumber's default pass/fail/error handling. Capture all failures and errors in collections. Log errors and failures. Generate a pass/fail manifest against the test inputs.

Do not use this for normal BDD style testing, Cucumber's default behaviour is perfect for that.

Public Interface:

This is a works in progress so I expect changes as usage reveals more.

In your cucumber env.rb

Before do |scenario| setup_unstoppable end

After do |scenario| print unstoppable_failures(scenario) print unstoppable_errors(scenario) end

In a step definition wrap any operation that you do not wish to stop execution like so

unstoppable do expect(thing).to be(exected_thing) end

This helper method does the following:

  • runs executes the block

  • catches any exception 2a. adds error to errors collection if an error 2b. adds expectation failure to failures collection if error is an RSpec::Expectations::ExpectationNotMetError

  • logs error/failure

FAQs

Package last updated on 06 Dec 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.