AWS Lambda is a serverless computing platform that lets users run code without provisioning or managing servers. With Lambda, users can run code for virtually any type of app or backend service—all with zero administration. It takes of requirements to run and scale code with high availability.
$NaN
Per 1 ms
Selenium
Score 8.4 out of 10
N/A
Selenium is open source software for browser automation, primarily used for functional, load, or performance testing of applications.
Scenarios where AWS Lambda is well suited: 1. When we need to run a periodic task few times in a day or every hour, we may deploy it on AWS Lambda so it would not increase load on our server which is handling client requests and at the same time we don't have to pay for AWS Lambda when it is not running. So, overall we only pay for few function invocations. 2. When some compute intensive processing is to be done but the number of requests per unit of time fluctuates. For example, we had deployed an AWS Lambda for processing images into different sizes and storing them on AWS S3 once user uploads them. Now, this is something that may happen few times every hour on a particular day or may not happen even once on other days. To handle this kind of tasks AWS Lambda is a better choice as we don't have to pay for the idle time of the server and also we don't have to worry about scaling when the load is high. Scenarios where AWS Lambda is not appropriate to use: 1. When we expect a large request volume continuously on the server. 2. When we don't want latency even in case of concurrent requests.
When you have to test the UI and how it behaves when certain actions are performed, you need something that can automate the browsers. This is where Selenium comes to the rescue. If you have to test APIs and not the frontend (UI), I would recommend going with other libraries that support HTTP Requests. Selenium is good only when you have no choice but to run the steps on a browser.
Lambda provides multiple methods for triggering functions, this includes AWS resources and services and external triggers like APIs and CLI calls.
The compute provided my Lambda is largely hands off for operations teams. Once the function is deployed, the management overhead is minimal since there are no servers to maintain.
Lambda's pricing can be very cost effective given that users are only charged for the time the function runs and associated costs like network or storage if those are used. A function that executes quickly and is not called often can cost next to nothing.
Putting a significant portion of your codebase into AWS Lambda and taking advantage of the high level of integration with other AWS services comes with the risk of vendor lock-in.
While the AWS Lambda environment is "not your problem," it's also not at your disposal to extend or modify, nor does it preserve state between function executions.
AWS Lambda functions are subject to strict time limitations, and will be aborted if they exceed five minutes of execution time. This can be a problem for some longer-running tasks that are otherwise well-suited to serverless delivery.
Selenium is pretty user-friendly but sometimes tests tend to flake out. I'd say roughly one out of twenty tests yields a false positive.
Selenium software cannot read images. This is a minor negative because a free plug-in is available from alternate sources.
Slowness may be a minor factor with Selenium, though this is an issue with basically any testing software since waiting on a site to execute JavaScript requires the browser to wait for a particular action.
We love this product mainly because of its high customization abilities and the ease of use. Moreover, its free and can be learned easily through online communities and videos. The tests are more consistent and reliable as compared to Manual tests. It has enabled us to test a large number of features all in one go, which would have impossible through manual tests. The reports generated at the end of the tests are really helpful for the QA and the development teams to get a fair view of the application.
I give it a seven is usability because it's AWS. Their UI's are always clunkier than the competition and their documentation is rather cumbersome. There's SO MUCH to dig through and it's a gamble if you actually end up finding the corresponding info if it will actually help. Like I said before, going to google with a specific problem is likely a better route because AWS is quite ubiquitous and chances are you're not the first to encounter the problem. That being said, using SAM (Serverless application model) and it's SAM Local environment makes running local instances of your Lambdas in dev environments painless and quite fun. Using Nodejs + Lambda + SAM Local + VS Code debugger = AWESOME.
As I mentioned earlier, the reason I use Selenium is because there is a fairly widespread community of users, and user support services are at a good level. because the application is open source, it works on many platforms (Windows, Linux, IOS) without any problems. In addition, it gives us a lot of options for writing functional tests. For errors that we receive through the application, we can easily find the reasons for errors in the forums.
I have not needed support for AWS Lambda, since it is already using Python, which has resources all over the internet. AWS blog posts have information about how to install some libraries, which is necessary for some more complex operations, but this is available online and didn't require specific customer support for.
Selenium does not have technical support available easily. You have to go through forums to get the information you need. However, there are excellent forums out there that make it easy to troubleshoot. The open-source flexibility makes it difficult to have dedicated support.
We did everything we needed to use it. Now we can execute our tests on different operational systems and browsers running few tests simultaneously. We also implemented Appium framework to execute our tests on mobile devices, such as iPhones, iPads, Android phones and tablets. We use SauceLabs for our test execution and Jenkins for continuous integration.
Azure Functions is another product that provides lambda functionality, but the documentation for some of Azure's products is quite hard to read. Additionally, AWS Lambda was one of the first cloud computing products on a large cloud service that implemented lambda functions, so they have had the most time to develop the product, increase the quality of service, and extend functionality to more languages. Amazon, by far, has the best service for Lambda that I know.
At the time of adoption, there were not many other alternatives that were even close to being competitive when it comes to browser testing. As far as I know now to this day, there is still little competition to Selenium for what it does. Any other browser-based testing still utilises Selenium to interact with the browser.
I was able to perform a lot of processing on data delivered from my website and little or no cost. This was a big plus to me.
Programming AWS Lambda is quite easy once you understand the time limits to the functions.
AWS Lambda has really good integration with the AWS S3 storage system. This a very good method of delivering data to be processed and a good place to pick it up after processing.