Giter Club home page Giter Club logo

pretzel's Introduction

Pretzel

Purpose

Pretzel is a tool that helps you to reuse existing Functional Tests in popular frameworks like RestAssured to do Load and Performance Tests with Java.

Background

Teams use BDD to drive development based on the user behaviour, but stories never go beyond a single user, defects are found very late within development or even in production and there are no service level agreements, only actual user behaviour!
We need an easy, reusable way to tackle this, which would enable our development teams to drive load and performance testing into their day-to-day activities: from requirements gathering, to test automation as well as having part of the delivery pipeline, reusing the existing Java, RestAssured and Cucumber tests.
We have build Pretzel to help us with all of the above.

How to use

Add the Dependency in your pom.xml

    <dependency>  
    	<groupId>com.github.nightcodelabs</groupId>  
    	<artifactId>pretzel</artifactId>  
    	<version>0.0.2</version>   
    </dependency>  

Start using Pretzel in your project

  • Create a class that will be used to execute a load and performance test in src/main/java/pretzel extending com.github.nightcodelabs.pretzel.performance.Task
  • In the execute method, reference the piece of code you want to reuse from your functional tests
  • In your favorite test framework, call pretzel.doPretzel with the needed parameters
  • Execute the test, you will find the generated reports in target/pretzel
  • Initialize the reporting in the @before of the test execution
  • Process the report images in the @after of your test execution

Since we've built Pretzel with the idea to use it with Cucumber in BDD fashion, we've built this project example to guide you.

Installing Dependencies

Windows

  • Install latest JDK
  • Install python
  • Install Visual Studio Code / Build Tools for C++ (Yeah, locustio doesn't really work without these build tools because a weird dependency)
  • In command line run:
 $ pip install locustio==0.13.5  
  • Add locustio to your env. path
  • Restart cmd
  • Install maven
  • In command line run:
 $ mvn install  

Linux

  • Install JDK
  • Install Python:
 $ sudo apt install pip 
  • Install Locustio:
 $ pip install locustio==0.13.5   
  • Add Locustio to env path:
  $ vi  ~/.bash_rc  
  $ export PATH=$PATH:~/.local/bin
  • restart terminal
  • Install maven:
  $ sudo apt install maven
  • In command line run:
 $ mvn install  

Configurable Properties

We offer the possibility to personalize some default configurations.
You only need to create a config.properties file into src/main/resources/config.
The name of the personalizable variables can be found here.

Make sure you know what you're doing, otherwise this might break the execution.

How to contribute

We're super open to contributors. If you have an idea, open an issue, and we'll discuss it.
If you have a solution, fork our repo and submit a PR.

pretzel's People

Contributors

dmarcas avatar therussiankid92 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  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.