-
-
Notifications
You must be signed in to change notification settings - Fork 403
Automation tests for Zerocode lib itself
Zerocode has been built using TDD methodology. Which means tests are written first, then the implementation of the feature is coded.
All collaborators have been motivated/encouraged to do this way wherever applicable. Where the "tests first" not applicable or difficult to write, then the committers make sure they cover them with unit tests and integration tests after they implement the feature.
There are three categories of tests at least existing to cover all the branches of the code.
- Unit tests
- Feature tests or local-integration tests or in-memory tests
- Actual integration tests i.e. post-deployment tests
Please look at the "src/test/java" package- It has close to 200+ running test-cases just for the core module. Which means- Everytime a PR is raised or a branch is built, all these tests run. Then these are (1) and (2) of the above. After these run
completed, the (3) i.e. post-deployment test run.
- For Http module - We use service virtualization by bringing up REST endpoints in a local container and fire the e2e REST/SOAP/Security tests
- For Kafka module - We bring up dockerized Kafka containers, then file e2e Kafka tests.
Other than the above, the HelloWorld
project has its own CI job. In this project, we run test coverages for many usecase scenarios to make sure that our new released Zerocode artefact is backward compatible and not breaking any existing customer's contract(zerocode DSL features) intentionally.
Because this is mostly downloaded by folks(testers/developers) just to try out the Zerocode features independently. That's why a separate pipe-line job has been set up to ensure it is green
always.
Only after all the tests are Green
in the pipeline, the artefact is released to Maven Nexus Repository.
To view all the setup above, just have a look at the build YAML files
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...