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 typically deploy code a number of occasions each 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 crucial features of an software work appropriately after deployment. These assessments concentrate on key workflows like person login, core navigation, and key transactions fairly than exhaustive function protection. Smoke assessments sometimes full in minutes fairly than hours, making them ideally suited 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 a substitute of sustaining brittle CSS selectors and complicated take a look at scripts, you may write assessments utilizing easy English instructions that adapt to UI modifications.
This submit reveals methods 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 reveal establishing Amazon Nova Act for headless browser automation in CI/CD environments and creating smoke assessments that validate key person workflows. We then present methods to implement parallel execution to maximise testing effectivity, configure GitLab CI/CD for automated take a look at execution on each deployment, and apply finest 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 assessments, ecommerce workflow validation for full person journeys, GitLab CI/CD integration for automation, and parallel execution to hurry up testing. Headless mode runs browser assessments within the background with out opening a browser window, which works properly 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 challenge and dependencies.
- Create a smoke take a look at with login validation.
- Configure validation for the complete ecommerce workflow.
- Configure the automated testing pipeline.
- Configure parallel execution.
Stipulations
To finish this walkthrough, you will need to have the next:
Arrange challenge and dependencies
Create your challenge and set up dependencies:
Create a take a look at runner
Create smoke_tests.py:
Check your setup with the next instructions:
Setting variables like NOVA_ACT_API_KEY maintain delicate info safe and separate out of your code.
This resolution implements the next safety features:
- Shops API keys in setting variables or .env recordsdata (add
.envto .gitignore) - Makes use of completely different API keys for improvement, 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 challenge with Amazon Nova Act configured and prepared for testing. Subsequent, we present methods 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 broaden your basis code to incorporate an entire login take a look at with correct construction.
Add essential perform and login take a look at
Replace smoke_tests.py:
Check your login stream
Run your full login take a look at:
You need to see the next output:
Your smoke take a look at now validates an entire person 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, type interactions that enter person identify 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 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 take a look at offers helpful 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 the complete buyer expertise.
Configure ecommerce workflow validation
Let’s construct a complete ecommerce workflow that assessments the end-to-end buyer journey from login to logout.
Add full ecommerce take a look at
Replace smoke_tests.py to incorporate the total workflow:
Check your ecommerce workflow
Run your complete take a look at suite:
You need to see the next output:
Understanding the ecommerce journey
The workflow assessments an entire buyer expertise:
- Authentication – Login with legitimate credentials
- Product discovery – Browse and choose merchandise
- Purchasing 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 person journey.
Your smoke assessments 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 the complete buyer journey from authentication by order completion, you’re validating the first revenue-generating workflows in your software.
This strategy reduces upkeep overhead whereas offering complete protection of your software’s core performance.
Working these assessments manually offers quick worth, however the actual energy comes from integrating them into your improvement workflow. Automating take a look at execution makes certain code modifications are validated towards your crucial person journeys earlier than reaching manufacturing.
Configure automated testing pipeline
Together with your complete ecommerce workflow in place, you’re able to combine these assessments into your CI pipeline. This step reveals methods to configure GitLab CI/CD to robotically run these smoke assessments on each code change, ensuring key person journeys stay practical all through your improvement cycle. We present methods 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 traces to each take a look at 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 assessments 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 challenge, 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 shouldn’t be set, the headless parameter defaults to False, which opens a browser window so you may 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 ideally suited 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:
Verify the Pipelines part in your GitLab challenge to see the assessments operating.
Your smoke assessments now run robotically as a part of your CI pipeline, offering quick suggestions on code modifications. The GitLab CI/CD integration makes certain crucial person journeys are validated earlier than any deployment reaches manufacturing, decreasing the danger of delivery damaged performance to prospects.
The implementation reveals how trendy 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 finest practices.
As your take a look at suite grows, you may discover that operating assessments sequentially can develop 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
Together with your CI/CD pipeline efficiently validating particular person take a look at instances, the subsequent optimization focuses on efficiency enhancement by parallel execution. Concurrent take a look at execution can cut back your whole testing time by operating a number of browser situations concurrently, maximizing the effectivity of your CI/CD sources whereas sustaining take a look at 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 robotically makes use of the parallel framework when operating the smoke assessments.
Check parallel execution
Run your optimized assessments:
You need to see each assessments 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 take a look at, decreasing whole execution time.
Parallel execution offers advantages resembling sooner execution (as a result of assessments run concurrently as a substitute of sequentially), configurable staff that modify based mostly on system sources, useful resource effectivity that optimizes CI/CD compute time, and scalability that makes it easy so as to add extra assessments with out growing whole runtime.
Nevertheless, there are vital concerns to remember. Every take a look at opens a browser occasion (which will increase useful resource utilization), assessments have to be impartial of one another to keep up correct isolation, and you will need to steadiness employee counts with obtainable CPU and reminiscence limits in CI environments.
Every parallel take a look at makes use of system sources and incurs API utilization. Begin with two staff and modify based mostly in your setting’s capability and price necessities. Monitor your Amazon Nova Act utilization to optimize the steadiness between take a look at pace and bills.
The efficiency enchancment is critical when evaluating sequential vs. parallel execution. In sequential execution, assessments run one after one other with the entire time being the sum of all particular person take a look at durations. With parallel execution, a number of assessments run concurrently, finishing in roughly the time of the longest take a look at, leading to substantial time financial savings that develop into extra helpful as your take a look at suite grows.
Your smoke assessments now function concurrent execution that considerably reduces whole testing time whereas sustaining full take a look at isolation and reliability. The ThreadPoolExecutor implementation permits a number of browser situations to run concurrently, remodeling 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 develop into a bottleneck in your deployment pipeline.
The configurable employee rely by the MAX_WORKERS setting variable offers flexibility to optimize efficiency based mostly on obtainable system sources. In CI/CD environments, this lets you steadiness take a look at execution pace with useful resource constraints, and native improvement 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 finest apply, maintain assessments impartial—every take a look at ought to work appropriately no matter execution order or different assessments operating concurrently.
Finest practices
Together with your performance-optimized testing framework full, take into account the next practices for manufacturing readiness:
- Preserve assessments impartial. Exams are usually not impacted by execution order or different assessments operating concurrently.
- Add retry logic by wrapping your take a look at 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 each day validation of your manufacturing setting.
- 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 may add new take a look at features 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 expenses 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 submit.
- Take away API keys from inactive tasks.
- Clear cached credentials and non permanent recordsdata out of your native setting.
Conclusion
On this submit, we confirmed methods to implement automated smoke testing utilizing Amazon Nova Act headless mode for CI/CD pipelines. We demonstrated methods to create complete ecommerce workflow assessments that validate person 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 strategy utilizing Amazon Nova Act wants much less upkeep than conventional frameworks that use CSS selectors. Mixed with trendy tooling like UV bundle administration and GitLab CI/CD, this resolution offers quick, dependable take a look at execution that scales along 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 software high quality requirements.
To study extra about browser automation and testing methods on AWS, discover the next sources:
Attempt implementing these smoke assessments in your individual functions and take into account extending the framework with further take a look at 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/companies prospects construct scalable, progressive options on AWS. He architects clever automation frameworks and GenAI-powered functions that drive measurable enterprise outcomes throughout various industries. Past his technical pursuits, Sakthivel enjoys spending high quality time along with his household and taking part in 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 functions to attain 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 information platforms and AI-powered functions that remodel 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.



