Test Case Writing
Hi my friend! :)
If you are new to test case writing and thinking about how to start case writing, which test case writing standards you should take consider, and what kind of test cases you should write.. this document can be useful for you.
While test case writing, we should use some templates for example we will use the below ones for our cases. Bold written ones are the test case writing standards that are created by and used in Veripark, the rest of them change depending on the test cases.
Check Navigatation: Login Page via login button
Check Flow: Login
Check Fields: Buttons on Login Page
Check Content: Legality Text on Login Page
Check Validation: Password
When: User writes wrong email address — Warning should be displayed to the user.
You can use any test management tool whatever you select, such as DevOps-TFS, Microsoft Test Manager, TestRail, or any others. Let’s write some test cases for Amazon.com.tr
“Flow” and “Navigate To” cases are the most important and first step cases which will be executed, because without navigating the page, you can not test anything on that page. If there is some error that stops or blockes your testing to navigate related page, what can you do? Then you should open critical bug! So, we can say priority of the test case and priority of the bug are related in this sense. As you can see in the screenshot, if case should be execute at the first place, you should give its priority “1” mostly.
If you need a real example, let say login button is not working, it means you can not display and test login page. Let’s move on with Flow case for Login.
After navigating login page, you need to enter your email or phone number and then click Continue button but don’t forget the previous steps because they are also first steps of Flow!
You may be realized some steps are written for more than one case, so you don’t have to actually you shouldn’t write these mutual steps every time.You should make these steps as “Shared Steps”. For example when we’re going to write “Flow: Login via phone number” case, first 4 steps should be added by clicking “Inserted shared steps” So what I’m saying is, you should use time effectively, time is important while case creation too as in everything. Flow cases also have “1" priority.
And now, let’s check fields of nav bar on main page.
When you clicked on the inserted shared step, all steps will be shown for flow. ‘Check Fields’ cases are the less important cases than ‘Flow’ or ‘Navigate To’ cases, priority can be given as “3” As you can see, in this case we’re checking all the fields related to case, not all fields of the page! Here, we checked only navbar menus.
Other case standard which can be used is “When”. ‘When’ can be used such these cases:
- When: User entered wrong password- Warning message should be shown.
- When: User clicked x - Dropdown should be opened.
- When: User scrolled page down - Products should be uploaded.
- When: User changed his status- New status should be shown simultaneously.
- When: User tries to enter his password by giving space -System should not allow that (or non-numeric to the TC field…)
For warning messages, pop-up messages’ texts or some fields text, “Check Content: ” will be used
Actually content checking cases are the least important cases, they can be execute at the end of testing, because let’s say text is wrong, yes of course it’s important, it should be changed, but it’s not blocking your tests, you can keep going with others, text change is the easiest thing. Let’s take a look at another examples, you’re all set, you can write these cases own you own (not only with Check Content)
!! Pre-condition step needs to be added if it’s required.
Think about how many cases you need to create for these … :)
We have too many test case standards actually, these are also important. For example “Check Validation for Password” If I should give an example, These can be the validations for Password field
- User tries to enter 5 characters — It’s not allowed. At least 9 char is allowed.
- User tries to enter password including 1 letter and 8 numbers — It’s not allowed. At least 3 letters and 3numbers should be entered.
- User tries to enter password with sequential 4 letters — Password should not contain sequential 4 letters.
- User tries to enter full name like CerenMert— Full Name Last Name is not allowed.
- User tries to enter CER123 — Sequential 3 letters existing in the Full Name are not allowed.
- User enters the password same as last one — Password which is same as any of the last four passwords used is not allowed.
When I started testing, I’ve also searched about all these things. And yes, that’s not all but at least, I hope you understood all which I show here, if you need any question or help, please write me.
I hope you enjoyed it! See you on my next blog.
Happy Testing! :)
References: https://docs.microsoft.com/en-us/azure/devops/test/create-test-cases?view=azure-devops