Test cases for a single list

What are some good test cases for a problem with a linked list as a whole? for example, test cases for a function that finds and eliminates duplicates and returns a pointer to the first node. Some basic cases may be: a function is in C # or Java, not c, C ++. Suppose all positive integers are nodes in a list.

  • Null
  • Empty list
  • Associated List with Loop
  • List of all duplicates
  • List with one node or two nodes (2 duplications)
  • No duplicates
  • The list may collide with the whole stream, contain low memory (depending on the 32-bit machine, 64-bit machine)
  • Security testing, language automation, memory problems, performance and stress.

What else? awaiting outrageous test cases. Any experts there?

+4
source share
2 answers

How about these?

  • moving list
  • edge cases:
    • move empty list
    • jump list, where 1+ stored values: NULL
    Operations
  • (if applicable):
    • remove from list
    • list insertion
    • insert subscriptions into a linked list
    • move list back (if doubly linked list)
  • concurrency tests (if applicable):
    • race conditions tests
+5
source
  • Security β†’ what level of permission is required to use the API, role, etc.
  • Memory β†’ How much memory is consumed when using this API; Does it affect performance?
  • Compatibility testing β†’ testing a package using this API on different platforms, on Windows, MAC, Unix, etc.
  • Stress Testing β†’ Call the API using a master subordinate architecture and parallel processing on different clients.
  • UI -> If the API has a user interface, the user interfaces of the user interface fall into the image as a usability test
+5
source

Source: https://habr.com/ru/post/1345268/


All Articles