All Projects → mpinardi → cucumber-performance

mpinardi / cucumber-performance

Licence: MIT license
A performance testing framework for cucumber

Programming Languages

java
68154 projects - #9 most used programming language
Gherkin
971 projects

Projects that are alternatives of or similar to cucumber-performance

Karate
Test Automation Made Simple
Stars: ✭ 5,497 (+19532.14%)
Mutual labels:  bdd, load-testing, gherkin, cucumber, automated-testing
karate-runner
VSCode Extension for Karate
Stars: ✭ 23 (-17.86%)
Mutual labels:  bdd, load-testing, gherkin, cucumber, automated-testing
Awesome-Cucumber
A collection of awesome Cucumber and Gherkin-related resources
Stars: ✭ 33 (+17.86%)
Mutual labels:  bdd, gherkin, cucumber, automated-testing
karate
Test Automation Made Simple
Stars: ✭ 6,384 (+22700%)
Mutual labels:  bdd, load-testing, cucumber, automated-testing
gavel-spec
Behavior specification for Gavel, validator of HTTP transactions
Stars: ✭ 105 (+275%)
Mutual labels:  bdd, gherkin, cucumber
Nightwatch Cucumber
[DEPRECATED] Cucumber.js plugin for Nightwatch.js.
Stars: ✭ 243 (+767.86%)
Mutual labels:  bdd, gherkin, cucumber
gherkin
Pure Rust implementation of Gherkin language (`.feature` file) for Cucumber testing framework.
Stars: ✭ 41 (+46.43%)
Mutual labels:  bdd, gherkin, cucumber
Behat
BDD in PHP
Stars: ✭ 3,696 (+13100%)
Mutual labels:  bdd, gherkin, cucumber
bat
Gherkin based DSL for testing HTTP APIs via Cucumber.JS
Stars: ✭ 30 (+7.14%)
Mutual labels:  bdd, gherkin, cucumber
docs
Cucumber user documentation
Stars: ✭ 110 (+292.86%)
Mutual labels:  bdd, gherkin, cucumber
cucumber6-ts-starter
Starter project to write and debug cucumber-js features in TypeScript language
Stars: ✭ 62 (+121.43%)
Mutual labels:  bdd, gherkin, cucumber
Radish
Behavior Driven Development tooling for Python. The root from red to green.
Stars: ✭ 153 (+446.43%)
Mutual labels:  bdd, gherkin, cucumber
mocha-cakes-2
A BDD plugin for Mocha testing framework
Stars: ✭ 44 (+57.14%)
Mutual labels:  bdd, gherkin, cucumber
codeceptjs-bdd
⭐️ ⭐️⭐️ Migrated to Salesforce Open Source Platform - https://github.com/salesforce/codeceptjs-bdd
Stars: ✭ 24 (-14.29%)
Mutual labels:  bdd, cucumber, scenarios
scenari
Clojure BDD library - Executable Specification with Behavior-Driven Development
Stars: ✭ 57 (+103.57%)
Mutual labels:  bdd, gherkin, cucumber
Godog
Cucumber for golang
Stars: ✭ 1,287 (+4496.43%)
Mutual labels:  bdd, gherkin, cucumber
Gunit
GUnit - Google.Test/Google.Mock/Cucumber on steroids
Stars: ✭ 156 (+457.14%)
Mutual labels:  bdd, gherkin, cucumber
White Bread
🍞 Story BDD tool for elixir using gherkin
Stars: ✭ 198 (+607.14%)
Mutual labels:  bdd, gherkin, cucumber
Add
Разработка с управляемым качеством на 1С
Stars: ✭ 210 (+650%)
Mutual labels:  bdd, cucumber
kekiri
A .NET framework that supports writing low-ceremony BDD tests using Gherkin language
Stars: ✭ 19 (-32.14%)
Mutual labels:  bdd, cucumber

Cucumber-Performance

A concurrent behavior driven testing(CBDT) tool and performance testing framework for Cucumber IO.

