Cukes-REST alternatives and similar libraries
Based on the "Testing" category.
Alternatively, view Cukes-REST alternatives based on common mentions on social networks and blogs.
-
Apache JMeter
Apache JMeter open-source load testing tool for analyzing and measuring the performance of a variety of services -
TestContainers
Testcontainers is a Java library that supports JUnit tests, providing lightweight, throwaway instances of common databases, Selenium web browsers, or anything else that can run in a Docker container. -
MockServer
MockServer enables easy mocking of any system you integrate with via HTTP or HTTPS with clients written in Java, JavaScript and Ruby. MockServer also includes a proxy that introspects all proxied traffic including encrypted SSL traffic and supports Port Forwarding, Web Proxying (i.e. HTTP proxy), HTTPS Tunneling Proxying (using HTTP CONNECT) and SOCKS Proxying (i.e. dynamic port forwarding). -
PowerMock
PowerMock is a Java framework that allows you to unit test code normally regarded as untestable. -
Pact JVM
JVM version of Pact. Enables consumer driven contract testing, providing a mock service and DSL for the consumer project, and interaction playback and verification for the service provider project. -
Scott Test Reporter
Never debug a test again: Detailed failure reports and hassle free assertions for Java tests - Power Asserts for Java -
pojo-tester
Java testing framework for testing pojo methods. It tests equals, hashCode, toString, getters, setters, constructors and whatever you report in issues ;)
CodeRabbit: AI Code Reviews for Developers
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of Cukes-REST or a related project?
README
[cukes-rest logo](assets/cukes-rest-logo.png)
cukes-rest takes simplicity of Cucumber and provides bindings for HTTP specification. As a sugar on top, cukes-rest adds steps for storing and using request/response content from a file system, variable support in .features, context inflation in all steps and a custom plug-in system to allow users to add additional project specific content.
Resources
Sample Test
Feature: Gadgets are great!
Background:
Given baseUri is http://my-server.com/rest/
Scenario: Should create another Gadget object
Given request body from file gadgets/requests/newGadget.json
And content type is "application/json"
When the client performs POST request on /gadgets
Then status code is 201
And header Location contains "http://localhost:8080/gadgets/"
When the client performs GET request on {(header.Location)}
Then status code is 200
And response contains property "id" with value other than "2000"
And response contains property "name" with value "Nexus 9"
And response does not contain property "updatedDate"
There are three sections available to be used in a Feature files:
- Feature - a description of a feature under test
- Background - set of steps to be executed before every scenario (usually these are preconditions)
- Scenario - a single automated test case
As well as three groups of steps available
- Given - building up a HTTP request to be performed
- When - executing the request
- Then - assertions based on a response received
More information can be found in the presentation right here!
Prerequisites
- JDK 1.6+
Dependency
The dependencies are stored in Maven Central
cukes-rest: core dependency with all you need to get started with the framework (Maven)
<dependency>
<groupId>lv.ctco.cukes</groupId>
<artifactId>cukes-rest</artifactId>
<version>${cukes-rest.version}</version>
</dependency>
Getting Started
There are two options to start local server with Sample Application:
- Run SampleApplicaiton.java with following params
server server.yml
from $MODULE_DIR$ - Execute Package/Install Maven phase of the parent project cukes-rest-all
Running tests
Precondition: in order for all tests to pass successfully, please make sure you started fresh instance of Sample Application.
- To start a specific Feature/Scenario, either change CucumberOption in RunCukesTest.java or run Feature file directly from you IDE
- To start all tests run RunCukesTest.java from sub-project cukes-rest-sample
- To start all tests right from Maven, execute test phase in project cukes-rest-sample