Automated smoke testing utilizing Amazon Nova Act headless mode helps growth groups validate core performance in steady integration and steady supply (CI/CD) pipelines. Improvement groups typically deploy code a number of occasions 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 capabilities of an software work accurately after deployment. These checks deal with key workflows like consumer login, core navigation, and key transactions fairly than exhaustive characteristic protection. Smoke checks usually full in minutes fairly than hours, making them preferrred for CI/CD pipelines the place quick suggestions on code adjustments 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 take a look at scripts, you possibly can write checks utilizing easy English instructions that adapt to UI adjustments.
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 software, as our goal for demonstration. We exhibit 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 take a look at execution on each deployment, and apply greatest practices for maintainable and scalable take a look at automation.
Answer overview
The answer features a Python take a look at 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 nicely for automated testing.
The next diagram illustrates the testing workflow.
We stroll by way of the next steps to implement automated smoke testing with Amazon Nova Act:
- Arrange your venture and dependencies.
- Create a smoke take a look at with login validation.
- Configure validation for the whole ecommerce workflow.
- Configure the automated testing pipeline.
- Configure parallel execution.
Stipulations
To finish this walkthrough, you could have the next:
Arrange venture and dependencies
Create your venture and set up dependencies:
Create a take a look at runner
Create smoke_tests.py:
Take a look at your setup with the next instructions:
Setting variables like NOVA_ACT_API_KEY preserve delicate info safe and separate out of your code.
This answer implements the next security measures:
- Shops API keys in surroundings variables or .env information (add
.envto .gitignore) - Makes use of totally different API keys for growth, staging, and manufacturing environments
- Implements key rotation each 90 days utilizing automated scripts or calendar reminders
- Displays API key utilization by way of logs to detect unauthorized entry
You now have a contemporary Python venture with Amazon Nova Act configured and prepared for testing. Subsequent, we present the right way to create a working smoke take a look at that makes use of pure language browser automation.
Create smoke take a look at for login validation
Let’s develop your basis code to incorporate an entire login take a look at with correct construction.
Add principal perform and login take a look at
Replace smoke_tests.py:
Take a look at your login stream
Run your full login take a look at:
It’s best to see the next output:
Your smoke take a look at now validates an entire consumer journey that makes use of pure language with Amazon Nova Act. The take a look at 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 accurately. 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 take a look at gives helpful 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 the whole 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 take a look at
Replace smoke_tests.py to incorporate the complete workflow:
Take a look at your ecommerce workflow
Run your complete take a look at suite:
It’s best to 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
- Procuring cart – Add gadgets 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 the whole buyer journey from authentication by way of 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.
Working these checks manually gives instant worth, however the actual energy comes from integrating them into your growth workflow. Automating take a look at execution makes positive code adjustments are validated towards your vital consumer 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 right way to configure GitLab CI/CD to robotically run these smoke checks on each code change, ensuring key consumer journeys stay purposeful all through your growth cycle. We present the right 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 take a look at capabilities:
Create GitHub Actions workflow
GitLab CI/CD is GitLab’s built-in CI system that robotically runs pipelines when code adjustments 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 venture, 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 adjustments
The important thing change is the headless mode configuration:
This configuration gives flexibility for various growth environments. Throughout native growth when the HEADLESS surroundings variable just isn’t 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 take a look at failures and understanding how Amazon Nova Act interacts along with your software. 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 preferrred for automated testing pipelines that don’t have show capabilities and must 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 venture to see the checks working.
Your smoke checks now run robotically as a part of your CI pipeline, offering instant suggestions on code adjustments. The GitLab CI/CD integration makes positive vital consumer 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 way of GitLab CI/CD variables, your testing infrastructure follows enterprise safety greatest practices.
As your take a look at suite grows, you may discover that working checks 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
Together with your CI/CD pipeline efficiently validating particular person take a look at circumstances, the subsequent optimization focuses on efficiency enhancement by way of parallel execution. Concurrent take a look at execution can cut back your complete testing time by working a number of browser situations concurrently, maximizing the effectivity of your CI/CD assets whereas sustaining take a look at 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 working the smoke checks.
Take a look at parallel execution
Run your optimized checks:
It’s 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 take a look at, lowering complete execution time.
Parallel execution gives advantages reminiscent of sooner execution (as a result of checks run concurrently as a substitute of sequentially), configurable employees 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 checks with out rising complete runtime.
Nonetheless, there are vital issues to bear in mind. Every take a look at opens a browser occasion (which will increase useful resource utilization), checks have to be unbiased of one another to keep up correct isolation, and you could steadiness employee counts with obtainable CPU and reminiscence limits in CI environments.
Every parallel take a look at makes use of system assets and incurs API utilization. Begin with two employees and alter based mostly in your surroundings’s capability and value necessities. Monitor your Amazon Nova Act utilization to optimize the steadiness between take a look at velocity and bills.
The efficiency enchancment is important when evaluating sequential vs. parallel execution. In sequential execution, checks run one after one other with the whole time being the sum of all particular person take a look at durations. With parallel execution, a number of checks run concurrently, finishing in roughly the time of the longest take a look at, leading to substantial time financial savings that turn out to be extra helpful as your take a look at suite grows.
Your smoke checks now characteristic concurrent execution that considerably reduces complete testing time whereas sustaining full take a look at isolation and reliability. The ThreadPoolExecutor implementation permits a number of browser situations to run concurrently, reworking your sequential take a look at suite right into a parallel execution that completes a lot sooner. This efficiency enchancment turns into more and more helpful as your take a look at suite grows, so complete validation doesn’t turn out to be a bottleneck in your deployment pipeline.
The configurable employee depend by way of the MAX_WORKERS surroundings variable gives flexibility to optimize efficiency based mostly on obtainable system assets. In CI/CD environments, this lets you steadiness take a look at execution velocity with useful resource constraints, and native growth can use full system capabilities for sooner suggestions cycles. The structure maintains full take a look at independence, ensuring parallel execution doesn’t introduce flakiness or cross-test dependencies that would compromise reliability. As a greatest follow, preserve checks unbiased—every take a look at ought to work accurately no matter execution order or different checks working concurrently.
Greatest practices
Together with your performance-optimized testing framework full, take into account the next practices for manufacturing readiness:
- Preserve checks unbiased. Exams usually are not impacted by execution order or different checks working concurrently.
- Add retry logic by wrapping your take a look at 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 take into account including a scheduled run for every day validation of your manufacturing surroundings.
- For ongoing upkeep, set up a rotation schedule on your Amazon Nova Act API keys and monitor your take a look at execution occasions to catch efficiency regressions early. As your software grows, you possibly can add new take a look at capabilities to the parallel execution framework with out impacting general runtime, making this answer extremely scalable for future wants.
Clear up
To keep away from incurring future expenses and keep 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 initiatives.
- Clear cached credentials and non permanent information out of your native surroundings.
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 sooner take a look at 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 answer gives quick, dependable take a look at execution that scales along 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 assets:
Strive implementing these smoke checks in your individual purposes and take into account extending the framework with extra take a look at eventualities that match your particular consumer 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 prospects 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 together 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 prospects 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 prospects create safe, scalable, and environment friendly options on AWS. She architects cutting-edge knowledge 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.





