-
-
Notifications
You must be signed in to change notification settings - Fork 404
New Wiki Home (WIP)
Welcome To Zerocode Wiki. Use the sidebar on the right to locate a topic or use "Ctrl+f" to find a topic. 👉
If you are not sure where to start, why not take a look at the What is Zerocode, then jump to the Developer's Guide.👇
- Introduction
- Super Easy and Reduced Complexity
- Lenient and Strict Matching
- Validation and Verification
- Load Testing Made Easy
- Security Testing Made Easy
- Dev/Test/BA Collaboration Made Easy
- Useful Reports and Dashboards
- Smart Projects Using Zerocode
- Getting started ⛹♂
- Supported testing frameworks
- A HTTP REST scenario or an user journey
- Running a scenario
- Performance Testing - Auto HTTP load generation
- Performance Testing - JUnit4
- Performance Testing - JUnit5
- Kafka Validation
- Parameterized Scenario
- Using Custom HttpClient
- Sending query params to HTTP hosts
- Http Basic-Auth security validation
- Boundary End Point Mocking
- Externalizing RESTful host and port
- Running a scenario in loop
- Passing Content-Type header
- Http Max TimeOut or Implicit Wait
- Dealing with dynamic arrays
- Chaining multiple steps for a scenario
- Ignoring step failures
- Running a Suite of Tests
- Zerocode test-input tokens
- Verifying HTTP error messages
- Invoking java utility methods
- Re-Using custom properties
- Bare JSON Strings as payload
- Empty HTTP body payload
- Handling Content-Type with charset-16 or charset-32
- Environment switching in build pipeline
- SOAP method invocation with xml input
- SOAP method invocation via Corporate Proxy
- Chatbot Validation
- Python DSL
- YAML and JSON Slice And Dice - Solved
- Inspired by and credits
- References, Discussions and articles
Zerocode helps you to design better Test Cases for your business functionalities and then maintain them easily to avoid sleepless nights. You do this simply by configuring, declaring and executing the scenario-files enabling you to completely eliminate the glue or boilerplate coding.
Simply annotate your test method with @Test and run like JUnit
tests.
Testing becomes an easy and effortless job due to the simplicity nature of YAML/JSON formats and their native support by popular IDEs e.g. Eclipse /IntelliJ /NetBeans
etc with no extra plugin. Super easy!
It enables us to write automation tests for our
-
API End Point Validations
, -
Performance(Load/Stress) Validations
, -
Consumer Contract Validations
, -
End to End User Journey
, -
In Memory Application Validations
and -
API Security Validations
etc,
at the speed of writing JUnit tests.
It makes the tests declarative, configurable, and accurate.
Zerocode provides both LENIENT and STRICT matching mode for result comparison.
Zerocode enables you to achieve both Verification and Validation.
Visit here to learn JUnit way of load and stress generation
Zerocode gives you out of the box SSL enabled Http Client and SOAP Client along with the optional MIME type converters e.g. XML to JSON if needed to increase test readability. It provides you with the options to configure Corporate Proxy at runtime to allow API invocations via corporate-proxies
.
Zerocode has built general functionality which enables you to extend and enrich the framework behaviour by simply executing external Java methods as utility-functions to achieve business goals rather than putting every feature into the core framework.
Zerocode prints the request, response into the console as well as to the log file in the /target
folder in a human/business readable format, along with producing granular report in the CSV format
and Interactive Fuzzy Search Enabled Chart report
.
You can search and filter
the test report by author
or test-scenario
or test-step
or any relevant matching text making it super easy to trace a step in the context of a scenario or user-journey.
Test reports are generated into /target
folder every time the tests are run. Sample reports are here format.
Test logs are generated in the console as well as an user-defined log file. Default log location is target/logs/zerocode_rest_bdd_logs.log
.
::Note:: Every step can be traced with an auto generated STEP-ID to correlate a request with its response.
e.g.
--------- CORRELATION-ID: e6170365-94e7-49dc-a1a3-5e102468acd9 ---------
requestTimeStamp:2017-12-20T10:00:48.840
step:get_same_employee
url:http://localhost:9999/api/testing/v1/persons/UK1001
method:GET
request:
{ }
--------- CORRELATION-ID: e6170365-94e7-49dc-a1a3-5e102468acd9 ---------
Response:
{
"status" : 200,
"headers" : {
"Date" : [ [ "Wed, 20 Dec 2016 03:00:48 GMT" ] ]
},
"body" : {
"id" : "UK1001",
"name" : "Gov UK",
"addresses" : [ {
"line1" : "HOME, AECS Layout, ZIP-56094"
}
]
}
}
*responseTimeStamp:2017-12-20T10:00:48.847
*Response delay:7.0 milli-secs
---------> Expected Response: <----------
{
"status" : 200,
"body" : {
"id" : "UK1001"
}
}
-done-
Scenario failed for :-
[test_get_request_response_rainy_scene.json]
|
|
+---Step --> [get_an_employee_detail]
Failures:
---------
Assertion path '$.status' with actual value '200' did not match the expected value '400'
Zerocode aims to make development and testing easier and faster, not harder and slower. Enables both Dev-team and Test-team to collaborate towards the highest quality of the software.
Visit the Zerocode Documentation Site for all things.
-
User's Guide
-
Matchers
-
Zerocode Value Tokens
-
YAML DSL
-
Http Testing
-
Kafka Testing
- Introduction
- Produce, consume proto message
- Produce raw message
- Consume raw message
- Produce JSON message
- Consume JSON message
- Produce and consume XML message
- Kafka - consume the latest message or n latest messages
- Produce avro message
- Consume avro message
- KSQL in action
- Produce multiple records
- Produce from file
- Produce to a partition
- Produce and consume records with headers
- Produce n assert partition ack
- Comsume and dump to file
- commitSync vs commitAsync
- Overriding config inside a test
- Chosing String or Int or Avro Serializer
- Chosing String or Int or Avro Deserializer
- Attaching timestamp during load
- Default timestamp provided by Kafka
- Consume and assert avro schema metadata
- Error handling - produce via avro schema
- Sorting Kafka records consumed
-
DB Testing
-
Kotlin Testing
-
Performance Testing - Load and Stress
- Performance Testing - via awesome JUnit runners
- Load Vs Stress generation on target application
- Run a single test or a scenario in parallel
- Run multiple test scenarios in parallel - Production load simulation
- Dynamically change the payload for every request
- Analytics - Useful report(s) or statistics
-
Parameterized Testing
-
Docker
-
More+
-
Extensions
-
JUnit5 Jupiter Test
-
Questions And Answers(FAQ)
- What is Zerocode testing?
- SSL http https connections supported?
- How to assert array size Greater-Than Lesser-Than etc?
- How to invoke POST api?
- How to assert custom headers of the response?
- How to pass custom security token into the request header?
- When to use JUnit Suite runner and when Zerocode Package runner?
- How to execute DB SQL and assert?
- How to handle Http response other than utf-8 e.g. utf-16 or utf-32 ?
- Random Number Generator Placeholders Usages and Limits
- Automation tests for Zerocode lib itself
- Picking a leaf value from the array matching JSON Path
- Array assertions made easy, incl. size and element finder
-
Read Our Blogs
- Top 16 Open Source API Testing Tools For REST & SOAP Services - joecolantonio (Lists popular tools - Globally)
- OAuth2 Test Automation - DZone 2min Read
- Zero defect APIs - Build Pipe Line - Medium 10 min Read
- Develop ZeroDefect API's with ZeroCode! - Extreme Portal ( A must read for all developers and test engineers) 10min Read
- Performance testing using JUnit and maven - Codeproject 10 min Read
- REST API or SOAP End Point Testing - Codeproject 10min Read
- DZone- MuleSoft API Testing With Zerocode Test Framework - DZone 5min Read
- Testing need not be harder or slower, it should be easier and faster - DZone 5 min Read
- Kotlin Integration Testing simplified via Zerocode - Extreme portal 10 min Read
- and More...