Test case writing (functional testing framework)

The writing of test cases needs to be carried out according to certain ideas, rather than thinking of where to write them. Generally, companies with mature testing mechanisms will have their own custom test case templates and a complete set of test process concerns. Of course, we are testing ourselves. You should also accumulate a set of your own testing framework in your career. All functional tests can be carried out according to the ideas of the framework, so as to achieve a multiplier effect with half the effort.

The functional testing framework can include: interface friendliness testing, functional testing, link testing, fault tolerance testing, stability testing, general performance testing, configuration testing, algorithm testing, and so on.



1.1.1  Interface friendliness test

1.  Whether the style, style and color are coordinated
2.
Whether the interface layout is neat and coordinated (to ensure that all displayed, try not to use the scroll bar
3. Whether the interface operation and title description are appropriate (the description is ambiguous, pay attention to whether there are typos)
4. Whether the operation conforms to people's normal habits (is there controls with similar functions together for easy operation)
5. Prompt whether the interface conforms to the specification (cancel and ok in English should not be displayed, and OK in Chinese should be displayed, etc.)
6. Interface 7. Whether the
date control can be edited
8. Whether the length of the date control is reasonable, and the time can be displayed when modifying it.
9. Whether the column width of the query result list is reasonable and whether the label description is reasonable
. 10. Query results The list is too wide and there is no horizontal scrolling prompt
. 11. For texts with long information, is there an automatic vertical scroll bar provided in the text box?
12. Is the data entry control convenient
? 13. Does it support the Tab key? Skip
14. Are there any relevant hotkeys provided?
15. Is the prompt description of the controls correct? 16.
Whether the module calls are unified, and whether the same module calls the same interface
.
. The correct format of the date should be XXXX-XX-XX or XXXX-XX-XXXX:XX:XX
19. Whether there are extra buttons or labels on the page
20. Whether the window title or icon is unified with the menu bar
21. Window maximization, Whether the minimization can switch correctly
22. For normal functions, users can use it without reading the user manual
23. Are there prompts such as confirmation and deletion when performing risky operations?
24. Is the sequence of operations reasonable ?
25. Correctness check: Check the form, button, table, header, footer, prompt information, and other spellings and sentences on the page grammar, etc. is correct.
26. The system should warn and prompt the user before performing wrong operations.
27. Page resolution check, browse the system at various resolutions to check the system interface friendliness.
28. Reasonability check: After performing delete, update, add, cancel, back and other operations, check whether the page returned by the information is reasonable.
29. Check whether the localization is passed: the English version should not have Chinese information, and the English translation is accurate and professional.

30.  Background Grayscale Freeze

 

1.1.2  Functional test

1.  Test with all defaults

2.  Traverse tests are performed according to the content described in all product documents and help documents

3.  Input judgment

4.  The logic of yes and no in all interfaces should be tested

5.  Exception handling

6.  Sensitive words

7.  Traverse all flow chart paths according to the flow chart of the requirements document

8.  According to the program content, traverse the logic points of if elif else switch to traverse

9.  Test various interface controls

 

As for the input box test:

1. Character input box:

1.  Character input box: English full-width, English half-width, numbers, empty or space, special characters "~ !@#¥%...&*?[]{}" Special attention should be paid to single quotation marks and ampersands. When direct input of special characters is prohibited, use the "Paste, Copy" function to try to input them.

2.  Length check: minimum length, maximum length, minimum length -1 , maximum length +1, input overworked characters such as copying the entire article.

3.  Space check: there are spaces between input characters, spaces before characters, spaces after characters, spaces before and after characters

4.  Multi-line text box input: allow carriage return and line feed, after saving, display the format that can save the input, only input carriage return and line feed, check whether it can be saved correctly (if yes, check the save result, if not, check whether there is a normal prompt ),

5.  Security Check: Enter Special String

(null,NULL,,javascript,<script>,</script>,<title>,<html>,<td>)、输入脚本函数(<script>alert("abc")</script>)、doucment.write("abc")、<b>hello</b>)

 

2. Numerical input box:

1.  Boundary value: maximum value, minimum value, maximum value +1 , minimum value -1

2.  Digits: minimum digit, maximum digit, minimum digit -1 maximum digit +1, input super long value, input integer

3. Outliers, special characters: enter blank (NULL ), space or "~!@#$%^&*()_+{}|[]\:"<>?;',./?;:' -= and other characters that may cause system errors, and when direct input of special characters is prohibited, try to use paste and copy to check whether it can be submitted normally, special functions in word, copy to the input box through the clipboard, page breaks, and section breaks similar to formulas Subscripts, etc., special symbols for numerical values ​​such as ∑, ㏒, ㏑, ∏, +, -, etc.,

Input negative integers, negative decimals, fractions, input letters or Chinese characters, decimals ( the case of rounding off 0 before the decimal point, the case of multiple decimal points), numbers with the first 0 such as 01, 02, whether scientific notation supports 1.0E2, Full-width numbers and half-width numbers, mixed numbers and letters, hexadecimal, octal values, currency input (several digits after the decimal point are allowed),

