P
P
Ptolemy_master2017-11-25 23:58:57
Software testing
Ptolemy_master, 2017-11-25 23:58:57

How to write test cases correctly?

Hello everyone,
I have a testing question. I can't figure out how the test case should look right. That is, the problem is - there are two possible approaches, I just don't know which is correct, which is not, and why. It is clear that in practice anyone can be used, but maybe there are some special considerations?
So, the task: we need to check that when the user specified the name, it is shown as a link to the profile. If the user has not specified a name (there is no requirement for a name), then the text "Profile" is shown instead of the name in the link.
2 approaches:
1) Create 2 different test cases, with different users, one user has a name, the other does not. The expected results are, respectively, the username, or the word "Profile".
2) Create 1 test case: first, the user is given a name, saved, then checking the link - there must be a name. Then the user's name is erased, saved, the check is the word "Profile".
In the second case, the fact of saving confuses me - it kind of blurs the essence of the test case and it's not entirely clear what exactly is being tested - whether changing the text in the link, or the saving function.
In the first one, I do not like that it is necessary to use two different users, and it is not clear how to 100% ensure that one has a name, and the second does not.
Thanks

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question