Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

Writing Test Cases

+2 votes
asked Jan 19, 2023 by LaTanya Brooks (140 points)
Can someone explain to me how test cases work and how to create one.  I am an educator by trade who learned programming on the side to be able to teach it.  I am still learning.

1 Answer

0 votes
answered Jan 21, 2023 by Peter Minarik (88,520 points)

First of all, I'd suggest reading on the subject as this forum is quite limited in this regard. You could read books on unit testing. I don't have the time to write a whole book here. :D

Anyway, here is the Wikipedia page on unit testing. Check it out, it has examples too.

If you've read that, please ask away for specific questions. It would also help if you'd specify what code language would you like to use for testing as different languages have different frameworks and flavours for testing.

Good luck!

Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.