Skip to main content
Blog

Incorporating AI in Testing at Work

  • 29 August 2024
  • 9 replies
  • 539 views
Incorporating AI in Testing at Work

Before we start, I would like to let you know that a challenge will be coming soon and will be posted here on ShiftSync, where you can participate in it for a chance to win a ShiftSync Giftbox. So stay tuned for that and drop a comment down below if you want to be a frontrunner in the challenge.

 

Now, without further ado, let’s get on with the article.

 

The tech industry has been talking about the applications of AI in testing for the last two decades. 

The rise of Generative AI brings AI closer to everyday testing tasks and challenges. We stand at the gateway into the future of software testing, a world where AI is a powerful assistant, instead of merely being a buzzword. 

As an active participant in the testing world, I can foresee AI will transform testing workflows, creating room for creative, efficient, and innovative approaches. 

In this article, let’s uncover different ways in which AI can be incorporated into testing, both creatively and precisely. 

  1. Learning

The way we learn, and the way we adapt to new testing terms, AI changes it all. 

Recently, I experimented with ChatGPT to help me brush up on some domain-specific topics for a new project. 

Impact: The answers were good. I got to learn more about the practical examples, applying these concepts to my testing workflows. 

It was fascinating to see how a complex concept could be broken down into bite-sized, easy-to-understand chunks. 

It felt like having a patient teacher who could adapt explanations and examples to my unique learning style and needs.

Here’s a sample prompt I often refer to while learning new concepts

Act as a testing expert coming from a Rapid Software Testing Background.

You like to explain things like James Bach and Michael Bolton. You can read contents from: Developsense.com, satisfice.com, huibschoots.nl

Your task is to explain testing concepts to a beginner in testing.

Explain the topics using stories, examples, the importance of the topic, and in simple language. Also, share further learning resources and tools that I should look to explore more on this topic.

I want you to explain this topic to me: <<Topic Name>>

Feel free to use or improvise on the above prompt to learn about various things, such as:

  • Testing concepts
  • Domain concepts
  • Automation / Programming concepts
  • AI concepts
  • Technical concepts, etc.

Note: Please make sure that the prompt has been updated with the right resources, and references based on your context. 

For example, when trying to learn about a programming language, it’s always a good idea to ask the AI model to refer to the original programming language documentation or blogs.

AI tools recommended for learning:

  • ChatGPT
  • Google Gemini
  • Claude
  • Microsoft Copilot 

These tools can simply explain complex testing topics while providing relevant examples.

You can also ask the AI model to take a quiz to challenge yourself. 

  1. Coding / Scripting

Let's talk about the most time-consuming aspects of testing: coding and scripting.

Whether you choose to write automation scripts or develop utilities to support your testing, AI can be a game-changer. With AI assistance, you can shift your focus from the minor nuances of programming to focus on automation design and problem-solving.

You can leverage AI capabilities in your coding activities like:

  • Code Review & Refactoring: AI can deeply inspect your code for patterns based on the coding guidelines, or existing code as reference. It can also suggest improvements, identify code smells, detect inefficient loops, and suggest refactoring updates to enhance maintainability.
  • Code Debugging and Syntax Formatting: As a programmer, you understand the pain of debugging, where even the simplest issue can be a headache. 

AI assistance can reduce the pain for you. AI tools can assist in formatting your code to adhere to specific conventions. 

Here's a quick example of how AI can help refactor code from ES5 to ES6 in JavaScript using a simple prompt like: “Convert this ES5 code to ES6”.

// Old ES5 code 

var multiply = function(a, b) { return a * b; }; 



// AI-assisted refactoring to ES6 

const multiply = (a, b) => a * b;
  • Drafting Code Comments and Porting Code:

Documentation is important, Important yet least exciting.

AI tools can help draft code comments. Using AI to generate initial comments and then tweaking them to fit my specific needs saves me a lot of time and ensures consistent documentation across my codebase.

