Repository navigation
Testing
This test plan focuses on testing the horizontal scalability of the Express project when deployed on a Kubernetes cluster. It supports the following objectives.
- To
This test plan was created to evaluate the ability
The Express project will be evaluated holistically.
The Express project consists of multiple separate components. The correctness of these individual components will not be evaluated.
The Express Controller is responsible for deploying, updating and tearing down application containers. As a result, it is required to to complete the testing tasks. However, it will not be evaluated because unit and functional tests are included as part of the subproject.
The following documents shall be included:
- Test Plan. This document is the test plan for the Express project.
- Test Summary Reports. A brief summary will be included each time the testing tasks are performed to discuss any notable trends. The summary will not include analysis of these trends.
- Test Input Data. This will be in the form of the number of users to simulate and the number of users spawned/second.
-
Test Output Data. Each time the testing tasks are performed the following will be produced.
-
distribution.csvcontaining the absolute number of each HTTP request sent during the test. -
exceptions.csvcontaining any errors that occurred during the test. -
requests.csvcontaining the requests per second, average sliding-window response time, and number of users.
-
The testing tasks are to performed four times. First on a Kubernetes cluster consisting of a single physical or virtual machine. The tasks must then be repeated on the same cluster after the addition of another machine. This process will be performed until the testing tasks have been completed on clusters consisting of one, two, three and four machines.
All preparation will be performed from the single test machine. The preparation assumes that the environmental needs in section 11 have been met. It is also required that the express-controller executable and Express v1.0.0-alpha.1 archive have been downloaded to the single test machine from the Releases section of the Express Github repository.
The Kubernetes cluster must be in a consistent state when starting the tasks. This can be accomplished by performing the following tasks. These tasks are only necessary if the testing tasks have already been performed on the cluster.
- Remove the previously deployed application using
express-controller teardown testapi. - Remove the Express environment from the cluster using
helm delete terrifying-bronco. - Remove all persistent volume claims using
kubectl delete pvc terrifying-bronco-database-0. - Remove all persistent volumes using
kubectl delete pv terrifying-bronco-database-0. - Wait until
No resources found.is shown when usingkubectl get pods.
The Kubernetes cluster must be prepared for running the testing tasks. This can be done by performing the following tasks.
- Navigate to the root directory of the Express v1.0.0-alpha.1 download in
bash. - Add the Express environment to the cluster using
helm install --replace --name terrifying-bronco ./express/. - Wait until all pods are ready when using
kubectl get pods. - Deploy the test CRUD API using
express-controller deploy testapi allankerr/api --port 8080 --max X --endpoint-config ./containers/api/endpoints.yaml. The parametermaxmust be changed to the number of nodes in the cluster. - Wait until all pods are ready when using
kubectl get pods. - Create a new
adminOAuth2 client for the authorization service using./bin/authorization-cli.sh client create admin demo-password. - Add the
userscope to theadminOAuth2 client using./bin/authorization-cli.sh scope add admin user. - Wait until the cluster is stable by ensuring the horizontal pod autoscalers do not have
<unknown>targets when usingkubectl get hpa.
Four physical or virtual machines with identical hardware specifications are required to run the Kubernetes cluster. Each machine must have a minimum of 2 GB of memory and the following minimum CPU requirements.
- 2 AWS vCPU
- 2 GCP Core
- 2 Azure vCore
- 2 Hyperthread on a bare-metal Intel processor with Hyperthreading
A single physical or virtual test machine is required to run the tests and interface with the Kubernetes cluster. It is recommended that the machine's CPU is at minimum an Intel Core i5-3330 or equivalent.
The test machine must be able to communicate with the four physical machines over a public or private network using HTTP.
The four machines must meet the following software requirements.
- Kubernetes cluster. A Kubernetes cluster running version 1.8.5 must be deployed on the machines. Documentation on setting up a Kubernetes cluster can be found here.
-
Helm. The Helm server must be initialized on the Kubernetes cluster using the
helm initcommand after installing the Helm client andkubectlon the single test machine.
The single test machine must meet the following software requirements.
-
kubectl.
kubectlmust be installed to interface with the Kubernetes cluster. Documentation on setting up kubectl can be found here. Thekubectl configmust be configured to access the deployed Kubernetes cluster. - Helm. The Helm client must be installed. Documentation on setting up the Helm client can be found here.
- Python 3.0.
- Bash.
For executing the tests, Kubernetes Engine on the Google Cloud Platform will be utilized. The node pool will be setup in the us-central1-a zone with autoscaling disabled. Four Compute Engine VM instances with 2 vCPU cores and 4 GB of memory will be utilized. The cluster will be setup to use Kubernetes v1.8.5.
To execute the tests on the Kubernetes cluster, a Mid 2014 13-inch MacBook Pro running macOS Sierra Version 10.12.6 with 16 GB of memory and a 3 GHz Intel Core i7 processor will be utilized. The University of Saskatchewan's wireless network will be used to perform the tests.