Automated smoke testing utilizing Amazon Nova Act headless mode helps growth groups validate core performance in steady integration and steady supply (CI/CD) pipelines. Growth groups usually deploy code a number of instances every day, so quick testing helps keep software 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 vital features of an software work accurately after deployment. These checks give attention to key workflows like person login, core navigation, and key transactions somewhat than exhaustive characteristic protection. Smoke checks usually full in minutes somewhat 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 net functions, changing conventional CSS selectors. As an alternative of sustaining brittle CSS selectors and complicated check scripts, you’ll be able to write checks utilizing easy English instructions that adapt to UI modifications.
This publish reveals the best way to implement automated smoke testing utilizing Amazon Nova Act headless mode in CI/CD pipelines. We use SauceDemo, a pattern ecommerce software, as our goal for demonstration. We exhibit establishing Amazon Nova Act for headless browser automation in CI/CD environments and creating smoke checks that validate key person workflows. We then present the best way to implement parallel execution to maximise testing effectivity, configure GitLab CI/CD for automated check execution on each deployment, and apply greatest practices for maintainable and scalable check automation.
Resolution overview
The answer features a Python check runner that executes smoke checks, ecommerce workflow validation for full person 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 nicely 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 your complete ecommerce workflow.
- Configure the automated testing pipeline.
- Configure parallel execution.
Stipulations
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:
Check your setup with the next instructions:
Atmosphere variables like NOVA_ACT_API_KEY hold delicate info safe and separate out of your code.
This resolution implements the next security measures:
- Shops API keys in atmosphere variables or .env recordsdata (add
.envto .gitignore) - Makes use of completely different API keys for growth, staging, and manufacturing environments
- Implements key rotation each 90 days utilizing automated scripts or calendar reminders
- Screens 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 the best way to create a working smoke check that makes use of pure language browser automation.
Create smoke check for login validation
Let’s broaden your basis code to incorporate an entire login check with correct construction.
Add important operate and login check
Replace smoke_tests.py:
Check your login stream
Run your full login check:
You must 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, type interactions that enter person title and password credentials, motion execution that clicks the login button, and success validation that verifies the merchandise web page masses accurately. 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 functions with out the brittleness of conventional CSS selector-based testing frameworks.
Though a login check offers invaluable validation, real-world functions require testing full person workflows that span a number of pages and complicated interactions. Subsequent, we broaden the testing capabilities by constructing a complete ecommerce journey that validates your complete 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:
Check your ecommerce workflow
Run your complete check suite:
You must see the next output:
Understanding the ecommerce journey
The workflow checks an entire buyer expertise:
- Authentication – Login with legitimate credentials
- Product discovery – Browse and choose merchandise
- Purchasing 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 person journey.
Your smoke checks now validate full person 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 complete buyer journey from authentication by order completion, you’re validating the first revenue-generating workflows in your software.
This method reduces upkeep overhead whereas offering complete protection of your software’s core performance.
Operating these checks manually offers quick worth, however the true energy comes from integrating them into your growth workflow. Automating check execution makes certain code modifications are validated in opposition to your vital person journeys earlier than reaching manufacturing.
Configure automated testing pipeline
Together with your complete ecommerce workflow in place, you’re able to combine these checks into your CI pipeline. This step reveals the best way to configure GitLab CI/CD to robotically run these smoke checks on each code change, ensuring key person journeys stay useful all through your growth cycle. We present the best way to configure headless mode for CI environments whereas sustaining the visible debugging capabilities for native growth.
Add headless mode for CI/CD
Replace smoke_tests.py to assist headless mode for CI environments by including the next strains to each check features:
Create GitHub Actions workflow
GitLab CI/CD is GitLab’s built-in CI system that robotically runs pipelines when code modifications happen. Pipelines are outlined in YAML recordsdata 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 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 growth environments. Throughout native growth 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 software. 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 must run effectively with out visible overhead.
Check your CI/CD setup
Push your code to set off the workflow:
Examine the Pipelines part in your GitLab undertaking to see the checks operating.
Your smoke checks now run robotically as a part of your CI pipeline, offering quick suggestions on code modifications. The GitLab CI/CD integration makes certain vital person journeys are validated earlier than any deployment reaches manufacturing, lowering the danger of delivery damaged performance to prospects.
The implementation reveals how fashionable bundle 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 greatest practices.
As your check suite grows, you would possibly discover that operating checks sequentially can develop into 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
Together with your CI/CD pipeline efficiently validating particular person check circumstances, the subsequent optimization focuses on efficiency enhancement by parallel execution. Concurrent check execution can cut back your complete testing time by operating a number of browser cases concurrently, maximizing the effectivity of your CI/CD sources 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 robotically makes use of the parallel framework when operating the smoke checks.
Check parallel execution
Run your optimized checks:
You must see each checks 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, lowering complete execution time.
Parallel execution offers advantages akin to quicker execution (as a result of checks run concurrently as a substitute of sequentially), configurable employees that regulate based mostly on system sources, useful resource effectivity that optimizes CI/CD compute time, and scalability that makes it simple so as to add extra checks with out growing complete runtime.
Nonetheless, there are essential concerns to bear in mind. Every check opens a browser occasion (which will increase useful resource utilization), checks should be impartial of one another to take care of correct isolation, and you need to steadiness employee counts with accessible CPU and reminiscence limits in CI environments.
Every parallel check makes use of system sources and incurs API utilization. Begin with two employees and regulate based mostly in your atmosphere’s capability and value necessities. Monitor your Amazon Nova Act utilization to optimize the steadiness between check pace and bills.
The efficiency enchancment is critical when evaluating sequential vs. parallel execution. In sequential execution, checks run one after one other with the overall 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 develop into extra invaluable as your check suite grows.
Your smoke checks 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 cases to run concurrently, remodeling your sequential check suite right into a parallel execution that completes a lot quicker. This efficiency enchancment turns into more and more invaluable as your check suite grows, so complete validation doesn’t develop into a bottleneck in your deployment pipeline.
The configurable employee rely by the MAX_WORKERS atmosphere variable offers flexibility to optimize efficiency based mostly on accessible system sources. In CI/CD environments, this lets you steadiness check execution pace with useful resource constraints, and native growth 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 might compromise reliability. As a greatest observe, hold checks impartial—every check ought to work accurately no matter execution order or different checks operating concurrently.
Greatest practices
Together with your performance-optimized testing framework full, take into account the next practices for manufacturing readiness:
- Preserve checks impartial. Assessments will not be impacted by execution order or different checks 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 inexpensive timeout and take into account 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 instances to catch efficiency regressions early. As your software grows, you’ll be able to add new check features to the parallel execution framework with out impacting total runtime, making this resolution extremely scalable for future wants.
Clear up
To keep away from incurring future prices and keep safety, clear up the sources 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 initiatives.
- Clear cached credentials and short-term recordsdata out of your native atmosphere.
Conclusion
On this publish, we confirmed the best way to implement automated smoke testing utilizing Amazon Nova Act headless mode for CI/CD pipelines. We demonstrated the best way to create complete ecommerce workflow checks that validate person 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 bundle administration and GitLab CI/CD, this resolution offers quick, dependable check execution that scales together with your growth workflow. Your implementation now catches points earlier than they attain manufacturing, offering the quick suggestions important for assured steady deployment whereas sustaining excessive software high quality requirements.
To be taught extra about browser automation and testing methods on AWS, discover the next sources:
Attempt implementing these smoke checks in your individual functions and take into account extending the framework with further check eventualities 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/providers prospects construct scalable, progressive options on AWS. He architects clever automation frameworks and GenAI-powered functions that drive measurable enterprise outcomes throughout numerous industries. Past his technical pursuits, Sakthivel enjoys spending high quality time together with his household and taking part in cricket.
Shyam Soundar is a Options Architect at AWS with an intensive background in safety, cost-optimization, and analytics choices. Shyam works with enterprise prospects to assist them construct and scale functions to realize 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 prospects create safe, scalable, and environment friendly options on AWS. She architects cutting-edge knowledge platforms and AI-powered functions that rework how monetary establishments leverage cloud applied sciences. Past her technical pursuits, Reena can be a author and enjoys spending time together with her household.







