By now everybody in the tech industry must have heard about ChatGPT and its power. By using simple prompts anybody can write code in a matter of seconds and in fact build an application. However, people ask me what else ChatGPT can do. Though I tell them there is no limit to the capabilities of where and how ChatGPT can be used, one important area where I see ChatGPT being used in coming years is functional testing. Let's first define functional testing.

What is Functional Testing?

As described on Wikipedia

Functional testing is a quality assurance (QA) process and a type of black-box testing that bases its test cases on the specifications of the software component under test. Functions are tested by feeding them input and examining the output, and internal program structure is rarely considered (unlike white-box testing).

In simple words testing functionalities by feeding input and examining the output is called functional testing.

There are many types of functional testing:

  • Unit Testing
  • Smoke Testing
  • Sanity Testing
  • Regression Testing
  • Integration Testing
  • Beta/ Usability Testing

We will not go into details for each one of them as this post is not about functional testing in particular. But what is important here is to understand how we define a use case for these tests. While writing a use case a tester has to describe the following 4 things:

  • Description
  • Preconditions
  • Steps
  • Expected result

So far testers have been following the above template in order to test the functionalities of an application.

Sounds pretty boring and tough?

However, with ChatGPT this is no more arduous work. In fact, defining test cases has become the easiest task for testers as all they have to do is use the right set of prompts to generate a test case. Recently I asked ChatGPT to:

Me: List some functional tests case for an e-commerce app that has OTP-based login along with forgot password functionality. The application also has a signup feature that accepts name, dob and email address to create an account.

ChatGPT Response:

As you can see it has clearly covered all the scenarios to check the login functionality of an app. Looking at the response I went 1 step ahead and asked ChatGPT

Me: Also define security test cases for the above-mentioned functionality. Also define the error message if user already exists in the database.

Again ChatGPT was able to cover all the scenarios. This shows how easy it can become for testers to define test cases that earlier used to take them days to write.

What is worrisome over here is that over the coming years, testers may start losing their jobs as with time ChatGPT will improve and so it's time for testers to upskill themselves before it's too late to start new!