By: Ankit Srivastava
What is Generative AI in QA :
Generative AI is referred to an advance approach in testing that augments human efforts of testing process efficient and faster. Generative AI enhances speed, accuracy and productivity in QA.
Need of AI in Manual Testing :
Manual testing has its own existing challenges specially referring to the scalability of the test coverage, long running laborious tests.
Benefits of Using AI in Testing:
- Using Generative AI in Testing and QA process can detect error pattern early, speak about the anomalies and vulnerabilities in the system design and hence accelerate the business need by delivering the quality product.
- Refactoring of test cases can be achieved by 30% faster using Generative AI based tools.
- As compared to the traditional methods, Bug reports created by Generative AI based tool is more efficient and could result into decrease in error by 40%.
Generative AI impact Areas in Quality Assurance
Following are the 7 ways in which Generative AI can be impactful:
1. Test planning:
Generative AI helps test teams to plan the test activities in most efficient ways, it analyzes the test requirement and then provides valuable insight about the tools and processes to be considered.
2. AI driven test case scenario generation:
Generative AI is highly impactful in analyzing and harnessing the data from different sources, this data can be used to create optimized and relevant test cases those cover multiple scenarios and edge cases.
3. AI driven Optimization for Test Suites and maintenance:
Generative AI can analyze the test suites for redundant and overlapping test cases and thus improving the Test Suite efficiency for Application under test. The AI model suggests to remove the redundant tests to improve the test efficiency.
4. Bug Detection:
Through the learning models, Generative AI analyses system under test or application execution pattern and identifies critical bugs or security vulnerabilities. It can also detects the anomalies and potential bugs those missed during manual testing.
5. Intelligent Test Execution:
Generative AI selects the most relevant test suite corresponding to the code changes done, accordingly reducing the testing time and strengthen the change made.
6. Enhanced Defect Analysis and Reporting:
Generative AI does detailed root cause analysis of bugs to allow dev team to look out for precise and effective solutions. Generative AI is capable of creating detailed Bug Report that contains every vital information related to bugs without the manual efforts.
7. Test Automation:
Generative AI can be used to automate the process of writing automated test scripts, once it understands the system under test and its expected behavior, test scripts can be generated though generative models, it will reduce the manual efforts required for writing and maintain the automated tests.
Types of Generative AI Models:
Generative Adversarial Networks (GANs) :
This AI model generates new data closely resembling to the input data provided.
In QA, GANs can be used to generate wide array of test data using the pre existing test data. GANs consists of “generator” to create a new data and “discriminator” to evaluate and validate the generated data. Using these dual structure, GANs model is capable of producing highly realistic test scenarios.
As another model of Generative AI, it is excellent in understanding data context and sequencing within the data.
It analyses entire input data before generating the output so model is allowed to consider the broader context.
Ability to generate output based on broader context, this model can be used to harness the QA testing process.
Generative AI Use cases
Example generation based on description:
This is based on the AI model’s capability of understanding the description and generating relevant examples subsequently. This can be used to create a wide array of test cases based on given test case examples.
Let’s consider an example using this model where a QA engineer provides a brief description like, “Test user registration flow.” The AI model understands the given requirement and produces test case examples, essentially reducing the manual effort.
Individual tests generation based on description:
Generative AI can generate complete tests based on the provided description. Unlike only providing the examples, AI can comprehend the requirement and develop full-fledged test along with the necessary setup for the test environment.
Let’s consider an example, for a given description like, “Develop a full test for a invoicing flow of an ecommerce platform”, the AI model would analyze the requirement, generate the necessary code, and design a test environment, all while minimizing human intervention.
Develop QA Strategy with Generative AI
While using Generative AI for QA department, following are the steps those can be followed:
1. Goals Definition:
Identify the Goal which will be achieved through implementing Generative AI, it could be anything like enhanced test coverage, reduced manual test time, enhanced bug detection and vulnerabilities.
2. Understanding Testing needs:
Understanding the specific need and challenges in testing and considering whether Generative AI can fulfill the testing needs effectively.
3. Infrastructure Audits:
As a requirement, Generative AI needs computational resource, so prior implementing the Generative AI all audits and investigation should be done and if required hardware or cloud based investments has to be made.
4. Right tool selection:
Evaluation has to be done for right AI tool among the available ones which essentials caters to the defined testing goals.
5. Team learning and Trainings:
QA team using Generative AI must be having necessary skills to use AI platform effectively, should be able to interpret AI generated test results.
6. Implementation and Monitoring:
Once all the above points are meeting expectations, AI can be introduced to few areas of application and then gradually expanding its use. Regular monitoring is also required to review the implemented AI performance.
Challenges and limitations
Generative AI also comes with some limitation and challenges like:
1. Ethical Considerations:
Issues related to data privacy and security, ethical use of AI is quite challenging.
2. Biases in AI:
AI largely depends on the training data, it could lead into biased decisions and predictions by the AI, ultimately compromising the accuracy of testing outcomes.
3. Importance of Human Oversight:
Human oversight will always be crucial in software testing.
4. Complexity and Maintenance:
Due to constant changes in learning models and algorithms, managing and keeping AI system can be challenging.
List of popular AI powered tools for QA
Applitools uses Visual AI to generate next generation of test automation, it reduces manual workload across the entire testing process.
Key Features :
- Significant reduction in time taken for creation, execution and maintenance of automated tests through visual AI
- Capability of testing large scale application with AI assistance
- Intelligent test automation to minimize the manual tasks
Mabl is a low code AI powered test automation tool, it seamlessly integrates load testing , reduces infrastructure and operation cost and speeds up the mobile application development.
- Low code, integrated load testing
- Performance testing at the early phase in development cycle
- Provides High velocity platform for teams to create, execute, and maintain reliable tests
- Reduces cost involved at infrastructure and operational level
Testim increases test coverage and reduces maintenance through its innovative AI-powered platform. It has self-improving stabilizers to eliminate flaky tests.
- AI powered stabilizers to reduce unstable tests
- Enhanced control and management over testing process to achieve scalability
- Excellent troubleshooting model to deeply analyze root cause
- Quick and fast authoring for quality tests coverage
It is cloud based, low code, AI powered test automation platform.
This platform is able to cater range of applications like Web, Mobile, API, desktop and back end.
- Single platform to handle variety of applications including Mobile, Web, API, Desktop, and Backend
- AI-powered codeless test automation on the cloud
- Unique transformational approach and technology for Cloud based & Packaged App Testing & Automation
5. Sauce Labs
Sauce labs’ AI powered tool enables authoring, writing and full documentation of test suits, it introduces low-code automated web testing services to enhance the productivity.
- Promotion and support for collaborative environment
- Democratizes web application testing
- Full automation of test suites using AI powered system
6. SmartBear Visual Test
This tool introduces AI-powered visual test automation. It has ability to integrate with existing UI tests, allowing app verification really quick. Backed by next-generation machine learning system, it is able to track different types of visual changes and capable of ignoring false positives, excellent in redundancies reduction.
- AI-powered visual test automation
- Quick app UI verification test
- Tracking visual changes and ignoring false positives
- Reduces Time spent on redundancies
Real Application Use case scenario
I have an e-commerce mobile app. It is having following user roles :
– Admin: Admin user role involves adding users, managing products and Invoicing management.
– End User: End user role involves registration into the app, log into the application, searching and browsing the product, selecting the desired products and checkout successfully.
Here we can use AI based tool i.e. ChatGpt for various level of testing and their steps are as follow:
Training the Tool about the application
Now the tool has an understanding of the Application under test.
Moving forward, let’s break it down into multiple QA activities
Activity 01: Create a Test plan for the Application
After Asking tool about the test plan for same application, contextual results are popped out which can be used as baseline for Test Plan for the application, addition info can be added as per the requirement.
Activity 02: Creating high level Test Scenarios for ‘add user flow by Admin’
High level test scenarios are generated through AI tool having the same application context.
These scenarios can be used as baseline for test case development activity for ‘add user flow by Admin’.
Activity 03: Generate Test Data for ‘application login by user’
With the login requirement as :
- User name should be a valid email
- Password must have 8-12-character length
- Password must have at least one special character, and one numeric digit
AI tool yields test data with the same application context. These test data can be incorporated into the test cases and test execution can be done against them as well.
Test Automation Based Use cases using ‘Mabl’ tool
Need to run automated tests around login flow for Employee Management application
Steps 1: Create a new Browser Test in Mabl tool through tool interface
Step 2: Initialize training session for ‘Mabl trainer’
Clicking Create Test initializes the training session and launches the Mabl trainer.
Step 3: Train the Mabl trainer through series of test execution steps
For this instance, following execution steps are performed:
– Application is launched.
– Valid User name is entered.
– Valid Password is entered.
– Login button is clicked.
– Assertion is implemented through Mabl trainer for ‘Excellence Centre’ title on landed page.
Step 4 : After Saving the test, ‘Mabl trainer’ is trained with the flow performed in Step #3
These trained steps can be re-run locally or on cloud environments.
These would also run periodically for the same trained steps and for the next iteration of tests, it would perform the same tests based on learning it has received.
Since the emergence of AI, Generative AI is rapidly growing, getting better with learning models and patterns.
Generative AI would bring revolutionary transformation to the Software Testing and Quality assurance landscape.
Improved software quality, fast paced release cycles, competitive edge cases and AI driven test automation are the changes which QA industry will be witnessing moving forward.
Though AI would be reshaping the QA world, there would still be a need of Human intervention to fill the gaps and perform the tasks that AI can’t achieve.