Skip to content
This repository has been archived by the owner on Dec 8, 2022. It is now read-only.

cloudtrust/acceptance-tool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

67 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Acceptance-tool

Acceptance tool contains the business tests required for the CloudTrust appliance: sign-on, single sign-on, logout, access control, claim augmentations, etc., both for the SAML and WSFED protocols.

Prerequisites

Before being able to launch the tests, one needs:

  • one instance of Keycloak that acts as IDP or as broker IDP in the broker test cases
  • one instance of Keycloak that acts as external IDP
  • 8 service providers (SPs), 4 SAML and 4 WSFED, that are used for different tests

The config file for both the IDP and SP is located at tests_config/dev.json. Pay attention that the config file follows the realms settings (i.e. name of clients, port, ip) and if you need to change these values you need to import the realm and change the settings accordingly.

The two keycloak instances need to have the following modules installed:

Setup

git clone [email protected]:cloudtrust/acceptance-tool.git
python3 -m venv acceptance-tool
cd acceptance-tool
source bin/activate
pip3 install --upgrade pip
pip3 install -r requirements.txt

In order to run the tests, there are two realms prepared (one for the broker and one for the external IDP) that contain all the clients, users, roles, attributes needed for the tests. At every launch of the tests, two fixtures that import the realms are executed. The realms are located at tests_config/test_realm.json and tests_config/test_realm_external.json and the fixtures perform an import of the realm representation found in these JSON files.

Run tests

In order to launch the SAML tests, please execute the following command:

python3 -m pytest tests/business_tests/saml_tests/ -vs --config-file tests_config/dev.json --standard SAML 

The paremeter -v and -s are used to increase the verbosity. Parameter --config-file provides the path to the configuration file. Parameter --standard gives the connection protocol. This parameter is needed only for the logout tests, where we need to login before starting the test and we need to say what connection protocol is used.

In order to launch the WSFED tests, please execute the foolowing command:

python3 -m pytest tests/business_tests/wsfed_tests/ -vs --config-file tests_config/dev.json --standard WSFED

Parameters used are the same as for the SAML tests.

For launching individual test, one needs just to give the name of the test:

python3 -m pytest -vs tests/business_tests/saml_tests/test_CT_TC_SAML_BROKER_ACCESS_CONTROL_RBAC_OK.py --config-file tests_config/dev.json

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages