Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add qa-ctl tool v0.1 #1895

Merged
merged 301 commits into from
Oct 11, 2021
Merged

Add qa-ctl tool v0.1 #1895

merged 301 commits into from
Oct 11, 2021

Conversation

jmv74211
Copy link
Contributor

@jmv74211 jmv74211 commented Sep 15, 2021

Related issue
close #1533

Description

This PR adds the qa-ctl tool to the wazuh-qa repository, in addition to the set of libraries used for its development in the qa framework.

Important note: For now, qa-ctl tool is only available for Linux systems.

  • Here you can find the related qa-ctl documentation and use guide.
  • Here you can find the qa-ctl installation guide

Checks

Run checks

Linux

  • Automatic mode
    qa-ctl -r test_general_settings_enabled --qa-branch 1533-qa-ctl
  • Automatic mode with debug level 1
    qa-ctl -r test_general_settings_enabled --qa-branch 1533-qa-ctl -d
  • Automatic mode with debug level 2
    qa-ctl -r test_general_setting_enabled --qa-branch 1533-qa-ctl -dd
  • Automatic mode with persistent environment
    qa-ctl -r test_general_settings_enabled --qa-branch 1533-qa-ctl -p
  • Manual mode skipping deployment and provisioning
    qa-ctl -c config.yaml --qa-branch 1533-qa-ctl --skip-deployment --skip-provisioning
  • Manual mode with several instances and testing (Check parallelism).
    qa-ctl -c config.yaml --qa-branch 1533-qa-ctl
  • Automatic mode with custom Wazuh version
    qa-ctl -r test_general_settings_enabled --qa-branch 1533-qa-ctl -v 4.2.0
  • Dry-run mode
    qa-ctl -r test_general_settings_enabled --dry-run

Windows

  • Automatic mode
    qa-ctl -r test_general_settings_enabled --qa-branch 1533-qa-ctl
  • Automatic mode with debug level 1
    qa-ctl -r test_general_settings_enabled --qa-branch 1533-qa-ctl -d
  • Automatic mode with debug level 2
    qa-ctl -r test_general_settings_enabled --qa-branch 1533-qa-ctl -dd
  • Automatic mode with persistent environment
    qa-ctl -r test_general_settings_enabled --qa-branch 1533-qa-ctl -p
  • Manual mode skipping deployment and provisioning
    qa-ctl -c config.yaml --qa-branch 1533-qa-ctl --skip-deployment --skip-provisioning
  • Manual mode with several instances and testing (Check parallelism).
    qa-ctl -c config.yaml --qa-branch 1533-qa-ctl
  • Automatic mode with custom Wazuh version
    qa-ctl -r test_general_settings_enabled --qa-branch 1533-qa-ctl -v 4.2.0
  • Dry-run mode
    qa-ctl -r test_general_settings_enabled --dry-run

Generic tests

  • Run test_cors
    qa-ctl -r test_cors --qa-branch 1533-qa-ctl
  • Run test_execd_restart
    qa-ctl -r test_execd_restart --qa-branch 1533-qa-ctl
  • Run test_cache
    qa-ctl -r test_cache --qa-branch 1533-qa-ctl
  • Run test_execd_firewall_drop
    qa-ctl -r test_execd_firewall_drop --qa-branch 1533-qa-ctl

Invalid qa-ctl script parameters

  • Automatic and manual mode together
    qa-ctl -r test_general_settings_enabled --qa-branch 1533-qa-ctl -c config.yaml
  • --version parameter can be only run in automatic mode
    qa-ctl -c config.yaml --qa-branch 1533-qa-ctl -v 4.2.2
  • --dry-run parameter can only be used in automatic mode
    qa-ctl -c config.yaml --qa-branch 1533-qa-ctl --dry-run
  • --skip-deployment parameter can only be used in manual mode
    qa-ctl -r test_general_settings_enabled --qa-branch 1533-qa-ctl --skip-deployment
  • --skip-provisioning parameter can only be used in manual mode
    qa-ctl -r test_general_settings_enabled --qa-branch 1533-qa-ctl --skip-provisioning
  • --skip-testing parameter can only be used in manual mode
    qa-ctl -r test_general_settings_enabled --qa-branch 1533-qa-ctl --skip-testing
  • Bad --version format parameter.
    qa-ctl -r test_general_settings_enabled --qa-branch 1533-qa-ctl --version 4.2
  • Bad --version release parameter.
    qa-ctl -r test_general_settings_enabled --qa-branch 1533-qa-ctl --version 4.1.10
  • Bad --qa-branch parameter. It does not exists on remote repository.
    qa-ctl -r test_general_settings_enabled --qa-branch bad-branch
  • Bad test name. It does not exists on remote repository.
    qa-ctl -r bad_test_name --qa-branch 1533-qa-ctl

jotacarma90 and others added 30 commits August 4, 2021 10:58
Module for provisioning Wazuh and QA Framework using Ansible
This commit also adds:
- Fixing import errors in deployment module.
- Let ssh connections to docker containers.
- Let DockerWrapper get containers IPs
- The dependencies are installed when building the image.
This commit also adds parameters to qactl tool to perform actions in the
VMs and containers.
Create tool to launch full QACTL functionality
- Add missing docs.
- Remove useless line in qactl script
- Rename non descriptive variables.
- Remove outdated documentation.
@snaow
Copy link
Contributor

snaow commented Oct 8, 2021

Great job. A big step in the QA team.

@snaow snaow merged commit 039b9a1 into master Oct 11, 2021
@snaow snaow deleted the 1533-qa-ctl branch October 11, 2021 07:35
@snaow snaow mentioned this pull request Jan 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Design and development of tools for the automation of test deployment, provisioning and test execution
6 participants