Skip to content

Latest commit

 

History

History
81 lines (59 loc) · 2.97 KB

README.MD

File metadata and controls

81 lines (59 loc) · 2.97 KB

Order Microservice

Order Microservice is part of an eCommerce Application. The objective of selecting this Microservice is to demonstrate various testing frameworks. As Order is a complex service with internal (Ex. Inventory, Warhouse, Shipping etc) and external (Payment) service integration and it has all the requirements to use various testing frameworks. The objective is to demonstrate various testing frameworks.

Order Service REST Endpoints are documented using Open API v3. You can access the API's using http://localhost:9080/swagger-ui.html

Order Service API based on Open API v3

Order Service API based on Open API v3

Other Services

  1. Payment External Service
  2. Shipping Service
  3. Inventory Service
  4. Warehouse Service

Currently Order Service has a Mock Implementation of these services.

Now let us focus on Microservices Testing Strategies.

Microservice Testing Strategies

The following Test Categories helps you to automate the testing for Microservices based development resulting in ZERO End-2-End Testing. All the tests will be fully automated as part of your CI/CD pipeline.

Testing Categories for Microservices

  • Unit Testing (JUnit)
  • Component Testing (Cucumber + JUnit)
  • Behavior & Contract Testing (Mockito + JUnit)
  • Integration & Contract Testing (PACT & WireMock + JUnit)
  • UI Testing - User Flow (Selenium with Cucumber + JUnit)

Microservices Testing Categories

Dependencies

  • Spring Boot 2 (2.5.3)
  • Maven SureFire Plugin 2 (2.22.1)

Testing Frameworks

Microservices Testing Frameworks

  • SpringBootTest 2 (2.5.3)
  • JUnit 5 (5.7.2)
  • Hamcrest 2 (2.2)
  • Mockito 3 (3.11.2)
  • WireMock 2 ((2.29.0)
  • Cucumber 6 (6.10.4)
  • Selenium 4 (4.0.0)
  • Pact 4 (4.0.10)
  • AssertJ 3 (3.20.2)

Other Utility Libraries

  • Apache Commons (3.10)
  • Google GSON (2.8.7)
  • Google Guava (30.1.1-jre)
  • Faster XML (2.13.0-rc1)
/**
 * (C) Copyright 2021 Araf Karsh Hamid 
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */