* Initial commit Signed-off-by: Aleksandra Lukic <alukic@vmware.com> * Formatting, adding a reference to the test strategy Signed-off-by: Aleksandra Lukic <alukic@vmware.com> * Title formatting Signed-off-by: Aleksandra Lukic <alukic@vmware.com> * Removed test types and extra spaces Signed-off-by: Aleksandra Lukic <alukic@vmware.com> * [bitnami/*]: test: 🚸 Make "Early Feedback" run in all PRs (#9077) Signed-off-by: Javier Salmeron Garcia <jsalmeron@vmware.com> Signed-off-by: Aleksandra Lukic <alukic@vmware.com> * [bitnami/zookeeper] Release 8.0.3 updating components versions Signed-off-by: Bitnami Containers <containers@bitnami.com> Signed-off-by: Aleksandra Lukic <alukic@vmware.com> * [bitnami/odoo] Release 20.2.8 updating components versions Signed-off-by: Bitnami Containers <containers@bitnami.com> Signed-off-by: Aleksandra Lukic <alukic@vmware.com> * [bitnami/wavefront] Release 3.1.26 updating components versions Signed-off-by: Bitnami Containers <containers@bitnami.com> Signed-off-by: Aleksandra Lukic <alukic@vmware.com> * [bitnami/grafana-tempo] Release 1.0.3 updating components versions Signed-off-by: Bitnami Containers <containers@bitnami.com> Signed-off-by: Aleksandra Lukic <alukic@vmware.com> * [bitnami/node-exporter] Release 2.4.2 updating components versions Signed-off-by: Bitnami Containers <containers@bitnami.com> Signed-off-by: Aleksandra Lukic <alukic@vmware.com> * [bitnami/dataplatform-bp2] Release 10.0.9 updating components versions Signed-off-by: Bitnami Containers <containers@bitnami.com> Signed-off-by: Aleksandra Lukic <alukic@vmware.com> * [bitnami/airflow] Release 12.0.3 updating components versions Signed-off-by: Bitnami Containers <containers@bitnami.com> Signed-off-by: Aleksandra Lukic <alukic@vmware.com> * [bitnami/apache] Release 9.0.3 updating components versions Signed-off-by: Bitnami Containers <containers@bitnami.com> Signed-off-by: Aleksandra Lukic <alukic@vmware.com> * [bitnami/postgresql-ha] Release 8.4.1 updating components versions Signed-off-by: Bitnami Containers <containers@bitnami.com> Signed-off-by: Aleksandra Lukic <alukic@vmware.com> * [bitnami/osclass] Release 13.0.6 updating components versions Signed-off-by: Bitnami Containers <containers@bitnami.com> Signed-off-by: Aleksandra Lukic <alukic@vmware.com> * [bitnami/rabbitmq] Release 8.29.1 updating components versions Signed-off-by: Bitnami Containers <containers@bitnami.com> Signed-off-by: Aleksandra Lukic <alukic@vmware.com> * [bitnami/testlink] Release 10.0.7 updating components versions Signed-off-by: Bitnami Containers <containers@bitnami.com> Signed-off-by: Aleksandra Lukic <alukic@vmware.com> * [bitnami/nginx] Release 9.7.7 updating components versions Signed-off-by: Bitnami Containers <containers@bitnami.com> Signed-off-by: Aleksandra Lukic <alukic@vmware.com> * [bitnami/owncloud] Release 11.0.7 updating components versions Signed-off-by: Bitnami Containers <containers@bitnami.com> Signed-off-by: Aleksandra Lukic <alukic@vmware.com> * [bitnami/influxdb] Release 3.0.3 updating components versions Signed-off-by: Bitnami Containers <containers@bitnami.com> Signed-off-by: Aleksandra Lukic <alukic@vmware.com> * [bitnami/kube-state-metrics] Release 2.2.8 updating components versions Signed-off-by: Bitnami Containers <containers@bitnami.com> Signed-off-by: Aleksandra Lukic <alukic@vmware.com> * [bitnami/metallb] Release 2.6.5 updating components versions Signed-off-by: Bitnami Containers <containers@bitnami.com> Signed-off-by: Aleksandra Lukic <alukic@vmware.com> * [bitnami/mongodb-sharded] Release 4.0.4 updating components versions Signed-off-by: Bitnami Containers <containers@bitnami.com> Signed-off-by: Aleksandra Lukic <alukic@vmware.com> * [bitnami/suitecrm] Release 10.0.6 updating components versions Signed-off-by: Bitnami Containers <containers@bitnami.com> Signed-off-by: Aleksandra Lukic <alukic@vmware.com> * [bitnami/grafana-operator] Release 2.2.5 updating components versions Signed-off-by: Bitnami Containers <containers@bitnami.com> Signed-off-by: Aleksandra Lukic <alukic@vmware.com> * [bitnami/airflow] Release 12.0.4 updating components versions Signed-off-by: Bitnami Containers <containers@bitnami.com> Signed-off-by: Aleksandra Lukic <alukic@vmware.com> * [bitnami/wildfly] Release 13.1.5 updating components versions Signed-off-by: Bitnami Containers <containers@bitnami.com> Signed-off-by: Aleksandra Lukic <alukic@vmware.com> * [bitnami/tomcat] Release 10.1.10 updating components versions Signed-off-by: Bitnami Containers <containers@bitnami.com> Signed-off-by: Aleksandra Lukic <alukic@vmware.com> * [bitnami/drupal] Release 11.0.11 updating components versions Signed-off-by: Bitnami Containers <containers@bitnami.com> Signed-off-by: Aleksandra Lukic <alukic@vmware.com> * [bitnami/nginx-ingress-controller] Release 9.1.6 updating components versions Signed-off-by: Bitnami Containers <containers@bitnami.com> Signed-off-by: Aleksandra Lukic <alukic@vmware.com> * Fix Typo in README (#9031) * fix typo and bump chart version Signed-off-by: Sebastian Jäger <message@sebastian-jaeger.me> * Update Chart.yaml Co-authored-by: Carlos Rodríguez Hernández <carlosrh@vmware.com> Signed-off-by: Aleksandra Lukic <alukic@vmware.com> * [bitnami/contour] Support namespace-scoped leader election (#9030) Signed-off-by: Aleksandra Lukic <alukic@vmware.com> * [bitnami/kubewatch] Chart standardised (#9012) * [bitnami/kubewatch] Chart standardised Signed-off-by: Miguel Ruiz <miruiz@vmware.com> * Add diagnosticMode Signed-off-by: Miguel Ruiz <miruiz@vmware.com> * Update README.md Signed-off-by: Miguel Ruiz <miruiz@vmware.com> * Move lifecycleHooks Signed-off-by: Miguel Ruiz <miruiz@vmware.com> * [bitnami/kubewatch] Update components versions Signed-off-by: Bitnami Containers <containers@bitnami.com> Co-authored-by: Bitnami Containers <containers@bitnami.com> Signed-off-by: Aleksandra Lukic <alukic@vmware.com> * [bitnami/mariadb-galera] Do not hardcode PDB apiVersion (#9086) Signed-off-by: Aleksandra Lukic <alukic@vmware.com> * [bitnami/osclass] Do not hardcode PDB apiVersion (#9113) Signed-off-by: Aleksandra Lukic <alukic@vmware.com> * [bitnami/redmine] Do not hardcode PDB apiVersion (#9116) Signed-off-by: Aleksandra Lukic <alukic@vmware.com> * [bitnami/thanos] Do not hardcode PDB apiVersion (#9118) Signed-off-by: Aleksandra Lukic <alukic@vmware.com> * [bitnami/wordpress] Added the image upload test for Wordpress (#9059) * Added an upload image test for WordPress Signed-off-by: Aleksandra Lukic <alukic@vmware.com> * Removed the tab changes for now for easier review Signed-off-by: Aleksandra Lukic <alukic@vmware.com> * Trigger pipeline Signed-off-by: Aleksandra Lukic <alukic@vmware.com> * Trigger pipeline Signed-off-by: Aleksandra Lukic <alukic@vmware.com> * Trigger pipeline Signed-off-by: Aleksandra Lukic <alukic@vmware.com> * [bitnami/airflow] Do not hardcode PDB apiVersion (#9088) Signed-off-by: juan131 <juanariza@vmware.com> Signed-off-by: Aleksandra Lukic <alukic@vmware.com> * [bitnami/argo-workflows] Do not hardcode PDB apiVersion (#9089) Signed-off-by: Aleksandra Lukic <alukic@vmware.com> * [bitnami/aspnet-core] Do not hardcode PDB apiVersion (#9090) Signed-off-by: Aleksandra Lukic <alukic@vmware.com> * [bitnami/etcd] Do not hardcode PDB apiVersion (#9094) Signed-off-by: Aleksandra Lukic <alukic@vmware.com> * [bitnami/external-dns] Do not hardcode PDB apiVersion (#9095) Signed-off-by: Aleksandra Lukic <alukic@vmware.com> * [bitnami/consul] Do not hardcode PDB apiVersion (#9092) Signed-off-by: Aleksandra Lukic <alukic@vmware.com> * [bitnami/cassandra] Do not hardcode PDB apiVersion (#9091) Signed-off-by: Aleksandra Lukic <alukic@vmware.com> * [bitnami/jupyterhub] Do not hardcode PDB apiVersion (#9096) Signed-off-by: Aleksandra Lukic <alukic@vmware.com> * [bitnami/keycloak] Do not hardcode PDB apiVersion (#9097) Signed-off-by: Aleksandra Lukic <alukic@vmware.com> * [bitnami/contour] Do not hardcode PDB apiVersion (#9093) Signed-off-by: Aleksandra Lukic <alukic@vmware.com> * [bitnami/kong] Do not hardcode PDB apiVersion (#9098) Signed-off-by: Aleksandra Lukic <alukic@vmware.com> * [bitnami/mariadb] Do not hardcode PDB apiVersion (#9101) Signed-off-by: Aleksandra Lukic <alukic@vmware.com> * [bitnami/logstash] Do not hardcode PDB apiVersion (#9100) Signed-off-by: Aleksandra Lukic <alukic@vmware.com> * [bitnami/metrics-server] Do not hardcode PDB apiVersion (#9102) Signed-off-by: Aleksandra Lukic <alukic@vmware.com> * [bitnami/minio] Do not hardcode PDB apiVersion (#9103) Signed-off-by: Aleksandra Lukic <alukic@vmware.com> * [bitnami/mongodb-sharded] Do not hardcode PDB apiVersion (#9104) Signed-off-by: Aleksandra Lukic <alukic@vmware.com> * [bitnami/mongodb] Do not hardcode PDB apiVersion (#9105) Signed-off-by: Aleksandra Lukic <alukic@vmware.com> * [bitnami/mysql] Do not hardcode PDB apiVersion (#9106) Signed-off-by: Aleksandra Lukic <alukic@vmware.com> * [bitnami/nats] Do not hardcode PDB apiVersion (#9107) Signed-off-by: Aleksandra Lukic <alukic@vmware.com> * [bitnami/nginx-ingress-controller] Do not hardcode PDB apiVersion (#9108) Signed-off-by: Aleksandra Lukic <alukic@vmware.com> * [bitnami/nginx-intel] Do not hardcode PDB apiVersion (#9109) Signed-off-by: Aleksandra Lukic <alukic@vmware.com> * [bitnami/nginx] Do not hardcode PDB apiVersion (#9110) Signed-off-by: Aleksandra Lukic <alukic@vmware.com> * [bitnami/oauth2-proxy] Do not hardcode PDB apiVersion (#9111) Signed-off-by: Aleksandra Lukic <alukic@vmware.com> * [bitnami/odoo] Do not hardcode PDB apiVersion (#9112) Signed-off-by: Aleksandra Lukic <alukic@vmware.com> * [bitnami/redis-cluster] Do not hardcode PDB apiVersion (#9115) Signed-off-by: Aleksandra Lukic <alukic@vmware.com> * [bitnami/postgresql-ha] Do not hardcode PDB apiVersion (#9114) Signed-off-by: Aleksandra Lukic <alukic@vmware.com> * [bitnami/wordpress-intel] Do not hardcode PDB apiVersion (#9119) Signed-off-by: Aleksandra Lukic <alukic@vmware.com> * [bitnami/spring-cloud-dataflow] Do not hardcode PDB apiVersion (#9117) Signed-off-by: Aleksandra Lukic <alukic@vmware.com> * Update TESTING.md Applied the commit suggestion Co-authored-by: Carlos Rodríguez Hernández <carlosrh@vmware.com> Signed-off-by: Aleksandra Lukic <alukic@vmware.com> * Update TESTING.md Co-authored-by: Carlos Rodríguez Hernández <carlosrh@vmware.com> Signed-off-by: Aleksandra Lukic <alukic@vmware.com> * Update TESTING.md Co-authored-by: Carlos Rodríguez Hernández <carlosrh@vmware.com> Signed-off-by: Aleksandra Lukic <alukic@vmware.com> * Update TESTING.md Co-authored-by: Carlos Rodríguez Hernández <carlosrh@vmware.com> Signed-off-by: Aleksandra Lukic <alukic@vmware.com> * Update CONTRIBUTING.md Co-authored-by: Carlos Rodríguez Hernández <carlosrh@vmware.com> Signed-off-by: Aleksandra Lukic <alukic@vmware.com> * Removed an extra empty line Signed-off-by: Aleksandra Lukic <alukic@vmware.com> * Modified as per PR Signed-off-by: Aleksandra Lukic <alukic@vmware.com> * Removed extra line Signed-off-by: Aleksandra Lukic <alukic@vmware.com> * Cosmetic changes Signed-off-by: Aleksandra Lukic <alukic@vmware.com> * Cosmetic changes Signed-off-by: Aleksandra Lukic <alukic@vmware.com> * Adding changes per PR Signed-off-by: Aleksandra Lukic <alukic@vmware.com> * Removed the testing of the test reference Signed-off-by: Aleksandra Lukic <alukic@vmware.com> * Changed the link to Trivy Signed-off-by: Aleksandra Lukic <alukic@vmware.com> * Added clarification on test types Signed-off-by: Aleksandra Lukic <alukic@vmware.com> * Aded a wider category of tests called integration tests Signed-off-by: alukic <alukic@vmware.com> * Added the changes according to EM's feedback Signed-off-by: alukic <alukic@vmware.com> * Added the link to helm lint Signed-off-by: alukic <alukic@vmware.com> * Rephrased the point 3 in Contributing Signed-off-by: alukic <alukic@vmware.com> * Reordered the common test cases Signed-off-by: alukic <alukic@vmware.com> Co-authored-by: Javier J. Salmerón-García <jsalmeron@vmware.com> Co-authored-by: Bitnami Containers <containers@bitnami.com> Co-authored-by: Sebastian Jäger <message@sebastian-jaeger.me> Co-authored-by: Carlos Rodríguez Hernández <carlosrh@vmware.com> Co-authored-by: Maciej Małecki <me@mmalecki.com> Co-authored-by: Miguel Ruiz <miruiz@vmware.com> Co-authored-by: Juan Ariza Toledano <juanariza@vmware.com>
4.9 KiB
Test Strategy
The overall test strategy can be described as minimalistic, rather than extensive. The goal of the tests is to verify that the application is deployed properly, so we will verify the main application features.
Decide the testing scope carefully, keeping in mind the maintainability of the tests and the value they provide. The tests described here are deployment tests since their goal is to verify that the software is correctly deployed with all the inherent features. Both functional and non-functional characteristics are evaluated in these tests, focusing on the installation aspect.
- The core asset features work properly when deployed
- There are no regression bugs
Before writing any test scenario, understand the primary purpose of the chart. Take a look at the documentation about the chart under test as well as the docker image documentation. This will give you a solid base for creating valuable test scenarios.
Common test cases
- Login/Logout
- Important files and folders are present in the docker image
- CRUD
- File upload
- SMTP (if applicable)
- Establish a connection
- Plugins (if applicable)
HOW-TO:
Tools
The current test system supports a set of tools that are listed below. Test execution is done on temporary environments which are deployed and destroyed on the fly. In order to trigger the test execution in these test environments, internal approval is needed. Keeping in mind the acceptance criteria as well as the best practices for test automation using the supported tool will help you get your PR approved.
Test types
- Functional tests
- Integration tests
Dynamic testing
This part is of the most interest for the contributor. This is where the test design, test execution and test maintenance efforts will be focused.
If your asset has a user interface, you will need to include the following tests:
Static analysis
Static analysis is included for all assets as a part of the pipeline. Since this analysis is generic, it is defined internally and added as an action to the existing the pipeline. There is no need for additional work on the contributor side related to this. The following types of static analysis are supported:
NOTE: Cypress and Goss tests need to be tailored per application under test.
Test acceptance criteria
In order for your test code PR to be accepted the following criteria must be fulfilled.
Generic
- Minimum of 5 test cases per test type is needed
- Key features of the asset need to be covered
- Tests need to contain assertions
- Tests need to be stateless
- Tests need to be independent
- Tests need to be retry-able
- Tests need to be executable in any order
- Test scope needs to be focused on installation of the asset and not testing the asset
- Test code needs to be peer-reviewed
- Aim to write one scenario per test type. In case there is a need to divide test code into two scenarios, the reasoning should be provided
- Tests need to be as minimalistic as possible
- Tests should run properly for future versions without major changes
- Avoid hardcoded values
- Use smart and uniform locator strategies
- Prefer fluid waits over hardcoded waits
- Favor URL’s for navigation over UI interaction
- Include only necessary files
- Test code needs to be maintainable
- Test names should be descriptive
- Test data should be generated dynamically
Cypress
- Test file name has the following format: Helm chart name + spec (ex:
wordpress_spec.js) - No
describe()blocks for Cypress test - Aim to have an assertion after every command to avoid flakiness, taking advantage of Cypress retry-ability
- Test description is a sentence with the following format: Expected result summary, starting with a verb, in third person, no dots at the end of the sentence (ex:
it('checks if admin can edit a site', ()) - Respect the folder structure recommended by Cypress:
- fixtures - for test data
- Integration - test scenario
- plugins - plugin configuration, if applicable
- support - reusable behaviours and overrides
- cypress.json - configuration values you wish to store