4.  Security check: copy if you cannot enter it directly

 

3. Date input box:

1.  Legality check: ( input 0, 1, 32), month input [1, 3, 5, 7, 8, 10, 12], day input [31], month input [4, 6, 9] , 11], day input [30][31], non-leap year input, month input [2], date input [28, 29], leap year input, month input [2], date input [29, 30], month input [0, 1, 12, 13]

Consider comparing the start date to the end calendar, especially when querying.

2.  Outliers, special characters: enter blank or NULL , enter ~! @#¥%...&*(){}[] and other characters that may cause system errors

3.  Security check: if you can't input it directly, just copy it. Is there an error in the data check?

 

1.1.3  Business process test ( main function test)

A business process generally involves data from multiple modules, so when testing a business process, first of all, it is necessary to ensure the correctness of the function of a single module, and secondly, to test the data passed between each module, which is often prone to problems. When testing, be sure to design different data for testing.

If a functional module has the most basic functions of adding, deleting, modifying and checking, the following tests are required:

1.  Single function test (add, modify, query, delete)

2.  Increase -> increase -> increase (continuously increase the test)

3.  Add -> Delete

4.  Add -> Delete -> Add (the newly added content is consistent with the deleted content)

5.  Add -> Modify -> Delete

6.  Modify -> Modify -> Modify (continuous modification test)

7.  Modify -> Add (the newly added content is the same as the content before the modification)

8.  Modify -> Delete

9.  Modify -> delete -> add (the newly added content is consistent with the deleted content)

10.  Delete --> Delete --> Delete (continuous deletion test)

 

1.1.4  Link Test

Mainly to ensure the availability and correctness of links, it is also an important aspect of website testing.
Link tests can be performed using specific tools such as XENU.

 

1.1.5  Fault Tolerance Testing

1.  Enter data not allowed by the system as input

2.  Stop a related module or subsystem to verify the impact on the current system

3. The  configuration file is deleted or misconfigured

4.  Database injects wrong data

 

1.1.6  Stability test

1. The  system runs uninterrupted (7*24 ) to verify whether there is a memory leak and whether other system resources are leaked

2.  If it is urgent to go online, you can run for one night or two days on weekends.

In general, under high pressure, the database connection problem and memory leak problem will be exposed faster, but the deadlock may not be reflected, so it depends on the importance of the system. For example, the stability of 12306 is best for 7*24 hours.

 

1.1.7  Routine performance test

1.  Connection speed test
The speed at which users connect to the Web application system varies according to the way they surf the Internet, they may be dial-up telephones, or broadband Internet access. When downloading a program, the user can wait a long time, but not if only visiting a page. If the web system takes too long to respond (for example, more than 5 seconds), the user will be impatient and leave.
In addition, some pages have a timeout limit. If the response speed is too slow, users may not have time to browse the content and need to log in again. Moreover, the connection speed is too slow, may also cause data loss, so that users can not get the real page.

2. Load testing
Load testing is to measure the performance of the Web system at a certain load level to ensure that the Web system can work normally within the required range. The load level can be the number of users accessing the Web system at the same time, or the number of online data processing. For example: How many users can the Web application system allow online at the same time? What happens if this number is exceeded? Can a web application system handle a large number of user requests for the same page?

3. Stress testing
Load testing should be arranged in the actual network environment after the Web system is released. Because an enterprise's internal staff, especially the project team staff are always limited, and the number of requests that a Web system can handle at the same time will far exceed this limit, so the result is correct only if it is placed on the Internet and subjected to load testing. believable.
Stress testing refers to actually destroying a web application system and testing the system's reflection. Stress testing is to test the limitations and fault recovery capabilities of the system, that is, to test whether the Web application system will crash, and under what circumstances will it crash. Hackers often provide the wrong data payload until the web application crashes, and then gains access when the system restarts.
Areas of stress testing include forms, login and other information transfer pages, etc.

 

1.1.8  Usability Test

1.  Whether the controls of the system interface can be traversed by the tab key, and the order is reasonable

2.  Whether the entry and operation of the main functions are easy to understand

3.  Whether the interface layout is reasonable, and whether the functions are easy to find and use

4.  Operation steps

5.  Operating habits

6.  There is enough prompt information, and the text description of the information is accurate

 

1.1.9  Compatibility Test

Compatibility testing not only refers to the compatibility of interfaces under different operating systems or browsers, but some functional tests also take into account compatibility,
including operating system compatibility and application software compatibility, and may also include hardware compatibility
such as ajax, jQuery, javascript and other technologies must take into account the compatibility issues under different browsers.

 

In addition to the tests mentioned above, there are also algorithm tests, configuration tests, security tests, etc., and constantly summarize and analyze at work to form your own functional testing framework. You are a valuable thing to the testing team, and your testing thinking will become more comprehensive.

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324854056&siteId=291194637