Additionally, AI can port code from one language to another, say Python to C#, AI can easily do that with much hassle. It provides multiple options of libraries to use and consider while porting your code. This saves significant time and effort.

  • Generating Micro Utilities: Good testers create micro utilities. Using AI, one can easily generate these utilities based on their specific needs. 

For instance, you can ask AI to generate a function that sanitizes user inputs, and it will provide you with a well-structured code snippet to do that. 

Once the boilerplate code is ready, you can easily tweak it to your own needs.

AI tools recommended for coding/scripting:

 

  1. Reporting

A crucial part of testing that gets less attention than it deserves: reporting

Clear and impactful reporting makes a huge difference to your testing outcomes. Effective reporting is key to successful testing. 

Here are various possibilities for using AI for reporting-related work:

  • Creating reports as per project or org templates: We may have our data ready but it may not always match the expected template. 

AI tools can help you create reports that align with your project templates. Whether it’s a test summary report or a detailed strategy report, AI ensures that your documents are correctly structured.

  • Influential Bug Reporting: Bug reporting has its roots in storytelling. 

Bug reports capture the story about the product, the story about the customer using the product, and the story about the impact that the bug can create on the user. 

AI tools can help us tell a tale that captivates and informs. 

I often use AI to help me brainstorm potential side effects or risks associated with a bug.

  • Testing Notes & Reports: AI tools can help you create your test summary, dashboards, presentations, etc. provided you have the relevant base data for them. 

AI tools recommended for reporting:

  1. Requirement Review & Analysis

Requirements are the foundations of software projects. Reviewing requirements and clarifying assumptions is critical for effective testing. 

This is where we can catch potential issues early and save tons of time and resources down the line. 

Here are different aspects that AI tools can help you with during requirement review:

  • Questions and Notes: By feeding requirements to AI tools, I generate a list of probing questions that help uncover ambiguities in the specifications. AI can generate relevant questions based on the requirements. It can also help in taking notes, highlighting key points, and organizing them logically.
  • Testability and Test Ideas: LLMs can assess the testability and suggest test ideas based on requirements. 

For example, if a requirement specifies a new login feature, AI tools can suggest positive, negative, and edge test cases, covering various scenarios.

  • Requirement Bugs: Bugs may not always be in the product, sometimes it’s in the requirements too. You can leverage AI tools to analyze requirements and list out your requirement bugs such as inconsistencies, missing data, ambiguities, etc. 

This is a sample prompt that I use often to do requirement analysis:

I want you to act as an expert software tester who works at reviewing requirements and participates in requirement refinement meetings with the product team.

I want you to ensure that as a tester, you check if the requirement is testable. If not, highlight what can be done to make it testable. Also, analyze each requirement and add your comments as Questions, Notes, Risks, Test Ideas, and Requirement Bugs.

Here is the requirement of this feature: <<Paste requirement here>>

Recommended tools for requirement review and analysis:

  • ChatGPT
  • Gemini
  • Claude
  • Microsoft Copilot.
  1. Test Scenarios & Ideas

 

Coming up with a comprehensive set of test scenarios is both art and science. You need to be able to think of positive cases, negative cases, edge cases, and everything in between. 

Having a fresh perspective makes all the difference. 

AI can help you generate a diverse set of scenarios and ideas for:

  • Positive cases
  • Negative cases
  • Exploratory & creative cases
  • Boundary cases for variables, etc.

For instance, if you’re testing an API, AI can provide various test scenarios, including normal usage, unexpected inputs, and edge cases.

For non-security experts, AI can help with security-related test scenarios. I ask AI tools to suggest potential security risks for different aspects of an application – API, GUI, database implementation, etc. 

This ensures that security checks are implemented right from the start.

AI tools recommended for test scenarios and ideas:

  • ChatGPT
  • Gemini
  • Claude
  • Microsoft Copilot.
  1. Test / Script Development

