What Are Use-case And Test-case

What Are Use-case And Test-case

ยท

3 min read

In life as we know it, there are those who were born with a silver spoon in their mouths, there are those of us who got plastic spoons ๐Ÿ˜… and there are those who didn't get a spoon ๐Ÿ˜“. Today we'll be learning about spoons... I'm kidding! ๐Ÿ˜‚, we're going to be looking at use-case and test-case.

It makes sense to look at use-case and test-case together because they're somewhat two sides of the same coin; the product. For a product to be developed (under normal circumstances), there is demand from users (let's call them netizens because we're looking at tech) and there is sufficient resource (the development team) to develop that product.

steve-smith-Zvvu4zRKijE-unsplash.jpg

Use-case and test-case; unifying the similarities in their distinctiveness

Use-case simply put are a set of requirements from netizens who hope to use a product (upon creation), it's somewhat simple to understand as it's mostly layman lexicon, in SDLC (Software Development Life Cycle), you find that the business analyst or the technical writer interacts with the netizen to obtain this information.

Test-case however is somewhat more esoteric, it's designed by the software testers and is meant to take a deep dive into what the product must be capable of in order to sufficiently satisfy the use-case that was developed. Test-case contains the parameters upon which the product will be tested for quality assurance.

It's easy to think that a test-case would be a duplicated document of a use-case document seeing as test-case simply aims to assess a product's capability based on the demands of the netizens, I'll use two examples to emphasize the differences, one example that's more relatable and another that's fairly techy.

relatable explanation.jfif

A relatable explanation

I'm going to start with the spoon example (why else would I start my introduction with a spoon? ๐Ÿ˜), the average Joe who needs to eat (with a spoon) will say "I need a spoon", the use-case would probably describe something that can be held from one end, while the other end is somewhat wide and fairly curved in order to be able to scoop food.

Because the descriptions above leave room for shabby work to be done, a test-case will detail specifications regarding the quality of the material; plastic, wood, rubber, silver (etc.), you'll also see things regarding the ergonomics of the spoon as well and other things that go into the "how" of creating the spoon in order to ensure quality.

A tech example will be LinkedIn, let's assume the first requirement for LinkedIn as a product would be that the netizen wants to log in and register, the use-case will state the bare bones of login and registration, the information to be obtained and other aesthetics that the netizen will interact with, use-cases must be written plainly so the netizen understands.

A test case will cover esoteric concepts like user authentication using JWT (JSON Web Token) or OAuth, the use of social media authentication (that allows you to login using your Google, Facebook, Microsoft or Twitter account), user roles, input validation with a sprinkle of error handling, cybersecurity failsafe and others.

finally.jfif

Finally

Use-case and test-case are some of the little additions that make a world of difference between a product developed for fun or to be used in a very small capacity and an enterprise solution that is built to solve the problem of our teeming population. As a software engineer, coding with the test-case in mind helps write better code and build more maintainable software solutions.