diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-21 11:54:28 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-21 11:54:28 +0000 |
commit | e6918187568dbd01842d8d1d2c808ce16a894239 (patch) | |
tree | 64f88b554b444a49f656b6c656111a145cbbaa28 /src/test/behave_tests/README.md | |
parent | Initial commit. (diff) | |
download | ceph-e6918187568dbd01842d8d1d2c808ce16a894239.tar.xz ceph-e6918187568dbd01842d8d1d2c808ce16a894239.zip |
Adding upstream version 18.2.2.upstream/18.2.2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/behave_tests/README.md')
-rw-r--r-- | src/test/behave_tests/README.md | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/src/test/behave_tests/README.md b/src/test/behave_tests/README.md new file mode 100644 index 000000000..570d1af67 --- /dev/null +++ b/src/test/behave_tests/README.md @@ -0,0 +1,50 @@ +# Integration testing using the behave framework + + +## Introduction + +Behave framework is based on the Behaviour driven development where the test cases defined using gherkin language (written natural language style). The test cases are defined in .feature files in `feature` directory and python implementation defined under `/feature/steps`. + +`features/environment.py` file is used to set up environment for testing the scenario using the kcli tool. When behave command is execute before each feature, kcli plan is generated to create the virtual machines. + +## Issues + +* We can't run the behave test cases via tox command. + +## Executing the behave tests + +We can execute all test scenario's by executing `behave` command under `src/test/behave_test` where `features` directory is required. + +```bash +$ behave +``` + +## Executing the behave tests with tags + +Tag's can be used to execute only specific type of test scenario's. + +```bash +$ behave -t <tag_name> +``` + +We have included the following tag for implemented test cases. +* osd +* ceph_shell +* cephadm + +## Steps used to define the test scenarios + +Python implementation of steps are defined in `steps` directory under `src/test/behave_tests/features/`. +Following implemented gherkin language steps used in `.feature` files to define the test scenarios. + +@given steps +* __I log as root into {`vm_name`}__ (vm_name is name of virtual machine) +* __I execute in {`shell`}__ (shell should defined as `host` or `cephadm_shell`) + +@when steps +* __I execute in {`shell`}__ + +@then steps +* __I execute in {`shell`}__ +* __I wait for {`timeout`} seconds until I get__ (timeout should be defined in seconds) +* __I get results which contain__ |