OpenAI: Three ways it can help software testers

Opportunity knocks

I’ve been playing around with the suite of OpenAI tools that have recently appeared in public beta. I doubt they will be free to use forever, so now is a good time to have a knock about with them if you want to see what AI can do.

Hit the links to go straight to each area:

Dall-e for image generation using Postman API 📷
ChatGPT for inspiration and content creation 💡
Codex for checking test script syntax and first drafts

I am coming at this from a very novice level of understanding algorithms, AI, machine learning and all that jazz. The buzz on LinkedIn and Twitter is growing and it would appear that battle lines are starting to be drawn, but if you want to check out this technology for yourself, here a few places to explore.

Where to start

First things first, sign up for an account

Go to https://beta.openai.com/signup/

You’ll need to provide an email which is verified and an SMS which is also verified. Call me paranoid, but I worry about my records being leaked by a service such as this, plus as a tester I like to be able to use non-personal records, so I used Mailinator who’s enterprise level has both unlimited private email addresses and also an SMS service. Its mine, but it also doesn’t use my personal email and phone number. You might need to sign up for the separate tools (Dall-e, ChatGPT etc) separately too.

What can I do?

Dall-e Image Generation for Test Data (or fun!)

There are lots of ways to do this, but for me the quickest way of knocking around any API is via Postman. If you want to use Dall-e via API calls to generate images on the fly, you can do that in open AI and Postman currently by following these steps:-
1. Generate an API Key
2. Create an Open AI Environment in postman. Add in the URL and the API Key

3. Fork the Postman Fun APIs Only OpenAI endpoints created by Postmanaught Ruby Sutter workspace. Save as a new collection in your workspace of choice.

4. Ensure the authentication token points to the API key which was saved in your environment variable

5. Select the environment variable created earlier. Open the image generation endpoint, click body, enter something funky into the prompt and click send

6. Finally, select the Visualize option in the response body to view the images – awesome huh!

Images can be used as test data, generated on the fly and fed into your tests.

Use ChatGPT to research and even write content

YouTube Video showing Open AI’s ChatGPT tool answering the question “how openai can help software testers”

Once you have registered and verified your account, you are allowed to put in any text you wish and see what ChatGPT has to say about it. Here is the output in full, when I asked the question “Write a short post on how open ai can help software testers”:-

Open AI is a leading provider of artificial intelligence technologies and has the potential to help software testers in a number of ways. For example, Open AI’s GPT-3 language model can be used to automatically generate test cases, making it easier and faster for testers to cover a wide range of scenarios.

In addition, Open AI’s machine learning algorithms can be used to automate certain aspects of software testing, such as regression testing and performance testing. This can help testers save time and reduce the amount of manual effort required for these tasks.

Furthermore, Open AI’s technology can be used to analyze large amounts of data, such as test results and performance metrics, to identify trends and patterns that may not be immediately apparent. This can help testers better understand the behavior of the software they are testing and make more informed decisions about how to test it.

Overall, Open AI has the potential to significantly enhance the capabilities of software testers and help them to more effectively and efficiently test complex software systems.

Open AI

But how to use this as a tester now? Research! Ask it stuff, even create blog posts or draft other content you need, as well as generating e.g. a fixed number of words without relying on lorum ipsum.

Use Codex to cross-reference or draft test automation scripts

Youtube video using Codex to generate test scripts (code extract not shown on mobile view)

Like the others, this still has a way to go, and I don’t see it ever replacing skill test automators but as a neat cross-referencing tool, to easily give some inspiration on correct formatting, syntax etc. this is a good thing to know about. There was a very interesting LinkedIn post of someone generating a lot of automation code for tests

Other areas with promise are the content moderation and text completion endpoints, which seem very cool as well.

I’m still very much exploring this developing tool set, and look forward to learning from others how they are utilising it (if at all) to add another tool to their testing toolkit.

Bye for now!

Advertisement

4 thoughts on “OpenAI: Three ways it can help software testers

  1. Hi Beth! Thank you so much for your interesting ideas. I followed all the steps, but Postman gives me an error “Incorrect API key provided”, any ideas what to check?

    Like

    1. Hi Olga,

      Firstly – really pleased you are checking this out for yourself! Thanks for flagging this issue. I’m not 100% sure, but it is possible that the wrong reference to the API token is being used somewhere in your collection. Try this:-
      1. In postman, click on the collection name. In the panel that appears, find the token field. check the reference to the environment variable is the same one that you have created e.g. {{OPENAI_API_KEY}}
      2. In your environment variables you have saved. Check the e.g. OPENAI_API_KEY variable name has a value in both current and initial fields. Save this as a secret value to ensure noone else can see it.
      3. Back to the collection. Open an endpoint. In each OpenAPI request, click on the authorisation tab and check that the type of authorization is “inherit from parent”. This should pick up the collection token you have saved in step 1.

      Hope this helps, best of luck,
      Beth

      Like

  2. Thanks for sharing this information Beth. From coding to copywriting to data analysis and more, ChatGPT can do it all. If you have not yet tried ChatGPT, you are going to have your eyes opened by its capabilities. ChatGPT writes, creates and also answers questions just like a person can.

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: