Share
Embed
Cloud Testing
All you need to know about cloud testing.
Agenda:
- What is Cloud?
- Scope of testing
- Role of automation
- Examples
Rusi Dimov
December 08, 2020
Transcript
52 slides
-
Introduction Skillful engineer with background in development, testing, test automation,
DevOps and CloudOps Enganged to deliver value to customers across the globe Lead and mentor engineers and managers to uncover their potential Act as: Sr. Manager, Center of Engineering @ VMware Consultant, lecturer and trainer HireHero -
Agenda I. What is cloud? II. Scope of testing III.
Role of automation IV. Examples -
I. What is cloud? • Describes the use of hardware
and software delivered via network • Cloud is a symbol that represents abstraction -
Types of cloud Hybrid Hybrid Cloud computing allows you to
use combination of both public and private cloud. This helps companies to maximize their efficiency and deliver better performance to clients. In this model companies can use public cloud for transfer of non- confidential data and switch on to private cloud in case of sensitive data transfer or hosting of critical applications. Private A cloud platform in which a secure cloud-based environment with dedicated storage and hardware resources provided to a single organization is called Private Cloud Computing. The Private cloud can be either hosted within the company or outsourced to a trusted and reliable third-party vendor. Public A cloud platform that is based on standard cloud computing model in which service provider offers resources, applications storage to the customers over the internet is called as public cloud computing. The hardware resources in public cloud are shared among similar users and accessible over a public network such as the internet. -
Cloud key advantages • Efficiency/cost reduction • Scalability • Mobility
• Disaster recovery • Control -
In the cloud economy, scale wins Video Conferencing Best cloud
companies build products that set the pace of innovation. -
Cloud is eating software Cloud will become majority of software
market within 5 years -
II. Scope of testing • Agile testing • Cdelivery testing
• DevOps testing -
Verify infrastructure setup, config and state • Network tests •
Package tests Recommended tools: http client, ssh, openssl -
Verify proper deployment and operability • Short suite of functional
tests –Sanity/Smoke test • Small set of automated tests to call REST services or simulate UI (not recommended) Recommended approach: Add this type of suite(s) as part of the DevOps pipeline -
Verify business logic and functions • Suite(s) of functional tests
• Suite(s) of automated tests to simulate functional interactions with the application – Selenium based • Suite(s) of automated REST tests to simulate interactions with the app directly with the Backend or integrations with 3rd parties – Postman, SoapUI, open source or custom frameworks (REST-assured, Jersey, Express, Django) -
Verify non-functional requirements • Performance testing to verify: • Reliability
• Peaks • Scalability • Maintainability • Cost effectiveness • Security testing to verify: • Identity and access control (Authentication) • Permissions management (Authorization) -
III. Role of automation • Automate manual tasks, not just
tests • Repeatable actions = repeatable setup • Maintain and recreate state • Scale with a button or configured rule • Backup, replications and disaster recovery -
Automate across Performance and Scalability testing Functional API and UI
testing Configuration management • Automation of entire IT infrastructure: deployment, provisioning, orchestration and configuration Infrastructure as Code (IaC) • Enables quick and repeatable recreation of certain VM, set of VMs or a whole data center from script -
Leverage to cloud services • Kubernetes cluster as a service
• Automated health check and alert services • Scale up and out • LB and Firewalls service • DBaaS Big Data & Advanced analytics • Replication and DRaaS -
IV. Example 1. CI/CD pipeline in the cloud 2. UI
testing at scale in the cloud 3. Performance testing using JMeter, Docker and AWS -
Example 1: CI/CD pipeline in AWS 1. Pull the source
code from source control. 2. Lint any configuration files. 3. Run unit tests against the AWS Lambda functions in codebase. 4. Deploy the test pipeline. 5. Run end-to-end tests against the test pipeline. 6. Clean up test state machine and test infrastructure. 7. Send approval to approvers. 8. Deploy to Production. -
Example 1: CI/CD pipeline in AWS – enhanced view 1.
Pull the source code from source control. 2. Lint any configuration files. 3. Run unit tests against the AWS Lambda functions in codebase. 4. Deploy the test pipeline. 5. Run end-to-end tests against the test pipeline. 6. Clean up test state machine and test infrastructure. 7. Send approval to approvers. 8. Deploy to Production. -
Example 1: CI/CD pipeline in Azure 1. Azure Board to
manage scope and distribute tasks. 2. Initiate tasks and changes in the codeb 3. Push to repository. 4. Run test plans to verify changes in the code base. 5. Prepare and run pipeline. 6. Deploy and run web applications. 7. Monitor insase. ights from runtime. -
Example 1: CI/CD pipeline in Azure – enhanced view 1.
Azure Board to manage scope and distribute tasks. 2. Initiate tasks and changes in the codeb 3. Push to repository. 4. Run test plans to verify changes in the code base. 5. Prepare and run pipeline. 6. Deploy and run web applications. 7. Monitor insase. ights from runtime. -
Example 2: UI testing at scale with AWS Lambda cont.
Deploying the Test Suite The tests are packaged with the dependencies in a jar, we need to get them into a running Lambda function. We use simple SAM templates to upload the packaged jar into S3, and then deploy it to Lambda with our settings. We use the maximum timeout available to ensure our tests have plenty of time to run. We also use the maximum memory size because this ensures our Lambda function can support Chrome and other resources required to run a UI test. -
Example 2: UI testing at scale with AWS Lambda cont.
Specifying the handler is important because this class executes the desired test. The test handler should be able to receive a test class and method. With this information it will then execute the test and respond with the results. -
Example 2: UI testing at scale with AWS Lambda cont.
Creating a Lambda-Compatible ChromeDriver To configure ChromeDriver, we first need to tell ChromeDriver where to find the Chrome binary. Because we know that ChromeDriver is going to be unzipped into the root task directory, we should point the ChromeDriver configuration at that location. Start with the default DesiredCapabilities for ChromeDriver, and then add the following settings to enable your ChromeDriver to start in Lambda. -
Example 3: Perf testing using JMeter, Docker and AWS •
JMeter • Prepare the tests, data set and execution mode • Docker • Deploy JMeter agent • Keep consistent state and configs • AWS • Manage Docker container via Amazon ECR (Elastic Container Registry) • Run the container via Amazon ECS (Elastic Container Service) • Monitor the container via Amazon CloudWatch -
Example 3: JMeter User-Defined Variables Or CSV Data Set: Test
plan > Add > Config element and select “CSV Data Set Config.” -
Example 3: Docker File 1. Install prerequisites 2. Set variables
3. Install JMeter -
Example 3: Docker File 1. Copy test plan, keystore and
table 2. Expose port 3. Prepare log and result files for new execution -
Example 3: Perf testing using JMeter, Docker and AWS •
Benefits • Configurable • Repeatable • Scalable • Considerations • Monitor connections • Monitor results • Monitor cost -
Wrap up – 5 things to remember In cloud environment:
1. Capabilities expand 2. Scope of testing grows 3. Complexity is increased 4. Need to tackle new technologies 5. Provide opportunities for professional growth -
Useful resources • State of the Cloud 2020 report •
Difference between IaaS, SaaS, Paas, XaaS etc. • Cloud Native Computing Foundation CNCF -
Thank you! Контакти: [email protected] LinkedIn: https://www.linkedin.com/in/rusi-dimov- 332b1724/ Следващо събитие: Test
Analysis – typical mistakes made even by QA Seniors