Configuration Promotion Automation

Testing Automation

Unit testing

Unit testing goes beyond validation by running code to ensure the configuration is functional and achieves what is intended. Unit tests aim to test individual components of configuration to isolate issues. Build tests into continuous integration (CI) pipelines to run them automatically whenever configuration changes occur. This helps catch issues early in the development process.

Aspects of unit testing include:

  • Isolation of components: Test individual components configuration in isolation. Unit tests should focus on a specific part of the configuration, ensuring it behaves as expected independently of other components.

  • Mocking and stubbing: Use mocking or stubbing techniques to isolate the unit under test from external dependencies. This allows developers to control the behavior of external components and focus on testing the specific unit. Mocking and stubbing Ping Identity services could mean virtualizing the backend services.

Forms of unit testing include:

  • Terraform tests (terraform test) run against test-specific, short-lived resources, preventing any risk to existing infrastructure or state.

  • Code specific frameworks, such as Jest (for Javascript) or the native go test (for go).

  • Postman’s Mock Server feature can simulate backend API responses.

Integration testing

Integration testing goes beyond unit testing by ensuring the whole configuration or modules are tested as a group. Integration tests aim to test identify regression between dependencies. Build tests into CI pipelines to run them automatically whenever configuration changes occur. This helps catch issues early in the development process.

Aspects of integration testing include:

  • Realistic environment simulation: Create integration tests that simulate a realistic environment as closely as possible. This can involve using test environments or containers to replicate the production setup.

  • End-to-end testing: Perform end-to-end testing to validate the entire configuration, including its interactions with non-Ping Identity system configuration that is managed simultaneously.

  • Data consistency: Check for data consistency across different components. Ensure that data passed between various configuration elements maintains integrity and coherence.

  • Negative testing: Conduct negative testing to evaluate how well the configuration handles unexpected or invalid inputs, errors, and adverse conditions. This type of testing aims to identify vulnerabilities, ensure graceful error handling, and enhance overall robustness and security.

Forms of integration testing include:

  • Code-specific frameworks, such as Jest (for JavaScript) or the native go test (for go).

  • Postman’s Mock Server feature can simulate backend API responses.

  • Open-source testing frameworks, such as Citrus and Fitnesse.

  • Selenium automates browsers for testing configuration from the client perspective.