Collect classic or exquisite Test Cases

Source: Internet
Author: User

The design of software test cases plays a self-evident role in testing. It is the basis for a good test and one of the most challenging tasks. We hope to use a series of classic or exquisite test cases to train employees or share experiences.

The advantages of test cases are as follows:

  • One test case can be used with a single click
  • Areas or boundaries that are hard to perceive
  • Improves test efficiency
  • It can solve technical difficulties, operational complexity, or difficult environments.
  • Use development tools to complete testing
  • ......

-------------------- Example 1 --------------------------------

1 program som (maxint, N: INT)
2 int result: = 0; I: = 0;
3 if n <0
4 then N: =-N;
5 while (I <n) and (result <= maxint)
6 {I: = I + 1;
7 result: = Result + I;
8}
9 If result <= maxint
10 then output (result)
11 else output ("too large ")
12 end.

With two sets of data (two test cases), we can cover all the branches:

Maxint = 10, n = 3

Maxint = 0, n =-1

-------------------- Example 2 --------------------------------

Currently, there are many email tests. You need to test the input of different email addresses, for example:

Abc@x.com, AB .c@xy.com, a_ B _c@x.com, ABC @ xy., ABC @. com, abc2xy.com, ABC @ xy.com ,...

One is to use a script to implement automatic data-driven testing, and a simple method is to enter the Word documents, including the mail title, subject (content), etc,

«Last name»

«First name»

«Job title»

«COMPANY»

«Business phone»

«Business Fax»

«Email address»

Use the Mail Merge function of word to automatically test the sending of many emails.

----------------------- End --------------------------------------------------

Thank you ......

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.