Tips / Tutorials writing test cases

Tram Ho

Test Cases are a set of conditions under which a tester can rely on it to determine whether an application, a software system, or one of its features, works as intended. is not? Mechanisms to determine whether a software program or system has been adopted, a test case (1 case) is known as a test orientation (i.e. you need to identify the field) possible cases).

What is a test case?

Where a test is set up to operate with actual and expected results, it is performed in sequence to validate the functionality of the application. Whether or not it runs as required. The test case is documented and designed by the tester based on the SRS document and the use case document.

How to write a test case?

First, you need to understand the customer specification specification. When starting to write TCs for the features of a software system, the first thing to determine is to understand and identify the requirements of the system.

  • Before designing test cases find out all the features of the application.
  • Ensure that the test case includes all the functions mentioned in the SRS document and the use case document. The requirement-tracking matrix should be used to ensure that all requests are checked.
  • Avoid repeating test cases to get the correct test scope.
  • General test cases should be collected & combined in the test suite
  • Test priority should be specified for each test case. Select the priority of the test case depending on the importance of the test case to the Feature, component of the product. In the execution queue, high priority test cases should be selected first then average and then low priority test cases.
  • Keep in mind that the input data for test cases is a very important part of the test, your test cases will confirm the scope of the input data.
  • Check how the system works under normal & abnormal conditions.
  • When writing test cases, you should focus on real-world situations that end users will often manipulate in their daily lives.

What is the format of the test case?

Formats of 1 common TCs include:

Id trường hợp kiểm thử – (Value needed to determine the number of test cases required.) Tiêu đề trường hợp kiểm thử – (Brief description of test cases) Tóm tắt trường hợp kiểm thử – (Description detailed description of test cases & additional information needed for test cases to execute) Dữ liệu tiền điều kiện / kiểm thử – (Any prerequisites required to execute test cases) Test Các bước kiểm tra – (Description of test steps) Kết quả mong muốn – (Expected results from the test steps) Kết quả thực tế – (Results received after performing the test steps) Check) (Pass / Failed) Nhận xét – (Additional comments or any notes required while executing the case study m or special notes for testers should be considered) Further explanation of test case

Test case title:

  1. The test cases are nothing but user actions on the application. So, while writing test cases, ensure that the user is performing those actions. Verify that users can log in, Verify that users can perform the necessary tasks.
  2. Try to follow the following format whenever possible: [Verify] – If writing functional test cases [Use] – IF test cases are about using the Tool name, Tag name, Dialog boxes, etc. [With] – If the test is related to any condition [To] – If the test case talks about what is returned, displayed, shown, etc.

Summary of test cases:

Summary of test cases means a brief description of the test cases. Make sure you write down the additional information needed for the test case to execute, such as Assumptions, Data tests, URLs, and test information.

Steps to check the case:

The step test must be clearly written so that even if other testers can read it, the test step only describes the steps performed by the end user including data entry, pressing the button. The checking of data in the DB compared to shown on the screen is at the desired result. Often used for test cases to save, update, delete DB SELECT * FROM … WHERE …

Test case Expected results:

The desired result follows the Requirement described. Describe the desired results including errors or messages that appear on the screen. Testers need to know the desired results to evaluate whether this test case is successful or not Do not include too many confirm results into one case but should split each confirm result into each case.

The main groups of test cases:

GUI test cases: All test cases designed to test interface.

Positive test case: A positive test case. These are cases of valid and valid data entry.

Negative test cases: These are negative TCs. These are incorrect data entry TCs.

Combination test case: These are TCs that combine both Positive TC and Negative TC types: Include many correct right / wrong steps and finally the right step.

How to handle maintenance of test cases?

Today, the world ‘s software application requirements are rapidly evolving after each software upgrade. Therefore, in all upgrade test suites need to be updated or maintained based on new requirements.

Thêm trường hợp kiểm thử mới: Add Thêm trường hợp kiểm thử mới: cases in the test suite to new requirements

Xóa các trường hợp kiểm tra lỗi thời: When there are changes in the request, it can add new features and at the same time some features have been dropped, are no longer valid or not supported in the release this, so these outdated test cases must be removed from the current test case.

Important steps for you to write an effective test case

First, determine the scope and purpose of the test.

Determine the points you can test, understand the purpose of the test, and you must understand the requirements.

The test case file should have simple, transparent and easy to understand steps, the test cases should be valuable, summarized and short, the test case should have the link and prepare test data. Test data should be varied according to the test cases. The data is valid, invalid, error data.

The content is simple, has a clear purpose and is read by everyone in a unique way. (input, output, clear steps) Make a coherent presentation of the entire document. Reusable (can be easily updated and modified)

I think I have solved all the important tips on writing test cases with test case examples. I want to ask a question for you, Which testing tool do you use daily to write test cases for. Share your experience with newbies, so they can get ideas for writing test cases.


Share the news now

Source : Viblo