DEV Community

Cover image for AI assistance in software testing: boost productivity and improve skills
Natalia Demianenko
Natalia Demianenko

Posted on

AI assistance in software testing: boost productivity and improve skills

In today's rapidly evolving software development landscape, testing plays an important role in ensuring the quality and reliability of applications. With the coming of Artificial Intelligence (AI), testing processes are being revolutionized by AI-powered assistants that enhance efficiency, accuracy, and speed. This article explores how AI helpers like ChatGPT, Postbot for Postman, and AI plugins for database tools like DBeaver and Studio3T are transforming software testing, making it better and more productive. I had a talk with my team last week about how we can use these tools especially for manual testing, and I want to share our ideas with everyone.

ChatGPT

There are numerous articles have highlighted the versatility of ChatGPT for software testing, e.g. for test ideas and test cases generation, requirements analysis, bug documentation and so on.

But this article is going to talk about something different and special about ChatGPT. It's really good at making different scripts. This is helpful for people who test software but might not know much about certain computer languages like JavaScript or bash. Based on your testing needs you can create script for generate text file with 1000 lines without knowledge of bash in 5 seconds. Moreover, ChatGPT will explain you how to create file for script and run it. Try prompt:

Create bash script to generate .txt file with 1000 lines

bash script from chatGPT

Another example of using ChatGPT for scripts generation is the following prompt:

Create script to run in browser console to get an array of urls from all images on the page

And again - 5 seconds and you are ready to get all you need with detailed explanation on how and what to do.

So beyond its practical applications, ChatGPT also serves as an educational tool, empowering testers to expand their skill set and experiment with automation.

OpenAI API

How can testers utilize the OpenAI API? I've previously covered the topic of generating realistic test data in an article, which involves a form of automation. However, it's important to note that manual testers can also benefit from this approach.

Postbot assistant in Postman

Once more, many testers might not be very familiar with coding. So, Postbot is an excellent tool that allows to write important tests which they might not have been able to do without the help of a developer or a lot of time doing research on the internet.

To start using it install the latest version of Postman. You'll find Postbot in the "Tests" tab of any request. To get it working, you just need to send the request once. This helps Postbot understand the response structure. After that, you can ask it to do specific tasks. It's a good idea to try it out while it's still in beta and free. Let's take a look at what this assistant can do.

Generate tests for requests

Simple prompt โ€œgenerate tests for this requestโ€ will return up to 5 tests, you can improve prompt to generate less tests or provide details. For education purposes you can ask to add comments which explain what test do. It's amazing that tests generating duration is just a few seconds!

Postbot - generate tests

Visualize the response

Did you know about such functionality in Postman? It's pretty easy to create visualisation script with Postbot in a few seconds. Use prompt:

Visualize response showing the fields [fields]

Postbot - vizualize response

And you will get the script to visualize your response in table format to make it easy to read.

Save variables from response

If you want to keep something from the response and use it later, you can use this prompt:

[Condition]- save [field] as [destination] variable

Postbot - Save variables

Postbot will quickly give you a script for that! It's pretty amazing how fast it works.

DBeaver AI plugin

I'm pretty sure your project involves using databases. If you're dealing with SQL databases, you might be using DBeaver to check things in your database. Most testers are familiar with SQL, but if you want to get better at it or speed up how you write queries, you can install the AI Smart Assistance plugin. Follow the instruction https://dbeaver.com/docs/wiki/AI-Smart-Assistance/. You'll need an OpenAI API key to make this work. Once you set it up, you'll see the chatGPT icon in the SQL script panel. Click on it and start typing your questions.

DBeaver AI plugin

AI Helper for Studio3T

If your project involves MongoDB and you're looking for help with writing queries, the ChatGPT Plugin for Studio3T is what you need. To get started, download the latest version of Studio3T and enter your OpenAI API key: Go to Preferences -> IntelliShell -> OpenAI Api Key. After that, you can select the collections you want the assistant to work with and write your query in natural language. Remember, the assistant only knows the structure of your data and doesn't have access to the actual data itself. I really like the example of usage from official blog.

AI Helper for Studio3T

Conclusion

In conclusion, AI helpers like ChatGPT, Postbot AI, and AI plugins for database tools are revolutionizing software testing. These tools empower testers to automate tasks, generate scripts, and create realistic test data, enhancing efficiency and expanding skills. This collaborative synergy between AI and human expertise promises a future of more robust and proficient software testing practices.

Have you used these assistants? What are your thoughts on them? Share your experiences in the comments below. Also, let me know if you'd like to explore any specific aspects further. Your feedback and input are greatly appreciated!

Top comments (3)

Collapse
 
igorboky profile image
Igor Boky

Ouch, so AI is coming to such tools as well, super interesting!

Collapse
 
kramin_alexey profile image
Alexey Kramin

Super helpful! Thank you for the sharing!

Collapse
 
rishipatel profile image
Rishi Patel

Very well written.