AWS for QA Testing
Tags: awsforqatester, awsfortesting, aws, qa
Published: 2023-08-03 01:06:03

Sharing the content of my topic during AWS Community Day Philippines.

## Topics
1. Importance of Cloud for QA Testers
2. AWS Services for Testing

## Importance of Cloud for QA Testers
- Understand how cloud ecosystem works
- Gain knowledge on system design
- AWS Testing tools


![importanceforQA](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qbkleoqkkthba0yddhap.png)

## What are some AWS tools and services for QA testers?
- AWS Device Farm - Mobile/Web testing tool
- Amazon Inspector - Security testing tool
- Automation with AWS Tools


![QAtools](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a1u1dknagozv2hgnfkt5.png)

## AWS Device Farm - Mobile/Web testing tool
Device Farm is an app testing service that you can use to test and interact with your Android, iOS, and web apps on real, physical phones and tablets that are hosted by Amazon Web Services (AWS).

Test on real mobile devices using Automated Testing and Remote Access.


![devicefarm](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m3rx559n5ld9p4xww2av.png)

### Automated Testing
Testing can be automated. You can upload your application, which is an APK or IPA file, as well as any automated testing frameworks or scripts you may already have with you such as Appium, Kellabash, XC test, or others.

But suppose you don't have any kind of automated scripts in place. Device Farm assists you in this situation by running its own quick tests or exploratory tests on your uploaded application.

![authdevicefarm](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2ud62cu115517pcejx0g.png)

### Remote Access
You can also use this specific option known as the remote access if you prefer a more manual method of testing on various devices within AWS.

Remote access provides you with a remote access to devices (phones and tablets) for interactive testing. 

![manualdevicefarm](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2ufu8z3vk1sfo0i84025.png)

### Desktop browsers
AWS Device farm also has support for desktop browser testing. You can upload and run your Selenium tests on multiple desktop browsers hosted on AWS. 
For every browser the test is executed on, Device Farm generates video recordings and Selenium logs to help you quickly identify any issues with your web app.

![desktopbrowser](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6mb5z4cvbxcwmdbwi99s.png)

### Device farm pricing

- Pay for a particular device per minute
- Pay for a particular device for a whole month
- For desktop browsers, you pay for every instance minute you run

## Amazon Inspector - Security testing tool
Amazon Inspector is a vulnerability management service that continuously scans your AWS workloads for software vulnerabilities and unintended network exposure. 

![inspector](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/v1mfp44x7wlfwoizarlv.png)

### Security testing sample on EC2 Instance
**Steps:**
1. Prepare a production EC2 instance on which a network accessibility check is necessary.
2. Open Port 21 and 22 to create a security concern. 
3. Use Amazon Inspector to do an examination and vulnerability check.

 It is generally not advised to leave port 21 open on your production instance or instances because it is Used by FTP to allow file transfers.

![ec2inspector](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mxq975sgb77okepi1maj.png)

This EC2 instance acted as a target instance for assessment and it has found three findings; information, medium, and high. 
It's telling you that there is a network exposure and is reachable through the Internet. In case you want to take any action, then the recommendation is  that you need to go ahead and edit your security group to remove this particular access.

![ec2inspector2](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/05my9ve7fhhwtndyj1fr.png)

Amazon Inspector provides a clear list of security and compliance findings assigned a priority by the severity level. Moreover, these findings can be analyzed directly or as part of comprehensive assessment records available via the API or AWS Inspector console. 

### Importance of Inspector
Amazon Inspector security assessments  allows you to make **security testing** more regular occurrence as part of the development and IT operations.

## Automation with AWS Tools
QA engineers can use AWS services to automate and streamline their testing processes and ensure that their applications are ready for deployment.


![automationtest](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mai43rz2wil40nkg9y1m.png)

Services such as CodeBuild, CodePipeline, and many others can be used to create an automation testing tool.

![awstoolstest](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kopb656ukmo8ys9m6qgi.png) 

### Automation testing samples with AWS

- [Integrating AWS Device Farm with your CI/CD pipeline to run cross-browser Selenium tests](https://aws.amazon.com/blogs/devops/integrating-aws-device-farm-with-ci-cd-pipeline-to-run-cross-browser-selenium-tests/)
- [Automated API testing with Postman Collection using Newman CLI, AWS Codebuild, CodePipeline, & S3](https://dev.to/awscommunity-asean/setting-up-postman-api-testing-using-newman-cli-with-aws-codebuild-and-codepipeline-2oem)
- [Creating an API that runs Selenium via AWS Lambda](https://dev.to/awscommunity-asean/creating-an-api-that-runs-selenium-via-aws-lambda-3ck3)
- [Selenium CI/CD using AWS Codebuild and Codepipeline](https://dev.to/awscommunity-asean/setting-up-selenium-cicd-using-codecommit-codebuild-codepipeline-1coa)
- [Selenium in Docker Container and Pushing Image in Amazon ECR](https://dev.to/awscommunity-asean/setup-selenium-docker-image-in-amazon-ecr-jg9)

## Conclusion
Any software development process must include testing. Quality assurance helps a company create products and services that meet the needs, expectations and requirements of customers. It yields high-quality product offerings that build trust and loyalty with customers.