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.
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 setKEYCLOAK_USER
,KEYCLOAK_PASSWORD
,KEYCLOAK_BASE_URL
andKEYCLOAK_REALM
- or use another option to define the variablesKEYCLOAK_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'