BDD and TDD

This repository contains a list of BDD features and scenarios that describe each interaction in the use-case library by example. The features are arranged and numbered depending on the use-case they describe.

Use-Case Feature Test Status
UC001 - Bootstrap F001 - Apply Standard Defined Role to Canvas Admin user Complete
UC001 - Bootstrap F002 - Grouping Permission Specification Sets-into Business Roles in Identity Management Solution Not started
UC001 - Bootstrap F003 - Secure User and Role Information Not started
UC001 - Bootstrap F004 - Component Exposes Permission Specification Set Towards Canvas Not started
UC002 - Expose APIs for Component F001 - Create API Resource Complete
UC002 - Expose APIs for Component F002 - Publish API Resource URL Complete
UC002 - Expose APIs for Component F003 - Verify API implementation is ready Complete
UC002 - Expose APIs for Component F004 - Upgrade component with additional API Complete
UC002 - Expose APIs for Component F005 - Upgrade component with removed API Complete
UC002 - Expose APIs for Component F006 - Component Specified Rate Limiting and Throttling of API Requests Not started
UC007 - Authentication external F001 - Logging and Monitoring of Authentication Activity Not started
UC016 - Seamless upgrade F001 - Installing components using prev version Complete
UC016 - Seamless upgrade F002 - Canvas Operators using prev version Complete

Installation

  • install necessary packages

    cd identity-manager-utils-keycloak
    npm install
    cd ../package-manager-utils-helm
    npm install
    cd ../resource-inventory-utils-kubernetes
    npm install
    cd ..
    npm install
    
  • create a .env file and set KEYCLOAK_USER, KEYCLOAK_PASSWORD, KEYCLOAK_BASE_URL and KEYCLOAK_REALM - or use another option to define the variables

    KEYCLOAK_USER=admin 
    KEYCLOAK_PASSWORD=adpass 
    KEYCLOAK_BASE_URL=http://keycloack-ip:8083/auth/ 
    KEYCLOAK_REALM=myrealm
    

How to run the tests

Run the test in the command line using the following command:

npm start

All the tests should run and display the results in the command line.

If you only want to run a single test, you can use the following command:

npm start -- features/UC002-F001-Expose-APIs-Create-API-Resource.feature

The use cases and features are tagged. You can run the tests for a given use case with the following command:

npm start -- --tags '@UC002'

Or run the tests for a single feature with the following command:

npm start -- --tags '@UC002-F001'