Return to site

chatGPT: Generating Unit test with chatGPT 🤖🧪

· java,chatGPT,testing

ChatGPT is a computer program designed to understand and generate human-like text. It can be used for tasks such as language translation, text generation, and creating chatbots. It's a type of Artificial Intelligence model, more specifically it's a language model, that can understand and generate text.

Developers can leverage their coding skills thanks to chatGPT.

Let's see one use case: the generation of a unit test

I first ask chatGPT to generate a Java bean with this prompt (a prompt is a command to give to chatGPT):

chatGPT in reply gave me:

which is great ✅👍

Now, let's ask to generate the unit test with the following prompt:

chatGPT replies with:


which is great ✅👍

Then I pasted it to IntelliJ and it worked fine. Great job chatGPT! 👏


broken image


Check it in the video 🎬[4min]: