Independence Day Offer - FLAT 30% OFF | JTINFLAT30

- QA Testing Blogs -

How to Improve Test Case Writing Skills?



Introduction

Test cases help guide the tester through a sequence of steps to validate whether a software application is free of bugs and working as required by the end-user. A Test Case contains test steps, test data, precondition, postcondition developed for specific test scenario to verify any requirement.  Learning how to write test cases requires basic writing skills, attention to detail, and a good understanding of the application under test (AUT).

Typically, test cases for a given module or part of an application, are grouped into a test suite. More often than not, a test session will include many test cases as there will usually be more than one specific scenario to be tested.

The test case includes specific variables or conditions, using which a testing engineer can compare expected and actual results to determine whether a software product is functioning as per the requirements of the customer.

A well-written test case ought to permit any tester to comprehend and execute the test.

When writing test cases, it's imperative to imagine the client's perspective and to incorporate all the important details. Well written test cases can mean the distinction between a very much tried application and an ineffectively tried application.

A good Test Case template maintains test artifact consistency for the test team and makes it easy for all stakeholders to understand the test cases. Writing a test case in a standard format lessen the test effort and the error rate. Test cases format is more desirable in case if you are reviewing test case from experts.

Basic Guidelines to Follow When Writing a Good Test Case

Basic guidelines to follow when writing a good Test Case

 1. Use a Strong Title

A good test case starts with a strong title. As a best practice, it’s acceptable to name the test case similarly as the module that you are trying. For instance, if you’re testing the login page, include “Login Page” in the title of the test case. In some cases, if the tool you’re using doesn’t already do this, it might make sense to include a unique identifier in the title of the test case as well, so the identifier can be referenced instead of a long title.

2. Include a Strong Description

The description should tell the tester what they’re going to test. Once in awhile this area may likewise incorporate other relevant data, for example, the test condition, test information, and preconditions/presumptions. A depiction ought to be anything but difficult to peruse and promptly impart the elevated level objective of the test.

3.Include Assumptions and Preconditions

You should include any assumptions that apply to the test and any preconditions that must be met prior to the test being executed.  This information can include which page the user should start the test on, dependencies on the test environment, and any special setup requirements that must be done before running the test.  This information also helps keep the test steps short and compact.

4. Keep the Test Steps Clear and Concise

Test cases should be basic. Remember, the individual who wrote the test case probably not be a similar individual who executes the test itself. The test steps should include the necessary data and information on how to execute the test.  This is perhaps the most important part of a test case. Keep this segment clear and concise, but don’t leave out any necessary details. Write the test case with a goal that anyone can go in and perform the test.

5.Include the Expected result

The expected result tells the tester what they should experience as a result of the test steps. This is how the tester determines if the test case is a “pass” or “fail”.

6. Make it Reusable

A good test case is reusable and provides a long-term incentive to the software testing team.  When writing a test case, keep this in mind. You can spare time down the road by re-using the test case instead of re-writing it.

Sample of a Test Case

Irrespective of the test case documentation method chosen, any good test case template must have the following fields

Test Case Field

Description

Test case ID:

  • Each test case should be represented by a unique ID. To indicate test types, follow some convention like "TC_UI_1" indicating "User Interface Test Case#1."

Test Priority:

  • It is useful while executing the test.

    • Low
    • Medium
    • High

Name of the Module:

  • Determine the name of the main module or sub-module being tested

Test Designed by:

  • Tester's Name

Date of a test designed:

  • Date when the test was designed

Test Executed by:

  • Who executed the test- tester

Date of the Test Execution:

  • Date when the test needs to be executed

Name or Test Title:

  • Title of the test case

Description/Summary of Test:

  • Determine the summary or test purpose in a brief

Pre-condition:

  • Any requirement that needs to be done before the execution of this test case. To execute this test case list all pre-conditions

Dependencies:

  • Determine any dependencies on test requirements or other test cases

Test Steps:

  • Mention all the test steps in detail and write in the order in which it requires to be executed. While writing test steps ensure that you provide as much detail as you can

Test Data:

  • Use of test data as an input for the test case. Deliver different data sets with precise values to be used as an input

Expected Results:

  • Mention the expected result including error or message that should appear on the screen

Post-Condition:

  • What would be the state of the system after running the test case?

Actual Result:

  • After test execution, the actual test result should be filled

Status (Fail/Pass):

  • Mark this field as failed, if the actual result is not as per the estimated result

Notes:

  • If there are some special condition which is left in the above field

Optionally you can have the following fields depending on the project requirements

  • Link / Defect ID: Include the link for Defect or determine the defect number if test status is failed
  • Keywords / Test Type: To determine tests based on test types this field can be used. For example: Usability, functional, business rules, etc.
  • Requirements: Requirements for which this test case is being written
  • References / Attachments: It is useful for complicated test scenarios, gives the actual path of the document or diagram
  • Automation (Yes/No): To track automation status when test cases are automated
  • Custom Fields: Fields particular your project being tested due to client/project requirements.

 writing a good Test Case

Test Case Writing Tools

There's no set in stone spot to archive your test cases, but there are numerous tools that help make the way toward writing test cases more effective and efficient. For instance, test cases have generally been written in a spreadsheet. Many testing teams still opt for this approach. It’s fairly flexible, you can create your own process and method of tracking test cases, but it can also be extremely tedious, and burdensome.

QA Software Testing Training

  • No cost for a Demo Class
  • Industry Expert as your Trainer
  • Available as per your schedule
  • Customer Support Available

Some teams use project management tools to document their test cases. This is a great alternative to a spreadsheet as it introduces collaboration. But there are many dedicated tools available for writing test cases.

With a tool dedicated to testing cases, you can write your test cases, perform your tests, report on the results, and collaborate with your team throughout every step of the process. This is where TestLodge really shines.

Additional Benefits of Writing Test Cases

The very practice of writing test cases helps prepare the testing team by ensuring good test coverage across the application but writing test cases have an even broader impact on quality assurance and user experience.

Test cases will help uncover a lot of information early on; information that can ultimately improve the quality of your product. Here are some additional benefits to writing test cases:

  • You’ll find gaps in the design early
  • You’ll find usability issues
  • New hires can pick up and test the application without much, or any training
  • It builds empathy for the users of your product
  • It helps you and others learn the product

Writing test cases puts you in your user’s shoes, which builds empathy for the individuals who will actually be using your product. This empathy can easily trickle back into the design and development process and have a broad impact. As you write test cases, you’ll identify gaps and areas for improvement, things that don’t quite make sense, and these things can be addressed before the application is released into production.

Writing test cases means any new testers that are hired can easily get up to speed on the product without much training. After all, test cases outline exactly how to use the product and what is expected as a result of different actions.

A good set of test cases accessible by other team members makes it easier for others to learn about the product as well. Think of customer support, for example. The support team can browse test cases to understand how upcoming features are going to work. They can use those test cases to write technical documentation and help content.


    Janbask Training

    A dynamic, highly professional, and a global online training course provider committed to propelling the next generation of technology learners with a whole new way of training experience.


Comments

Trending Courses

AWS

  • AWS & Fundamentals of Linux
  • Amazon Simple Storage Service
  • Elastic Compute Cloud
  • Databases Overview & Amazon Route 53

Upcoming Class

1 day 13 Aug 2020

DevOps

  • Intro to DevOps
  • GIT and Maven
  • Jenkins & Ansible
  • Docker and Cloud Computing

Upcoming Class

8 days 20 Aug 2020

Data Science

  • Data Science Introduction
  • Hadoop and Spark Overview
  • Python & Intro to R Programming
  • Machine Learning

Upcoming Class

5 days 17 Aug 2020

Hadoop

  • Architecture, HDFS & MapReduce
  • Unix Shell & Apache Pig Installation
  • HIVE Installation & User-Defined Functions
  • SQOOP & Hbase Installation

Upcoming Class

3 days 15 Aug 2020

Salesforce

  • Salesforce Configuration Introduction
  • Security & Automation Process
  • Sales & Service Cloud
  • Apex Programming, SOQL & SOSL

Upcoming Class

2 days 14 Aug 2020

QA

  • Introduction and Software Testing
  • Software Test Life Cycle
  • Automation Testing and API Testing
  • Selenium framework development using Testing

Upcoming Class

5 days 17 Aug 2020

Business Analyst

  • BA & Stakeholders Overview
  • BPMN, Requirement Elicitation
  • BA Tools & Design Documents
  • Enterprise Analysis, Agile & Scrum

Upcoming Class

2 days 14 Aug 2020

MS SQL Server

  • Introduction & Database Query
  • Programming, Indexes & System Functions
  • SSIS Package Development Procedures
  • SSRS Report Design

Upcoming Class

2 days 14 Aug 2020

Python

  • Features of Python
  • Python Editors and IDEs
  • Data types and Variables
  • Python File Operation

Upcoming Class

5 days 17 Aug 2020

Artificial Intelligence

  • Components of AI
  • Categories of Machine Learning
  • Recurrent Neural Networks
  • Recurrent Neural Networks

Upcoming Class

1 day 13 Aug 2020

Machine Learning

  • Introduction to Machine Learning & Python
  • Machine Learning: Supervised Learning
  • Machine Learning: Unsupervised Learning

Upcoming Class

4 days 16 Aug 2020

Tableau

  • Introduction to Tableau Desktop
  • Data Transformation Methods
  • Configuring tableau server
  • Integration with R & Hadoop

Upcoming Class

6 days 18 Aug 2020

Search Posts

Reset

Receive Latest Materials and Offers on QA Testing Course

Interviews