Skip to main content

Functional Analysis

This page explains how to use and customize the Functional Analisys for the application or microservice, this step uses an integration with Teskube

Pre-requisites

1. Have the testkube framework installed in your kubernetes-based platform, you can install it yourself or use our installer

info

We highly recommend to install the testkube framework in the staging environment.

2. Add the following secret as a variable in your CI platform:

Create a token in your CI platform and grant it read permissions on the repositories where functional analysis is required.

shamanops_testing_git_token *
The is value refers token with read permissions on the repositories where functional analysis is required.

3. Add the following variables in your CI platform:

shamanops_testing_api_url *
This value refers to the connection url for the api of the testkube instance you have installed.
Example: http://testkube-api-srv.testkube.svc.cluster.local:8088

shamanops_testing_git_user *
This value refers to the user that can use the token you've created above. If you are using BitBucket check the Info box below.

info

If you use BitBucket Pipelines the user must be x-token-auth

Usage

Playwright

1. Create the testing folder in your application repository, where you will leave the playwright testing plan

testing-folder

2. In the main branch you will edit the YAML file named .github/workflows/github-ci.yaml

3. In the github-ci.yaml file search for the Features section, you will find it like this:


## Features -------------------------------------------------------------------------------------#

4. Bellow the section title, add the following configuration and change the values as you need:

    # Functional Analysis
functional_analysis_enabled: 'true'
functional_analysis_blocker: 'false'
functional_analysis_test_type: 'playwright'

# Functional Analysis | Customizations
# Enable the persistency of the results that the testing generates
functional_analysis_test_storage_enabled: 'false'
# If the functional_analysis_test_storage_enabled is enabled, select the type of storage class
functional_analysis_test_storage_class: 'default'
# The path where you left the testing plan file
functional_analysis_test_path: 'testing'
# Choose the timeout for your testing plan
functional_analysis_test_timeout: '600'

5. In the github-ci.yaml file search for the secrets: section, you will find it like this:

#-------------------------------------------------------------------------------------------------#
secrets:

6. Bellow the section title, add the following configuration:

      shamanops_testing_git_token: ${{ secrets.shamanops_testing_git_token }}

7. Commit and enjoy! ✨

Pytest

1. In the main branch you will edit the YAML file named .github/workflows/github-ci.yaml

2. In the github-ci.yaml file search for the Features section, you will find it like this:


## Features -------------------------------------------------------------------------------------#

3. Bellow the section title, add the following configuration and change the values as you need:

    # Functional Analysis
functional_analysis_enabled: 'true'
functional_analysis_blocker: 'false'
functional_analysis_test_type: 'pytest'

# Functional Analysis | Customizations
# Enable the persistency of the results that the testing generates
functional_analysis_test_storage_enabled: 'false'
# If the functional_analysis_test_storage_enabled is enabled, select the type of storage class
functional_analysis_test_storage_class: 'default'
# The path where you left the testing plan file
functional_analysis_test_path: 'testing'
# Choose the timeout for your testing plan
functional_analysis_test_timeout: '600'

4. In the github-ci.yaml file search for the secrets: section, you will find it like this:

#-------------------------------------------------------------------------------------------------#
secrets:

5. Bellow the section title, add the following configuration:

      shamanops_testing_git_token: ${{ secrets.shamanops_testing_git_token }}

6. Commit and enjoy! ✨

Maven

1. In the main branch you will edit the YAML file named .github/workflows/github-ci.yaml

2. In the github-ci.yaml file search for the Features section, you will find it like this:


## Features -------------------------------------------------------------------------------------#

3. Bellow the section title, add the following configuration and change the values as you need:

    # Functional Analysis
functional_analysis_enabled: 'true'
functional_analysis_blocker: 'false'
functional_analysis_test_type: 'maven'
functional_analysis_test_path: ''

# Functional Analysis | Customizations
# Enable the persistency of the results that the testing generates
functional_analysis_test_storage_enabled: 'false'
# If the functional_analysis_test_storage_enabled is enabled, select the type of storage class
functional_analysis_test_storage_class: 'default'
# Choose the timeout for your testing plan
functional_analysis_test_timeout: '600'

4. In the github-ci.yaml file search for the secrets: section, you will find it like this:

#-------------------------------------------------------------------------------------------------#
secrets:

5. Bellow the section title, add the following configuration:

      shamanops_testing_git_token: ${{ secrets.shamanops_testing_git_token }}

6. Commit and enjoy! ✨

info

In Maven functional analysis the variable functional_analysis_test_path must be empty.