質問

Let's say I'm on eBay and I search for golf balls. I want to test the "sort by: quantity" button's function on the results page.

Before clicking the "sort by: quantity" button, the order is random:

Seller A has 9 balls for sale
Seller B has 70 balls for sale
Seller C has 32 balls for sale

After clicking the "sort by: quantity" button, the order should look like the following:

Seller B has 70 balls for sale
Seller C has 32 balls for sale
Seller A has 9 balls for sale

What are some test cases for such a function?

I was asked this during an interview with a search team of a company.

役に立ちましたか?

解決

Typically I would test out:

  1. What happens if 0 items show up?
  2. What happens if 1 item shows up?
  3. What happens if many items show up? [expected case]
  4. What happens if there are duplicate (or multiple duplicates) of the same number of items?
  5. What happens if one item doesn't list quantity?
  6. What happens if no items list quantity?
  7. What happens if a number is part of the product name?

And so forth.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top