Automated smoke testing utilizing Amazon Nova Act headless mode helps improvement groups validate core performance in steady integration and steady supply (CI/CD) pipelines. Growth groups usually deploy code a number of instances day by day, so quick testing helps preserve utility high quality. Conventional end-to-end testing can take hours to finish, creating delays in your CI/CD pipeline.
Smoke testing is a subset of testing that validates probably the most essential features of an utility work appropriately after deployment. These exams give attention to key workflows like person login, core navigation, and key transactions relatively than exhaustive characteristic protection. Smoke exams sometimes full in minutes relatively than hours, making them splendid for CI/CD pipelines the place quick suggestions on code modifications is crucial.
Amazon Nova Act makes use of AI-powered UI understanding and pure language processing to work together with net purposes, changing conventional CSS selectors. As an alternative of sustaining brittle CSS selectors and complicated check scripts, you possibly can write exams utilizing easy English instructions that adapt to UI modifications.
This put up reveals learn how to implement automated smoke testing utilizing Amazon Nova Act headless mode in CI/CD pipelines. We use SauceDemo, a pattern ecommerce utility, as our goal for demonstration. We show establishing Amazon Nova Act for headless browser automation in CI/CD environments and creating smoke exams that validate key person workflows. We then present learn how to implement parallel execution to maximise testing effectivity, configure GitLab CI/CD for computerized check execution on each deployment, and apply finest practices for maintainable and scalable check automation.
Answer overview
The answer features a Python check runner that executes smoke exams, ecommerce workflow validation for full person journeys, GitLab CI/CD integration for automation, and parallel execution to hurry up testing. Headless mode runs browser exams within the background with out opening a browser window, which works effectively for automated testing.
The next diagram illustrates the testing workflow.
We stroll by the next steps to implement automated smoke testing with Amazon Nova Act:
- Arrange your undertaking and dependencies.
- Create a smoke check with login validation.
- Configure validation for all the ecommerce workflow.
- Configure the automated testing pipeline.
- Configure parallel execution.
Conditions
To finish this walkthrough, you need to have the next:
Arrange undertaking and dependencies
Create your undertaking and set up dependencies:
Create a check runner
Create smoke_tests.py:
Take a look at your setup with the next instructions:
Surroundings variables like NOVA_ACT_API_KEY hold delicate data safe and separate out of your code.
This answer implements the next security measures:
- Shops API keys in setting variables or .env information (add
.envto .gitignore) - Makes use of totally different API keys for improvement, staging, and manufacturing environments
- Implements key rotation each 90 days utilizing automated scripts or calendar reminders
- Displays API key utilization by logs to detect unauthorized entry
You now have a contemporary Python undertaking with Amazon Nova Act configured and prepared for testing. Subsequent, we present learn how to create a working smoke check that makes use of pure language browser automation.
Create smoke check for login validation
Let’s increase your basis code to incorporate an entire login check with correct construction.
Add essential perform and login check
Replace smoke_tests.py:
Take a look at your login move
Run your full login check:
You need to see the next output:
Your smoke check now validates an entire person journey that makes use of pure language with Amazon Nova Act. The check handles web page verification to substantiate you’re on the login web page, kind interactions that enter person identify and password credentials, motion execution that clicks the login button, and success validation that verifies the merchandise web page hundreds appropriately. The built-in error dealing with offers retry logic if the login course of encounters any points, exhibiting how the AI-powered automation of Amazon Nova Act adapts to dynamic net purposes with out the brittleness of conventional CSS selector-based testing frameworks.
Though a login check offers invaluable validation, real-world purposes require testing full person workflows that span a number of pages and complicated interactions. Subsequent, we increase the testing capabilities by constructing a complete ecommerce journey that validates all the buyer expertise.
Configure ecommerce workflow validation
Let’s construct a complete ecommerce workflow that exams the end-to-end buyer journey from login to logout.
Add full ecommerce check
Replace smoke_tests.py to incorporate the total workflow:
Take a look at your ecommerce workflow
Run your complete check suite:
You need to see the next output:
Understanding the ecommerce journey
The workflow exams an entire buyer expertise:
- Authentication – Login with legitimate credentials
- Product discovery – Browse and choose merchandise
- Procuring cart – Add gadgets and confirm cart contents
- Checkout course of – Enter transport data
- Order completion – Full buy and confirm success
- Navigation – Return to merchandise and sign off
The next screenshot reveals the step-by-step visible information of the person journey.
Your smoke exams now validate full person journeys that mirror actual buyer experiences. The ecommerce workflow reveals how Amazon Nova Act handles advanced, multi-step processes throughout a number of pages. By testing all the buyer journey from authentication by order completion, you’re validating the first revenue-generating workflows in your utility.
This strategy reduces upkeep overhead whereas offering complete protection of your utility’s core performance.
Working these exams manually offers instant worth, however the true energy comes from integrating them into your improvement workflow. Automating check execution makes certain code modifications are validated towards your essential person journeys earlier than reaching manufacturing.
Configure automated testing pipeline
Along with your complete ecommerce workflow in place, you’re able to combine these exams into your CI pipeline. This step reveals learn how to configure GitLab CI/CD to routinely run these smoke exams on each code change, ensuring key person journeys stay useful all through your improvement cycle. We present learn how to configure headless mode for CI environments whereas sustaining the visible debugging capabilities for native improvement.
Add headless mode for CI/CD
Replace smoke_tests.py to assist headless mode for CI environments by including the next traces to each check features:
Create GitHub Actions workflow
GitLab CI/CD is GitLab’s built-in CI system that routinely runs pipelines when code modifications happen. Pipelines are outlined in YAML information that specify when to run exams and what steps to execute.
Create .gitlab-ci.yml:
Configure GitLab CI/CD variables
GitLab CI/CD variables present safe storage for delicate data like API keys. These values are encrypted and solely accessible to your GitLab CI/CD pipelines. Full the next steps so as to add a variable:
- In your undertaking, select Settings, CI/CD, and Variables.
- Select Add variable.
- For the important thing, enter
NOVA_ACT_API_KEY. - For the worth, enter your Amazon Nova Act API key.
- Choose Masks variable to cover the worth in job logs.
- Select Add variable.
Understanding the code modifications
The important thing change is the headless mode configuration:
This configuration offers flexibility for various improvement environments. Throughout native improvement when the HEADLESS setting variable will not be set, the headless parameter defaults to False, which opens a browser window so you possibly can see the automation in motion. This visible suggestions is invaluable for debugging check failures and understanding how Amazon Nova Act interacts together with your utility. In CI/CD environments the place HEADLESS is ready to true, the browser runs within the background with out opening any home windows, making it splendid for automated testing pipelines that don’t have show capabilities and have to run effectively with out visible overhead.
Take a look at your CI/CD setup
Push your code to set off the workflow:
Verify the Pipelines part in your GitLab undertaking to see the exams operating.
Your smoke exams now run routinely as a part of your CI pipeline, offering instant suggestions on code modifications. The GitLab CI/CD integration makes certain essential person journeys are validated earlier than any deployment reaches manufacturing, decreasing the danger of transport damaged performance to clients.
The implementation reveals how trendy package deal administration with UV reduces CI/CD pipeline execution time in comparison with conventional pip installations. Mixed with safe API key administration by GitLab CI/CD variables, your testing infrastructure follows enterprise safety finest practices.
As your check suite grows, you may discover that operating exams sequentially can turn out to be a bottleneck in your deployment pipeline. The following part addresses this problem by implementing parallel execution to maximise your CI/CD effectivity.
Configure parallel execution
Along with your CI/CD pipeline efficiently validating particular person check instances, the following optimization focuses on efficiency enhancement by parallel execution. Concurrent check execution can cut back your complete testing time by operating a number of browser situations concurrently, maximizing the effectivity of your CI/CD assets whereas sustaining check reliability and isolation.
Add parallel execution framework
Replace smoke_tests.py to assist concurrent testing:
Replace GitLab CI/CD for parallel execution
The parallel execution is already configured in your .gitlab-ci.yml with the MAX_WORKERS= "2" variable. The pipeline routinely makes use of the parallel framework when operating the smoke exams.
Take a look at parallel execution
Run your optimized exams:
You need to see each exams operating concurrently:
Understanding parallel execution
ThreadPoolExecutor is a Python class that manages a pool of employee threads, permitting a number of duties to run concurrently. On this case, every thread runs a separate browser check, decreasing complete execution time.
Parallel execution offers advantages resembling sooner execution (as a result of exams run concurrently as a substitute of sequentially), configurable staff that alter based mostly on system assets, useful resource effectivity that optimizes CI/CD compute time, and scalability that makes it simple so as to add extra exams with out growing complete runtime.
Nevertheless, there are vital issues to bear in mind. Every check opens a browser occasion (which will increase useful resource utilization), exams have to be unbiased of one another to keep up correct isolation, and you need to steadiness employee counts with out there CPU and reminiscence limits in CI environments.
Every parallel check makes use of system assets and incurs API utilization. Begin with two staff and alter based mostly in your setting’s capability and value necessities. Monitor your Amazon Nova Act utilization to optimize the steadiness between check velocity and bills.
The efficiency enchancment is important when evaluating sequential vs. parallel execution. In sequential execution, exams run one after one other with the overall time being the sum of all particular person check durations. With parallel execution, a number of exams run concurrently, finishing in roughly the time of the longest check, leading to substantial time financial savings that turn out to be extra invaluable as your check suite grows.
Your smoke exams now characteristic concurrent execution that considerably reduces complete testing time whereas sustaining full check isolation and reliability. The ThreadPoolExecutor implementation permits a number of browser situations to run concurrently, reworking your sequential check suite right into a parallel execution that completes a lot sooner. This efficiency enchancment turns into more and more invaluable as your check suite grows, so complete validation doesn’t turn out to be a bottleneck in your deployment pipeline.
The configurable employee depend by the MAX_WORKERS setting variable offers flexibility to optimize efficiency based mostly on out there system assets. In CI/CD environments, this lets you steadiness check execution velocity with useful resource constraints, and native improvement can use full system capabilities for sooner suggestions cycles. The structure maintains full check independence, ensuring parallel execution doesn’t introduce flakiness or cross-test dependencies that might compromise reliability. As a finest observe, hold exams unbiased—every check ought to work appropriately no matter execution order or different exams operating concurrently.
Finest practices
Along with your performance-optimized testing framework full, think about the next practices for manufacturing readiness:
- Preserve exams unbiased. Assessments usually are not impacted by execution order or different exams operating concurrently.
- Add retry logic by wrapping your check features in try-catch blocks with a retry mechanism for dealing with transient community points.
- Configure your GitLab CI/CD pipeline with an affordable timeout and think about including a scheduled run for day by day validation of your manufacturing setting.
- For ongoing upkeep, set up a rotation schedule on your Amazon Nova Act API keys and monitor your check execution instances to catch efficiency regressions early. As your utility grows, you possibly can add new check features to the parallel execution framework with out impacting total runtime, making this answer extremely scalable for future wants.
Clear up
To keep away from incurring future prices and preserve safety, clear up the assets you created:
- Take away or disable unused GitLab CI/CD pipelines
- Rotate API keys each 90 days and revoke unused keys.
- Delete the repositories supplied with this put up.
- Take away API keys from inactive tasks.
- Clear cached credentials and non permanent information out of your native setting.
Conclusion
On this put up, we confirmed learn how to implement automated smoke testing utilizing Amazon Nova Act headless mode for CI/CD pipelines. We demonstrated learn how to create complete ecommerce workflow exams that validate person journeys, implement parallel execution for sooner check completion, and combine automated testing with GitLab CI/CD for steady validation.
The pure language strategy utilizing Amazon Nova Act wants much less upkeep than conventional frameworks that use CSS selectors. Mixed with trendy tooling like UV package deal administration and GitLab CI/CD, this answer offers quick, dependable check execution that scales together with your improvement workflow. Your implementation now catches points earlier than they attain manufacturing, offering the quick suggestions important for assured steady deployment whereas sustaining excessive utility high quality requirements.
To be taught extra about browser automation and testing methods on AWS, discover the next assets:
Strive implementing these smoke exams in your personal purposes and think about extending the framework with further check situations that match your particular person journeys. Share your expertise and any optimizations you uncover within the feedback part.
Concerning the authors
Sakthi Chellapparimanam Sakthivel is a Options Architect at AWS, specializing in .NET modernization and enterprise cloud transformations. He helps GSI and software program/companies clients construct scalable, revolutionary options on AWS. He architects clever automation frameworks and GenAI-powered purposes that drive measurable enterprise outcomes throughout various industries. Past his technical pursuits, Sakthivel enjoys spending high quality time along with his household and enjoying cricket.
Shyam Soundar is a Options Architect at AWS with an intensive background in safety, cost-optimization, and analytics choices. Shyam works with enterprise clients to assist them construct and scale purposes to realize their enterprise outcomes with decrease price.
Reena M is an FSI Options Architect at AWS, specializing in analytics and generative AI-based workloads, serving to capital markets and banking clients create safe, scalable, and environment friendly options on AWS. She architects cutting-edge information platforms and AI-powered purposes that rework how monetary establishments leverage cloud applied sciences. Past her technical pursuits, Reena can also be a author and enjoys spending time together with her household.



