skodjob / odh-e2e

Kubernetes native tests for opendatahub operator
Apache License 2.0
2 stars 4 forks source link
junit5 kubernetes opendatahub test-automation testing-tools

ODH-E2E

E2E test suite for opendatahub.io operator using fabric8 kubernetes client

UnitTest

Requirements

List of test tags

Environment variables

Examples how to run selected test suites

Run continuous suite

GITHUB_TOKEN="your_github_read_token" ./mvnw verify -Pcontinuous

Run standard (CRUD) suite

Run upgrade suite

GITHUB_TOKEN="your_github_read_token" ./mvnw verify -Pupgrade

RUN Unit test of the suite

GITHUB_TOKEN="your_github_read_token" ./mvnw test

Reproducing test run

When every test run is executed, test suite automatically creates a config.yaml file which contains all configured environment variables. Location of config file is $LOG_DIR/test-run-YYYY-MM-DD_HH-mm/config.yaml where $LOG_DIR is by default ${repo_root}/target/logs.

GITHUB_TOKEN="your_github_read_token" ENV_FILE=path_to_file/config.yaml ./mvnw verify -Psmoke

Debug

During failures all logs relevant logs are collected and stored in target/logs so users can go through the logs and see if the problem was in project or in tests.

As part of target/logs you can find file config.yaml that contains all env variables used by the test run. You can easily re-use it by pass path to the file into ENV_FILE environment variable. Note that we suggest to copy the file outside the target dir.

Testing docs

We are using test-metadata-generator maven plugin for annotating tests and generate test documentation from it. The docs are generated with every build and the changes should be committed when there are some.

The plugin is still under development so the format could change. For more info see the plugin repository on GitHub.

Allure reports

Enable the -Pallure Maven profile to collect testrun data for Allure reporting.

GITHUB_TOKEN="your_github_read_token" ./mvnw verify -Pstandard -Pallure

Then use the Allure Maven plugin to open a HTML report with the results in a web browser.

GITHUB_TOKEN="your_github_read_token" ./mvnw allure:serve

Authors

This test suite uses test-frame module.