CPS Testing

 

 

 

 

 

CPS Team Testing Strategy

  1. Test Strategy.pptx

  2. Current Tests with Vertical Slice Example

CPS Test Overview

CPS testing strategy follows best in class quality principles and practices; based on the Testing Pyramid as recommended by Martin Fowler.

 

credit: https://martinfowler.com/articles/practical-test-pyramid.html

 

This Diagram shows an overview of the different types of test and their scope related to the architecture layers

Color Coding

 

Source Code

 

Unit Test


Semi Integration Test
(Service Tests)

 

Integration Test

 

Over time we have developed an extensive set of tests:

1

Unit Tests. CPS uses Groovy & Spock for unit testing

2

Service Test (or Semi-Integration Test) using Spring Boot Test Containers for Postgres and Kafka and Mocked/Stubbed Services for external components like DMI and Policy Executor. These test are written in GroovySpock

  1.  

    1. Functional

    2. Performance

      1. Performance Graphs

3

(UI) Integration test (since we don't have a UI these start at the REST layer of our components)

  1.  

    1. CSIT Component System Integration Test.  CPS utilizes Robot framework for CSIT tests..

    2. K6 Integration Test

    3. K6 Performance Tests

      1. Performance Graphs

4

Contract Testing (not visible in diagram)
contact testing is implicit sas CPS is build using a contract-first approach. ie.  the Java Interface is generated from the Open-API )(swagger) contracts and therefor always adheres to it.
We also have MVC test on each controller method to verify the correct mapping of parameters etc.

Integration Test

CSIT Integration Test