Unit test cases

Level test unit testing, the minimum unit in which individual portions / components (referred to as cells) is tested to determine whether they are suitable for use.

Write and execute unit test cases by the developer (generally, of course, there are two general case) is completed to ensure that each unit will work as expected. Minimum portion of the various components, such as test subjects a function, class, interface or the like.

If a function, for example, then the input parameters passed to the function, check whether the function should return expectations. The main purpose of this test is to check whether the unit is working as designed, and more rational handling errors and exceptions, and be compatible with a variety of forward, reverse the situation.

Unit test is considered a white box. This is the lowest level of the test layer, prior to the start of integration testing.

Guide unit test cases:

  1. Unit test plans / cases should be provided separately and should not be combined with other steps. Try all possible test programs, including unusual and alternative processes. Once the project enters the construction phase, developers will tend to only test cases have been completed successfully or in the case of coding.

  2. Software development and unit tests need to be divided into different stages, and accordingly arrange delivery time.

  3. The unit needs the test results as a separate deliverable processing. This will help filter out some errors in business processes at an early stage, rather than integration testing or system testing.

  4. By statistical planning, execution, and failed test case by counting the master project schedule.

  5. Try to make some immediate testing in the development process.

Unit test cases list:

Input data validation:

This section contains a series of checks that can usually be input to the data of the application system employed.

  • Must pass tests
  • The only field test values
  • Null test
  • Field accepts only characters allowed
  • Test negative
  • Field limited field length specification
  • Impossible to value
  • Garbage value test
  • The dependence between the check field
  • Equivalent partitioning boundary and test conditions
  • Error and exception handling test

Date validation:

This constitutes a set of conditions date field.

  • Various date formats
  • American style date format
  • Effective Date
  • Invalid date, for example
  • March 00 and 13
  • Day 00 and 32 do not contain as its value
  • 28, 29 are properly verified
  • To examine the impact on weekends and bank holidays
  • Links from year to February 29

Time Verification:

This constitutes a set of conditions the time field

  • Various time format, e.g. 12/24 hour format, AM / PM
  • Check the effective time
  • Check the invalid time
  • Check the impact of work on weekends and holidays

ZIP Code verification:

This constitutes a set of conditions in the postal code field

  • Test section and zip code checks ZIP format
  • Test space / no space
  • Check if there is an option to manually enter the address of

System Interface:

This constitutes a set of conditions in the field of transmission systems among multiple applications.

  • All fields / parameters to check on the implementation of the interface is correct
  • All data fields will need to verify the list in accordance with the normal operation
  • Cross-automated security testing interface
  • Check the inheritance

Availability:

This constitutes a set of conditions, help verify the availability of the application system.

  • Check whether the layout is consistent with design standards
  • Check the font, color, size and so on.
  • Testing Brand Guidelines
  • Check each application's window title if has a name and the name of the application window
  • Check the alignment
  • And check whether the screen is minimized resizable
  • Spell Check
  • If necessary, test defaults
  • Required fields are highlighted with an asterisk need to sign

Safety:

This constitutes a set of conditions, contribute to the security of the application verification system.

  • The password is not visible
  • Access test - multiple levels
  • change the password
  • Error messages should not disclose any information system
  • Check for proper deployment of SSL
  • Check whether the application of the rules locking
  • Check whether the password or encryption codes to save
  • UserId using valid and invalid UserId verification applications
  • Use effective passwords, and invalid password verification applications
  • To check access to applications by directly entering a valid URL. The system should be asked to log details.
  • Ensure that the browser can not remember the password

Record, review and tracking:

This is composed of a set of conditions, these conditions helps to verify audit record, the system logs the application system and the like.

  • Check if a specified period of time to save the log
  • Check the logs contain personal data
  • Check whether the records administrator functions
  • Check whether the user record locking events

Business application logic:

This constitutes a set of conditions, the system helps to verify that the application logic and business process applications.

  • Check whether exploring all available product options
  • Check all upgrade and downgrade paths and options
  • Verify upgrade and downgrade has been applied to billing, network, self-help
  • Stop / disconnect / termination behavior
  • Equipment failure behavior
  • Check the calculated amount of rounding
  • Ensure that the test account of the full range, type / status / condition
  • Check whether the required display currency symbol
  • Verify that no duplicate records.
  • In the context of arithmetic, or the use of a large number of very large number of A / D, to show the form of actual data and check overflow

report:

This section contains a set of checks that can help verify the reporting system provides.

  • All fields are available
  • Fields should be enough space
  • Enable scrolling and panning
  • Page size indication reports (N, a total of M), and should allow access to the reports / end
  • Report has been correctly exported to Excel / Word documents
  • Reports can be printed correctly, all data is displayed correctly
  • Are all the pages of inspection reports accessible

surroundings:

This section contains a set of checks that helps to verify AUT environmental or equipment requirements.

  • To use all browser tests
  • Testing by enabling and disabling Java Script

e-mail:

This section contains a set of authentication can be used to check e-mail function

  • Verify that provides a confirmation message when sending e-mail
  • Link provided in the email to verify proper operation
  • Confirm the correct return address
  • Verification email font, size, and text alignment is correct

search condition:

This section contains an application system search function of a series of checks.

  • Verify the scroll bar has been achieved
  • The results verify the correct alignment
  • Verify any combination of criteria shows effective results.
  • Verify for retrieving AND / OR condition to the correct results
  • Verification results are displayed in alphabetical order or the order designated
  • Verify that the column heading to sort

  • Solemnly declare : The article first appeared in public No. "FunTester", prohibit third parties (except Tencent cloud) reproduce, publish.

Technology Featured articles

Non-technical Selected Articles

Guess you like

Origin www.cnblogs.com/FunTester/p/12155004.html