What is Cucumber Perf?

Cucumber-Performance is a tool to simulate concurrent user behavior using cucumber features as runner specification.

What is Cucumber?

Cucumber is a implementation of Behavior Driven Development (BDD). Which uses simple natural language scripts to define a software feature. These executable specifications are written in a language called Gherkin. Example:

#beer.feature
Feature: Beer
  Scenario: Jeff dinks a beer
	  Given: Jeff is of age and has a beer
	  And: Jeff opens his beer.
	  When: Jeff takes a sip.
	  Then: Verify he enjoyed it.

These scripts can be used to develop the features themselves but also drive automated tests

The issue?

So, you now have a working functional automation test suite. But you want to run a performance test. Generally this would require either rewriting your existing functional tests or copying a bunch of code. Also, you would need to create or implement a performance test harness.

Most likely each team will end up with something that is project specific and doesn't use the existing functional code base.

The fix?

Cucumber Performance provides a level of automation on top of Cucumber. And is an implementation of a new concept (as far as I know) called Concurrent Behavior Driven Testing (CBDT).

What is Concurrent Behavior Driven Testing?

Concurrent Behavior Driven Testing (CBDT) is the concept of using BDD features to simulate real world concurrent events.

Most systems have multiple concurrent users who may be using different but complementary features, which been previously defined in Gherkin. CBDT allows you to document these real world situations in a simple human readable domain-specific scripting language.

CBDT requires an automation team to follow strict guidelines when coding functional test cases. Being careful to avoid static variables and race conditions that will cause failures in a multiple-threaded world. This of course requires a larger understanding of programming or at least team leadership that can enforce these guidelines.

How does Cucumber Performance work?

Cucumber Performance provides a means to use your existing functional tests without writing a single line of code. It provides the ability to run performance simulations with support for common load testing features:

  • Timed Tests
  • Multi-Threading
  • Thread Count Limits
  • Ramp Up/Down
  • Data replacing
  • Random Wait
  • Statistics
  • Console reporting And creates a number of outputs
  • Data Points (csv)
  • JUnit Report
  • Logging
  • Summary Report
  • Taurus Final Stats

It uses a new type of script called Salad. Salad is a re-implementation of Cucumber Gherkin with the focus on performance simulations.

Plan: Bar visit

Simulation: Jeff drinks 3 beers.
  Group: beer.feature
  Runners: 1
  Count: 3

Plans:

Here is an example plan

Plan: test
Simulation: simulation 1
Group test.feature
	#slices
	#these values will replace property "value out"
	|value out|
	|changed value 1|
	|changed value 2|
	#number of threads
	Runners: 2
	#total number of threads to run.
	Count: 2
#a optional random wait mean for before thread runs tests.
#thread will wait between +-50% of this mean
RandomWait: 00:00:02

#Will run all groups for the period below
Simulation Period: simulation 2 period
Group test.feature
	|value out|
	|changed value |
		Threads: 5
		#count is ignored in a simulation period
		Count: 1
#run time
Time: 00:00:30
RampUp: 00:00:10
RampDown: 00:00:10

Getting Started

It takes some planning to implement Cucumber Perf.

Your functional automation should follow these rules:

  • Use a non specific test harness. This should standardize all your common functions.
  • Do not use static variables!
  • Properly comment your features and scenarios. You want to keep track of what scenarios can be run multithreaded.

Follow directions in wiki to get up and running.

Installing

Maven

Note currently Cucumber versions 6.* and 7.* are not supported but hopefully will be.

Cucumber 5.*

<dependency>
  <groupId>com.github.mpinardi</groupId>
  <artifactId>cucumber-perf</artifactId>
  <version>4.0.4</version>
</dependency>

Cucumber 4.*

<dependency>
  <groupId>com.github.mpinardi</groupId>
  <artifactId>cucumber-perf</artifactId>
  <version>3.0.3</version>
</dependency>

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].