Konabos

ChatGPT for QA: Helpful prompts for Test Management

Brittany Stewart - Senior QA Specialist

2 Feb 2024

Share on social media

It is crucial to stay ahead of the curve in the ever-evolving world of software quality assurance (QA). As a Senior QA professional at Konabos, I’m always on the lookout for innovative tools and techniques to streamline our workflows, boost efficiency, and ensure the highest standards of product quality.  

In this blog post, I showcase the practical application of ChatGPT which has been a new secret weapon in my QA Toolkit.  

The Challenge: Test Case Management

Over the last 8 months, I have been working on a project that has posed some familiar but still unique challenges.  

I often advocate for Test Automation and Exploratory testing on my project team and contribute to its implementation in different ways.  

Test Case management is the process of creating and managing test cases. It involves organizing and storing test cases, executing tests, logging defects, and creating reports. It’s important to keep test cases well organized, traceable, and easy to maintain.  

Categorizing tests is an efficient way to manage test cases and helps teams focus on the specific areas or features of the software at any given time. 

Being able to track changes helps to keep tests up to date which in the long run reduces time and effort. 

Being able to quickly and efficiently see test statuses, and the amount of time spent testing is important 

At the beginning of the projects, the first challenge was understanding how the system works – and translating this into test cases and test coverage.  

While remaining mindful of the fact that its responses were non-human and would require review and precaution, I treat ChatGPT as a companion in my daily work life.  

The Solution: Test Case Design - Leverage Generative AI Using ChatGPT

ChatGPT, the generative AI model developed by OpenAI has been heard of and is perhaps used by many of you.   

Before we dive into the specifics of using ChatGPT for QA, let’s establish a foundational understanding of generative AI prompts. Generative AI models, like ChatGPT, are designed to generate human-like text based on the input provided.  

In QA, this means we can prompt ChatGPT with questions, requests, or tasks related to testing, and it will respond with relevant and context-aware information. 

ChatGPT as Your QA Companion

Here are some ways I’ve found ChatGPT to be helpful in my day-to-day life as a QA professional. 

 1: For Test Case Generation based on User Story 

One of the most powerful applications of ChatGPT in QA is test case generation. Traditional test case creation can be time-consuming and sometimes overlook potential edge cases. With ChatGPT, we can provide it with information about our software, and it can generate a variety of test cases, including boundary cases and negative scenarios. This not only saves time but also enhances test coverage.  

Recently at the beginning of a project, we had a number over 67 components to review acceptance criteria and write test cases. I would have taken a while to come up with scenarios for testing. I decided to try using chatgpt to get some ideas. Here’s an example of a prompt used to generate test cases for a user story: 

My Prompt: 

A screenshot of the prompt.

ChatGPT Responses:

A screenshot of the response ChatGPT gives.
A screenshot of the ChatGPT response continued.

I found this response helpful for two things:  

  1. To assist with categorizing tests into Smoke and Regression Test Suites 
  2. It ensures test coverage. For example: I did not have many scenarios for performance testing until after this generation.  

2: For Test case organization within Azure DevOps Test Plan 

My prompt in this scenario was to create a folder structure for the tests. However, the version of ChatGPT did not allow visuals but instead gave me this response. I still found this helpful. I am curious what GPT 4 would have given to me as results (I’ll test this theory one day soon).

A screenshot of the folder structure that ChatGPT proposes in Azure DevOps Test Plans.

These are just a few ways I’ve found it beneficial so far. In the coming weeks, I will continue to experiment with AI and share feedback on use cases for the following areas.  

People have been successfully using it for these purposes but I will try. If you have already had success with these areas please share your experience and tips: 

Other areas for AI use in Testing 
  1. Test Data Generation 
    • Generating test data that covers different scenarios and data types can be challenging. ChatGPT can assist us by creating synthetic test data based on our requirements. Whether we need valid data, invalid data, or data that triggers specific conditions, ChatGPT can help us quickly generate it. 
  2. Exploratory Testing 
    • Exploratory testing often involves exploring the software with minimal predefined test cases. ChatGPT can serve as our brainstorming partner, suggesting test scenarios and helping us think outside the box. We can ask it questions like, “What happens if I input X and Y together?” or “Can you suggest edge cases for this feature?” 
  3. Documentation and Knowledge Sharing 
    • ChatGPT can assist us in creating and maintaining documentation. It can generate detailed test plans, test scripts, and even summaries of test results. This is particularly helpful for sharing knowledge with team members and stakeholders. 
  4. Automation Script Ideas 
    • If we’re considering test automation, ChatGPT can provide ideas and insights into which test cases are best suited for automation. It can even help us outline automation scripts, making the transition to automated testing smoother. 
Tips for Effective Usage 

While ChatGPT offers immense potential for QA tasks, it’s essential to use it effectively: 

  1. Clear and Specific Prompts: Provide ChatGPT with clear and specific prompts to get precise responses. Set the stage for your AI model. In my case, I use “Act as a <Role>” and have found this effective 
  2. Review Outputs: Always review the generated content to ensure accuracy and relevance. 
    It’s important to remember that ChatGPT will answer anything – even if the response is incorrect. Therefore, your human review is essential. Never copy and paste without first reviewing the results.  
  3. Experiment and Refine: Experiment with different prompts and refine our approach to get the best results for you and your project team. 
  4. Combine with Human Expertise: ChatGPT is a tool to assist us, not replace us. Combine its capabilities with our expertise for optimal results. 
  5. Stay Updated: As AI models evolve, stay updated with the latest advancements and best practices in using ChatGPT for QA. One resource that has helped me better understand prompt engineering is AI-Assisted Testing by Mark Winteringham. 

In conclusion, ChatGPT has the potential to revolutionize the way QA professionals like us approach our tasks. By leveraging generative AI prompts, we can streamline test case and test data generation, enhance exploratory testing, improve documentation, and make informed decisions about test automation. As QA continues to evolve, embracing innovative tools like ChatGPT can be a game-changer in achieving higher levels of software quality. 

Share your successful use cases for AI in testing and let's keep the learning going.  

I have written this blog post to provide some simple examples of how I have used tools like ChatGPT to help me in my role over the past year. Hopefully, you find these helpful and continue to experiment and share your findings with the community. 

Happy Testing! 🙂

Sign up to our newsletter

Share on social media

Brittany Stewart

Brittany Stewart

Brittany Stewart is a senior software QA consultant with over 6 years of experience in the industry. She has worked in a variety of capacities over the past few years and has discovered ways to apply her business and creative skills in the tech world. She is an expert in manual and automated testing, identifying and mitigating risks, and has a strong track record of streamlining processes and boosting productivity for her clients. She is best known for her ability to use her communication skills and eye for detail to improve software quality and time to market.


Subscribe to newsletter