Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Cloud Testing

Avatar for Rusi Dimov Rusi Dimov
December 08, 2020

Cloud Testing

All you need to know about cloud testing.

Agenda:
- What is Cloud?
- Scope of testing
- Role of automation
- Examples

Avatar for Rusi Dimov

Rusi Dimov

December 08, 2020

Other Decks in Technology

Transcript

  1. 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
  2. Agenda I. What is cloud? II. Scope of testing III.

    Role of automation IV. Examples
  3. I. What is cloud? • Describes the use of hardware

    and software delivered via network • Cloud is a symbol that represents abstraction
  4. 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.
  5. In the cloud economy, scale wins Video Conferencing Best cloud

    companies build products that set the pace of innovation.
  6. Verify infrastructure setup, config and state • Network tests •

    Package tests Recommended tools: http client, ssh, openssl
  7. 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
  8. 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)
  9. 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)
  10. 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
  11. 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
  12. 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
  13. 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
  14. 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.
  15. 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.
  16. 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.
  17. 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.
  18. 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.
  19. 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.
  20. 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.
  21. 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
  22. Example 3: JMeter User-Defined Variables Or CSV Data Set: Test

    plan > Add > Config element and select “CSV Data Set Config.”
  23. Example 3: Docker File 1. Copy test plan, keystore and

    table 2. Expose port 3. Prepare log and result files for new execution
  24. Example 3: Perf testing using JMeter, Docker and AWS •

    Benefits • Configurable • Repeatable • Scalable • Considerations • Monitor connections • Monitor results • Monitor cost
  25. 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
  26. Useful resources • State of the Cloud 2020 report •

    Difference between IaaS, SaaS, Paas, XaaS etc. • Cloud Native Computing Foundation CNCF