Once we have our test scenarios and ideas ready, the next step is developing tests or scripts. Developing tests and scripts is a core activity in testing. 

AI can help you write and paraphrase test cases in any format supported by your test management or automation tool. It can easily write and transform your tests for BDD (Gherkin), step-by-step instructions, or one-liner ideas. 

It also ensures that test cases are well-structured, easy to understand, and aligned with the test management platform.

AI tools recommended for test case/script development:

  1. Miscellaneous Stuff

Beyond core testing activities, there are multiple tasks that can eat up a tester's time. AI can handle most of such miscellaneous tasks, making your life easier. 

Some of these tasks can be:

  • Drafting and paraphrasing emails
  • Generating test data sets
  • Generating questions as per the testing context
  • Prepare presentations
  • Create a training plan for juniors, etc.

AI can work as your assistant for all such tasks.

 

Conclusion

 

Incorporating AI in testing is not limited to automating tasks. 

It can be used to enhance your capabilities, improve efficiency, and deliver higher-quality software. 

By leveraging AI tools you can transform your testing processes and stay ahead in the competitive tech landscape. So, embrace AI, experiment with different tools, and see how they can revolutionize your testing workflows. 

The future of software testing is here, and AI is inevitably, a part of this future.

 

Excellent on to the point.


Thanks, @Umamaheswar for the feedback :)


The article provides a comprehensive overview of how AI is transforming the landscape of software testing, emphasizing its potential to enhance learning, coding, reporting, and requirement analysis. As a professional in the tech industry, I appreciate the detailed insights into how AI tools like ChatGPT and Microsoft Copilot can streamline various aspects of testing, from coding and scripting to generating test scenarios and reports. The practical examples and prompts shared offer valuable guidance for testers looking to integrate AI into their workflows effectively. This forward-thinking approach will undoubtedly pave the way for more innovative, efficient, and high-quality software development practices. I'm excited to see how these advancements will continue to evolve and shape the future of testing. Looking forward to participating in the upcoming challenge on ShiftSync!


Fantastic insights on the evolving role of AI in software testing! 🎉 As a Software QA Test Engineer, I’m particularly excited about how AI can transform tedious tasks into efficient workflows, allowing us to focus more on innovation and strategic thinking. The section on AI-assisted code refactoring and debugging really caught my eye—it's amazing to see how much time we can save and how quality can be enhanced. I'm also intrigued by the potential of AI in generating diverse test scenarios and enhancing test case development.

Looking forward to participating in the upcoming challenge and exploring more ways to integrate AI into our daily testing practices.

Thanks for sharing such a comprehensive guide! 🙌 Rahul Parwal


Thanks for this great article Rahul!


Great article! It effectively highlights how AI can revolutionize software testing, from learning and coding to reporting and requirements. The practical examples and tool recommendations offer valuable insights for testers looking to enhance their workflows with AI.


The article provides a comprehensive overview of how AI is transforming the landscape of software testing, emphasizing its potential to enhance learning, coding, reporting, and requirement analysis. As a professional in the tech industry, I appreciate the detailed insights into how AI tools like ChatGPT and Microsoft Copilot can streamline various aspects of testing, from coding and scripting to generating test scenarios and reports. The practical examples and prompts shared offer valuable guidance for testers looking to integrate AI into their workflows effectively. This forward-thinking approach will undoubtedly pave the way for more innovative, efficient, and high-quality software development practices. I'm excited to see how these advancements will continue to evolve and shape the future of testing. Looking forward to participating in the upcoming challenge on ShiftSync!

Yeah! See you at the challenge :)


Thanks @parwalrahul for this article. 

Definitely you are making a Long lasting impact on testing community with your expertise on incorporating AI in Testing.


Thanks @parwalrahul for this article. 

Definitely you are making a Long lasting impact on testing community with your expertise on incorporating AI in Testing.

Thanks for the feedback, buddy :)


Reply