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 occasions every 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 essentially the most vital capabilities of an utility work appropriately after deployment. These checks deal with key workflows like consumer login, core navigation, and key transactions reasonably than exhaustive characteristic protection. Smoke checks usually full in minutes reasonably than hours, making them very best for CI/CD pipelines the place quick suggestions on code modifications is important.
Amazon Nova Act makes use of AI-powered UI understanding and pure language processing to work together with internet purposes, changing conventional CSS selectors. As an alternative of sustaining brittle CSS selectors and sophisticated check scripts, you’ll be able to write checks utilizing easy English instructions that adapt to UI modifications.
This publish reveals the right way 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 reveal organising Amazon Nova Act for headless browser automation in CI/CD environments and creating smoke checks that validate key consumer workflows. We then present the right way to implement parallel execution to maximise testing effectivity, configure GitLab CI/CD for automated 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 checks, ecommerce workflow validation for full consumer journeys, GitLab CI/CD integration for automation, and parallel execution to hurry up testing. Headless mode runs browser checks 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 means of the next steps to implement automated smoke testing with Amazon Nova Act:
- Arrange your mission and dependencies.
- Create a smoke check with login validation.
- Configure validation for your entire ecommerce workflow.
- Configure the automated testing pipeline.
- Configure parallel execution.
Conditions
To finish this walkthrough, you have to have the next:
Arrange mission and dependencies
Create your mission and set up dependencies:
Create a check runner
Create smoke_tests.py:
Take a look at your setup with the next instructions:
Setting variables like NOVA_ACT_API_KEY hold delicate info safe and separate out of your code.
This resolution implements the next safety features:
- Shops API keys in atmosphere 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 means of logs to detect unauthorized entry
You now have a contemporary Python mission with Amazon Nova Act configured and prepared for testing. Subsequent, we present the right way to create a working smoke check that makes use of pure language browser automation.
Create smoke check for login validation
Let’s develop your basis code to incorporate a whole login check with correct construction.
Add essential perform and login check
Replace smoke_tests.py:
Take a look at your login circulate
Run your full login check:
It is best to see the next output:
Your smoke check now validates a whole consumer 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 consumer title and password credentials, motion execution that clicks the login button, and success validation that verifies the merchandise web page masses appropriately. The built-in error dealing with gives retry logic if the login course of encounters any points, exhibiting how the AI-powered automation of Amazon Nova Act adapts to dynamic internet purposes with out the brittleness of conventional CSS selector-based testing frameworks.
Though a login check gives useful validation, real-world purposes require testing full consumer workflows that span a number of pages and sophisticated interactions. Subsequent, we develop the testing capabilities by constructing a complete ecommerce journey that validates your entire buyer expertise.
Configure ecommerce workflow validation
Let’s construct a complete ecommerce workflow that checks 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:
It is best to see the next output:
Understanding the ecommerce journey
The workflow checks a whole buyer expertise:
- Authentication – Login with legitimate credentials
- Product discovery – Browse and choose merchandise
- Procuring cart – Add objects and confirm cart contents
- Checkout course of – Enter delivery info
- 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 consumer journey.
Your smoke checks now validate full consumer journeys that mirror actual buyer experiences. The ecommerce workflow reveals how Amazon Nova Act handles complicated, multi-step processes throughout a number of pages. By testing your entire buyer journey from authentication by means of order completion, you’re validating the first revenue-generating workflows in your utility.
This method reduces upkeep overhead whereas offering complete protection of your utility’s core performance.
Operating these checks manually gives quick worth, however the actual energy comes from integrating them into your improvement workflow. Automating check execution makes certain code modifications are validated in opposition to your vital consumer journeys earlier than reaching manufacturing.
Configure automated testing pipeline
Along with your complete ecommerce workflow in place, you’re able to combine these checks into your CI pipeline. This step reveals the right way to configure GitLab CI/CD to routinely run these smoke checks on each code change, ensuring key consumer journeys stay useful all through your improvement cycle. We present the right way 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 help headless mode for CI environments by including the next strains to each check capabilities:
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 checks and what steps to execute.
Create .gitlab-ci.yml:
Configure GitLab CI/CD variables
GitLab CI/CD variables present safe storage for delicate info 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 mission, 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 gives flexibility for various improvement environments. Throughout native improvement when the HEADLESS atmosphere variable is just not set, the headless parameter defaults to False, which opens a browser window so you’ll be able to 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 about to true, the browser runs within the background with out opening any home windows, making it very best 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:
Test the Pipelines part in your GitLab mission to see the checks working.
Your smoke checks now run routinely as a part of your CI pipeline, offering quick suggestions on code modifications. The GitLab CI/CD integration makes certain vital consumer journeys are validated earlier than any deployment reaches manufacturing, lowering the chance of delivery damaged performance to clients.
The implementation reveals how fashionable package deal administration with UV reduces CI/CD pipeline execution time in comparison with conventional pip installations. Mixed with safe API key administration by means of GitLab CI/CD variables, your testing infrastructure follows enterprise safety finest practices.
As your check suite grows, you may discover that working checks sequentially can change into a bottleneck in your deployment pipeline. The subsequent 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 means of parallel execution. Concurrent check execution can scale back your whole testing time by working a number of browser cases concurrently, maximizing the effectivity of your CI/CD assets whereas sustaining check reliability and isolation.
Add parallel execution framework
Replace smoke_tests.py to help 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 working the smoke checks.
Take a look at parallel execution
Run your optimized checks:
It is best to see each checks working 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, lowering whole execution time.
Parallel execution gives advantages comparable to quicker execution (as a result of checks run concurrently as an alternative of sequentially), configurable employees that modify primarily based on system assets, useful resource effectivity that optimizes CI/CD compute time, and scalability that makes it easy so as to add extra checks with out rising whole runtime.
Nonetheless, there are vital issues to bear in mind. Every check opens a browser occasion (which will increase useful resource utilization), checks should be unbiased of one another to take care of correct isolation, and you have to steadiness employee counts with obtainable CPU and reminiscence limits in CI environments.
Every parallel check makes use of system assets and incurs API utilization. Begin with two employees and modify primarily based in your atmosphere’s capability and price necessities. Monitor your Amazon Nova Act utilization to optimize the steadiness between check pace and bills.
The efficiency enchancment is important when evaluating sequential vs. parallel execution. In sequential execution, checks run one after one other with the full time being the sum of all particular person check durations. With parallel execution, a number of checks run concurrently, finishing in roughly the time of the longest check, leading to substantial time financial savings that change into extra useful as your check suite grows.
Your smoke checks now characteristic concurrent execution that considerably reduces whole testing time whereas sustaining full check isolation and reliability. The ThreadPoolExecutor implementation permits a number of browser cases to run concurrently, reworking your sequential check suite right into a parallel execution that completes a lot quicker. This efficiency enchancment turns into more and more useful as your check suite grows, so complete validation doesn’t change into a bottleneck in your deployment pipeline.
The configurable employee rely by means of the MAX_WORKERS atmosphere variable gives flexibility to optimize efficiency primarily based on obtainable system assets. In CI/CD environments, this lets you steadiness check execution pace with useful resource constraints, and native improvement can use full system capabilities for quicker suggestions cycles. The structure maintains full check independence, ensuring parallel execution doesn’t introduce flakiness or cross-test dependencies that would compromise reliability. As a finest follow, hold checks unbiased—every check ought to work appropriately no matter execution order or different checks working concurrently.
Finest practices
Along with your performance-optimized testing framework full, think about the next practices for manufacturing readiness:
- Maintain checks unbiased. Assessments are usually not impacted by execution order or different checks working concurrently.
- Add retry logic by wrapping your check capabilities in try-catch blocks with a retry mechanism for dealing with transient community points.
- Configure your GitLab CI/CD pipeline with an inexpensive timeout and think about including a scheduled run for every day validation of your manufacturing atmosphere.
- For ongoing upkeep, set up a rotation schedule in your Amazon Nova Act API keys and monitor your check execution occasions to catch efficiency regressions early. As your utility grows, you’ll be able to add new check capabilities to the parallel execution framework with out impacting general runtime, making this resolution extremely scalable for future wants.
Clear up
To keep away from incurring future costs 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 publish.
- Take away API keys from inactive tasks.
- Clear cached credentials and momentary information out of your native atmosphere.
Conclusion
On this publish, we confirmed the right way to implement automated smoke testing utilizing Amazon Nova Act headless mode for CI/CD pipelines. We demonstrated the right way to create complete ecommerce workflow checks that validate consumer journeys, implement parallel execution for quicker check completion, and combine automated testing with GitLab CI/CD for steady validation.
The pure language method utilizing Amazon Nova Act wants much less upkeep than conventional frameworks that use CSS selectors. Mixed with fashionable tooling like UV package deal administration and GitLab CI/CD, this resolution gives 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 study extra about browser automation and testing methods on AWS, discover the next assets:
Attempt implementing these smoke checks in your personal purposes and think about extending the framework with extra check eventualities that match your particular consumer journeys. Share your expertise and any optimizations you uncover within the feedback part.
In regards to 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 in depth background in safety, cost-optimization, and analytics choices. Shyam works with enterprise clients to assist them construct and scale purposes to attain their enterprise outcomes with decrease value.
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 knowledge platforms and AI-powered purposes that remodel how monetary establishments leverage cloud applied sciences. Past her technical pursuits, Reena can be a author and enjoys spending time together with her household.


